<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Environment variable configuration 401 Unauthorized in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726467#M5285</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/169828"&gt;@Anthony.Dahanne&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for asking your question on the community. Since it's been a few days, have you discovered a solution or anything worth sharing?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 13:16:19 GMT</pubDate>
    <dc:creator>iamryan</dc:creator>
    <dc:date>2024-06-04T13:16:19Z</dc:date>
    <item>
      <title>Environment variable configuration 401 Unauthorized</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726466#M5284</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I was able to connect fine to the controller using the provided `agent-info.xml` (after downloading the custom-config AppServerAgent-1.8-24.4.1.35880)&lt;/P&gt;&lt;P&gt;Now, what I'm trying to, is to reproduce the same configuration, but solely based on env. variables; because I'll be deploying my app with a "blank" AppServerAgent-1.8-24.4.1.35880 with no custom config.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, I can't make it work.&lt;/P&gt;&lt;P&gt;When it works fine using the provided `agent-info.xml`, I can see in the logs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;[AD Agent init] 30 May 2024 17:32:07,965  INFO XMLConfigManager - Full certificate chain validation performed using default certificate file&lt;BR /&gt;[AD Agent init] 30 May 2024 17:32:18,898  INFO ConfigurationChannel - Auto agent registration attempted: Application Name [anthony-app] Component Name [anthony-tier] Node Name [anthony-node]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:32:18,898  INFO ConfigurationChannel - Auto agent registration SUCCEEDED!&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;When it fails, using env. variables, I'll get&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;[AD Agent init] 30 May 2024 17:29:22,398  INFO XMLConfigManager - Full certificate chain validation performed using default certificate file&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:22,600 ERROR ConfigurationChannel - HTTP Request failed: HTTP/1.1 401 Unauthorized&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:22,600  INFO ConfigurationChannel - Resetting AuthState for Proxy: [state:UNCHALLENGED;] and Target [state:FAILURE;]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:22,601  WARN ConfigurationChannel - Could not connect to the controller/invalid response from controller, cannot get initialization information, controller host [xxx.saas.appdynamics.com], port[443], exception [null]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:22,601 ERROR ConfigurationChannel - Exception: NULL&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Although here are all the env. variables I've set:&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;APPDYNAMICS_CONTROLLER_HOST_NAME=xxx.saas.appdynamics.com&lt;BR /&gt;APPDYNAMICS_AGENT_TIER_NAME=anthony-tier&lt;BR /&gt;APPDYNAMICS_AGENT_APPLICATION_NAME=anthony-app&lt;BR /&gt;APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY=password-copy-pasted-from-config&lt;BR /&gt;APPDYNAMICS_AGENT_NODE_NAME=anthony-node&lt;BR /&gt;APPDYNAMICS_CONTROLLER_PORT=443&lt;BR /&gt;APPDYNAMICS_CONTROLLER_SSL_ENABLED=true&lt;/PRE&gt;&lt;P&gt;There's one thing that is troubling me in the logs though, is that using env. variables, I always get in the logs such messages:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;[AD Agent init] 30 May 2024 17:29:18,333  WARN XMLConfigManager - XML Controller Info Resolver found invalid controller host information [] in controller-info.xml; Please specify a valid value if it is not already set in system properties.&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,333  WARN XMLConfigManager - XML Controller Info Resolver found invalid controller port information [] in controller-info.xml; Please specify a valid value if it is not already set in system properties.&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,335  WARN XMLConfigManager - XML Controller Info Resolver found invalid controller host information [] in controller-info.xml; Please specify a valid value if it is not already set in system properties.&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,335  WARN XMLConfigManager - XML Controller Info Resolver found invalid controller port information [] in controller-info.xml; Please specify a valid value if it is not already set in system properties.&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,339  INFO XMLConfigManager - XML Agent Account Info Resolver did not find account name. Using default account name [customer1]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,339  WARN XMLConfigManager - XML Agent Account Info Resolver did not find account access key.&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,339  INFO XMLConfigManager - Configuration Channel is using ControllerInfo:: host:[xxx.saas.appdynamics.com] port:[443] sslEnabled:[true] keystoreFile:[DEFAULT:cacerts.jks] use-encrypted-credentials:[false] secureCredentialStoreFileName:[] secureCredentialStorePassword:[] secureCredentialStoreFormat:[] use-ssl-client-auth:[false] asymmetricKeysStoreFilename:[] asymmetricKeysStorePassword:[] asymmetricKeyPassword:[] asymmetricKeyAlias:[] validation:[UNSPECIFIED]&lt;/PRE&gt;&lt;P&gt;Although all env. variables were properly loaded I believe:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,295  INFO XMLConfigManager - Default Controller Info Resolver found env variable [APPDYNAMICS_CONTROLLER_HOST_NAME] for controller host name [xxx.saas.appdynamics.com]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,295  INFO XMLConfigManager - Default Controller Info Resolver found env variable [APPDYNAMICS_CONTROLLER_PORT] for controller port [443]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,295  INFO XMLConfigManager - Default Controller Info Resolver found env variable [APPDYNAMICS_CONTROLLER_SSL_ENABLED] for controller ssl enabled [true]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,303  INFO XMLConfigManager - Default Agent Account Info Resolver found env variable [APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY] for account access key [****]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,303  INFO XMLConfigManager - Full Agent Registration Info Resolver found env variable [APPDYNAMICS_AGENT_APPLICATION_NAME] for application name [anthony-app]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,303  INFO XMLConfigManager - Full Agent Registration Info Resolver found env variable [APPDYNAMICS_AGENT_TIER_NAME] for tier name [anthony-tier]&lt;BR /&gt;[AD Agent init] 30 May 2024 17:29:18,303  INFO XMLConfigManager - Full Agent Registration Info Resolver found env variable [APPDYNAMICS_AGENT_NODE_NAME] for node name [anthony-node]&lt;/PRE&gt;&lt;P&gt;Anyways...&lt;BR /&gt;Is configuration solely provided by env. variable supposed to work?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 May 2024 22:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726466#M5284</guid>
      <dc:creator>Anthony_Dahanne</dc:creator>
      <dc:date>2024-05-30T22:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Environment variable configuration 401 Unauthorized</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726467#M5285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/169828"&gt;@Anthony.Dahanne&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for asking your question on the community. Since it's been a few days, have you discovered a solution or anything worth sharing?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 13:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726467#M5285</guid>
      <dc:creator>iamryan</dc:creator>
      <dc:date>2024-06-04T13:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Environment variable configuration 401 Unauthorized</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726468#M5286</link>
      <description>&lt;P&gt;Well, actually, I think so!&lt;/P&gt;&lt;P&gt;The logs about the XmlConfig not finding configuration are a red herring: they don't mean anything is wrong with env. variables.&lt;BR /&gt;Those are the required env. variables that ALL need to be set explicitly to make it work without am xml config file:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;APPDYNAMICS_CONTROLLER_HOST_NAME&lt;/SPAN&gt;: &amp;lt;key-value&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;APPDYNAMICS_CONTROLLER_SSL_ENABLED&lt;/SPAN&gt;: &lt;SPAN&gt;"true"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;APPDYNAMICS_CONTROLLER_PORT&lt;/SPAN&gt;: &lt;SPAN&gt;"443"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY: &amp;lt;key-value&amp;gt;&lt;BR /&gt;APPDYNAMICS_AGENT_ACCOUNT_NAME: &amp;lt;key-value&amp;gt;&lt;BR /&gt;APPDYNAMICS_AGENT_TIER_NAME: &amp;lt;key-value&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;APPDYNAMICS_AGENT_NODE_NAME&lt;/SPAN&gt;: &amp;lt;key-value&amp;gt;&lt;BR /&gt;&lt;SPAN&gt;APPDYNAMICS_AGENT_APPLICATION_NAME&lt;/SPAN&gt;: &amp;lt;key-value&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I forgot to add &lt;SPAN&gt;APPDYNAMICS_AGENT_ACCOUNT_NAME&lt;/SPAN&gt; and there no messages in the logs pointing me into the right direction.&lt;/P&gt;&lt;P&gt;I would suggest the doc would insist on all of those values being set, or the agent won't connect.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 15:11:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726468#M5286</guid>
      <dc:creator>Anthony_Dahanne</dc:creator>
      <dc:date>2024-06-04T15:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Environment variable configuration 401 Unauthorized</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726469#M5287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/169828"&gt;@Anthony.Dahanne&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;I'm glad you were able to figure it out. Thanks for coming back and sharing the solution too!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 16:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Environment-variable-configuration-401-Unauthorized/m-p/726469#M5287</guid>
      <dc:creator>iamryan</dc:creator>
      <dc:date>2024-06-04T16:54:48Z</dc:date>
    </item>
  </channel>
</rss>

