"General failure while fetching agent configuration" when accessing Agent Configuration page with "NatAddress" not found trace.

"General failure while fetching agent configuration" when accessing Agent Configuration page with "NatAddress" not found trace.

Issue: 

      "General failure while fetching agent configuration" error message is showing up when accessing Agent Configuration page under Admin -> Discovery. 

This happens in two cases. 

Case 1:

Build Version:

      DC - 11.1.2240.1 and above.

Trace:

      SDP: serverout file
                  org.json.JSONException: JSONObject["natAddress"] not found.|
 	      at org.json.JSONObject.get(JSONObject.java:573)|
 	      at org.json.JSONObject.getString(JSONObject.java:836)|
 	      at com.manageengine.servicedesk.asset.util.DCBundlingUtil.getAllAgentSettings(DCBundlingUtil.java:660)|
      EC: securityfilter file
                  IAMSecurityException ErrorCode: URL_RULE_NOT_CONFIGURED, RequestURI: "/emsapi/nat/settings", RemoteAddr: "192.168.17.34", Referrer: "null"|

Fix:

      Please place the fjar under the fixes directory and restart the SDP/AE service.

      Build Versions for fjar:

      SDP:                            AE: 
      14001 - 14004         6981 - 6983         (Use nat_14001_14004.fjar attached)
                   
      14005 - 14102         6984 - 6986         (Use nat_14005_14102.fjar attached)

      14103 - 14202           6987 - 6991        (Use 1_14200NatSet.fjar attached)

Note:
If the cx is not in the above mentioned build versions, but still the issue persists, then the cx evaluation license in DC might have been expired and not yet moved to free edition yet (This state can be known as intermediate state - where the evaluation period ended and is not yet converted to free edition). Once moved to free edition, the issue will get resolved. 
please check the result of the below URL hit in DC.
<DC-URL>/emsapi/nat/details - In the response, natAddress field should be present. If we see the response like 'License expired', then we can confirm that the issue is due to the above intermediate state.
Sample ticket with this cause:

Case 2:

Build Version:

    DC : >= 10.1.2230.1
             < 10.1.2228.1

Trace:

      SDP: serverout file
                   [13:07:41:533]|[02-21-2023]|[com.manageengine.servicedesk.asset.util.DCBundlingUtil]|[SEVERE]|[65]: securityJSON :: {"errorCode":"USER0004","errorMsg":"Authentication key is invalid. Please regenerate the key and try again."}|

Fix:

If build is above or equal to 10.1.2230.1 ask them to upgrade to 11.1.2238.1 (Link has to be generated for downloading this build from think page : https://www.manageengine.com/products/desktop-central/service-packs1.html)
if he is below 2228.1 upgrade to above 10.1.2228.8 ( Download link: https://www.manageengine.com/products/service-desk/integrations/unified-asset-inventory-agent.html)
      
Case 3:

Trace:
Prompt Settings :: {"errorCode":"IAM0002","url":"/dcapi/tools/remoteControl/rdsPromptSettings","errorMsg":"You do not have the required access to perform this operation."}| [12:09:35:071]|[05-26-2023]|[com.manageengine.servicedesk.asset.dc.DCAPIChannel]|[INFO]|[40]: Remotecontrol Settings :: {"errorCode":"IAM0002","url":"/dcapi/tools/remoteControl/rdsSettings","errorMsg":"You do not have the required access to perform this operation."}|

(All the URLs in agent configuration page gets fail)

Fix:
Please get the EC logs also after recreating the issue.

Please check whether the below trace is available in the EC sdpintegration logs:

Error occurred in addintegratedServiceUser()|
com.adventnet.persistence.DataAccessException: [IntegratedApplicationUsers] Batch entry 0 INSERT INTO IntegratedApplicationUsers (APPLICATION_ID,LOGIN_ID,STATUS,HD_ROLE) VALUES


Based on the EC logs trace availability, we can confirm it and give the below solution.

Steps to be given after confirming the EC log trace:

-> Need to execute the query in DC side, Please find the steps below:
             1 Download the INTEGRATED_APPS.xml file attached to this comment. Kindly paste the xml in {UEM Product installed folder}\bin. 
             2.Go to cmd of this and run the command ExecuteQuery.bat "INTEGRATED_APPS.xml"
             3.provide username & password of EC
             4. Restart UEM service.

-> Need to do a full technician sync. 'IS_FULL_SYNC_ENABLED' parameter in GlobalConfig table should be made true and refresh the global config cache to enable full technician sync, so that the issue will get resolved. Execute the below query in SDP side.
              update globalconfig set paramvalue = 'true' where parameter = 'IS_FULL_SYNC_ENABLED'
Then , go to  Scan settings page, do any change and save the page, to refresh the global config cache.



                    New to ADSelfService Plus?