AppD Archive

Use proxy server for Agent of java

CommunityUser
Splunk Employee
Splunk Employee

Hi, I installed a agent of java in our tomcat server and we have to use proxy server to transfer datat to Appdynamics SaaS

due to network restriction.

I set proxyHost, proxyPort as system properites as the following.

But no data can be seen on Appdynamics Saas and no log is found.

Is the setting wrong?

================================================================================

export JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/local/tomcat/appagent/javaagent.jar -Dappdynamics.http.proxyHost=xxx.proxy.com -Dappdynamics.http.proxyPort=xxxx"

================================================================================

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I used these with success:

-Dcom.singularity.httpclientwrapper.proxyHost=xxx

-Dcom.singularity.httpclientwrapper.proxyPort=nnnn

/S

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I have the same issue for the Java agent "ver4.0.0.0".

> -Dappdynamics.http.proxyHost=proxy.mycompany.com -Dappdynamics.http.proxyPort=<theRightPort>

does not for work for me either for both https and http -- of course configured accordingly in controller-info.xml.

> -Dcom.singularity.httpclientwrapper.proxyHost=xxx -Dcom.singularity.httpclientwrapper.proxyPort=nnnn

paramter works for http.

For https I have problems with the certificate validation chain:

"PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

I have not further looked into the SSL issue, but in production (and not playing around with dummys) encryption is a must have.

0 Karma

Arun_Dasetty
Super Champion

Hi,

We see this could be due to missing certificates that is attached in this update. We request you to import the attached certificates to your truststore

https://docs.appdynamics.com/display/OTHER/FAQ+on+SSL+Certificate+Change#FAQonSSLCertificateChange-I... 

Hope that information helps. If error persists post jvm restart on affected node. please send the zipped version <agent_install_dir>/logs  for our review.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks for your help. It was actually an issue with our proxy playing a "man in the middle attack" and using self signed certificates.

I included a cacerts.jks (with the needed keys) in the conf folder. Then the SSL issues where resolved.

BTW: in the readme.txt of the 4.0.1.0 version there is still a link to the old documentation at http://docs.appdynamics.com/display/PRO14S/Install+the+App+Agent+for+Java 

In the readme.txt there are also the proxy JVM paramters that do not work....

0 Karma

Ravi_Giroti
New Member

Hello,

Please change the Java options as shown below and restart Tomcat.

export JAVA_OPTS="$JAVA_OPTS -Dappdynamics.http.proxyHost=xxx.proxy.com -Dappdynamics.http.proxyPort=xxxx -javaagent:/usr/local/tomcat/appagent/javaagent.jar"

Can you also share the output of the following command so we can see if the proxy configuration is being read?

ps -ef | grep java

Thanks,

Ravi

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thank you for your answer.

I changed my setting but it is still not working.

tomcat   30292     1 56 00:55 pts/0    00:00:32 /usr/local/jdk1.7/bin/java -Dappdynamics.http.proxyHost=xxx.proxy.com -Dappdynamics.http.proxyPort=xxxx -javaagent:/usr/local/tomcat/appagent/javaagent.jar -verbose:gc -XX:+PrintGCTimeStamps -Dcom.sun.management.config.file=/usr/local/tomcat/conf/management.properties -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath :/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/tomcat/ -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi,

Can you check the logs folder of the agent directory and see if a new folder is created with the node name that you have specified in the controller-info.xml. If so please send us the logs? Can you also send us the controller-info.xml file from the config folder?

Please also confirm that this is a non-authenticating proxy.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

> Can you check the logs folder of the agent directory and see if a new folder is created with the node name that you have > > > specified in the controller-info.xml. If so please send us the logs? Can you also send us the controller-info.xml file from the > > >  config folder?

There is no logs folder on the agent directory, and also I didn't change logs directory setting.

I attached the controller-info.xml file.

> Please also confirm that this is a non-authenticating proxy.

Yes, it is non-authenticating.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I do not see the attachment. Can you attach the controller-info.xml file again.

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...