0

macOS 10.12.6 (Build 16G1510)

Server 5.3.1 (Build 16S4128)

Users stop getting settings.

Example: fresh enrolled computer, successful enrolled, but didn't get any settings from the group or personal setting. Update info going through and marked as Succeeded.

Postgres log showing:

2019-02-19 11:28:49.444 MSK STATEMENT:  SELECT dm_process_one_deferred_function_call()
2019-02-19 11:28:59.823 MSK ERROR:  duplicate key value violates unique constraint "installed_profiles_profile_id_mdm_target_id_key"
2019-02-19 11:28:59.823 MSK DETAIL:  Key (profile_id, mdm_target_id)=(3043, 30149) already exists.
2019-02-19 11:28:59.823 MSK CONTEXT:  SQL statement "WITH install_tasks AS (

I tried to reindex it but no luck

sudo -u _devicemgr reindexdb devicemgr_v2m0 -U _devicemgr -h /Library/Server/ProfileManager/Config/var/PostgreSQL -e

Any idea how I can fix it?

    devicemgr_v2m0=# SELECT MAX(profile_id) FROM installed_profiles;
  max  
-------
 27226
(1 row)

devicemgr_v2m0=# SELECT MAX(mdm_target_id) FROM installed_profiles;
  max  
-------
 30185
(1 row)

devicemgr_v2m0=# SELECT c.relname FROM pg_class c WHERE c.relkind = 'S';
                 relname                 
-----------------------------------------
 widgets_id_seq
 system_applications_id_seq
 target_tombstones_id_seq
 work_tasks_id_seq
 edu_devices_users_id_seq
 active_locales_id_seq
 assets_localized_data_id_seq
 certificates_id_seq
 asset_metadata_id_seq
 auto_join_profiles_device_groups_id_seq
 auto_join_profiles_id_seq
 db_notifications_id_seq
 device_enrollment_settings_id_seq
 dynamic_attributes_defaults_id_seq
 installed_media_id_seq
 os_updates_id_seq
 knob_sets_id_seq
 library_item_tasks_id_seq
 od_searches_id_seq
 os_updates_devices_id_seq
 printers_id_seq
 preference_panes_id_seq
 class_beacon_seq
 profiles_id_seq
 internal_tasks_id_seq
 library_item_settings_id_seq
 sessions_id_seq
 db_deferred_int_functions_id_seq
 db_deferred_void_functions_id_seq
 assets_id_seq
 auto_join_profile_usage_id_seq
 client_certificates_id_seq
 installed_profiles_id_seq
 library_item_metadata_id_seq
 library_items_id_seq
 od_nodes_od_node_id_seq
(36 rows)
devicemgr_v2m0=# SELECT nextval('profiles_id_seq');
 nextval 
---------
   27228
(1 row)
SELECT setval('profiles_id_seq', (SELECT MAX(profile_id) FROM installed_profiles)+1);
Where is the sequence for mdm_target_id???

You must log in to answer this question.

Browse other questions tagged .