Dear ..
After installation PHP agent on i couldnt connect it to the controller
please advise as the agent logs shows below
[agent] module shutdown start
2014-12-13 04:07:34.473 AST INFO 29590 [agent] module shutdown end
2014-12-13 04:07:34.580 AST INFO 29618 [agent.AgentKernel] starting up agent kernel [3.9.6.0GA.6662.ff27c3e58006c6367c244d547984f122c032ee53]
2014-12-13 04:07:35.031 AST INFO 29618 [config.ConfigChannel] sending config request with version -1
2014-12-13 04:07:35.031 AST INFO 29618 [agent.ZMQControlTransport] sending start node request
2014-12-13 04:07:36.032 AST WARN 29618 [agent.ZMQControlTransport] timed out (1000ms) control socket response
2014-12-13 04:07:36.033 AST ERROR 29618 [config.ConfigChannel] could not send config request
2014-12-13 04:07:36.042 AST INFO 29618 [agent] module shutdown start
2014-12-13 04:07:36.042 AST INFO 29618 [agent] module shutdown end
and keep itrating the same thing
i installed it using the command
./install.sh -a=customer1@SJ5b2m7d1$354 -e /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ -p /usr/bin/ -i /usr/local/lib/ -v 5.3 httpd.guru 18090 KL28 KL28_tier NODE1
Hi,
While PHP team got chance to look into this , Can you please check few things listed below:
- Make sure controller port and host are not blocked by any firewall rules from instance where php agent is installed and trying to register agent
- Can you attach php agent logs and telnet command output to contorller host and port showing success
- We understood that controller is installed using single tenant mode and running fine, If yes, Can you please retry php agent instal with different node name other than Node1 which is reserved for internal agent node name of controller UI
Regards,
Arun
Dear akumar,
thanks for quick response..
i changed the node name as requested..
problem still presisit
please find attached logs for the PHP_agent
telnet response:
root@node [/app/appdynamics-php-agent]# telnet httpd.guru 18090
Trying 178.79.153.234...
Connected to httpd.guru.
Escape character is '^]'.
Is OK..
please not that i run cPanel on my server if it makes any diffrence
Thanks for your support
Hi,
We see similar issue in other customer environment in past and see this happens when proxy is not starting due to lack of permissions, Please fix the permissions on agent directory that should help resolve the issue, Above said is evident from below logs:
===============================
[main] 13 Dec 2014 11:05:36,974 ERROR com.singularity.JavaAgent - Could Not Start Proxy, Disabling !!!!!
java.lang.RuntimeException: Failed to write to runtime directory /app/appdynamics-php-agent/proxy
at com.singularity.ee.util.y.c(y.java:535)
at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:220)..
Caused by: java.io.IOException: Permission denied
===========================
Also refer doc and see if that information helps: https://docs.appdynamics.com/display/PRO39/Set+Up+a+Multi-Tenant+Proxy+for+PHP+Agents
Regards,
Arun
Dear akumar,
i checked the permission and have run the proxy as per the documentation and it seems to be up
[main] 14 Dec 2014 19:04:40,905 INFO com.singularity.proxyControl.ProxyEntryPoint - ProxyControl - init
[main] 14 Dec 2014 19:04:40,905 INFO com.singularity.proxyControl.ProxyEntryPoint - comm dir set to: /app/proxy.communication
[main] 14 Dec 2014 19:04:40,913 INFO com.singularity.proxyControl.ZeroMQControlServer - ipcNodeBaseDir dir set to: /app/proxy.communication/proxy-8476954609375676535
[main] 14 Dec 2014 19:04:40,917 INFO com.singularity.proxyControl.ProxyEntryPoint - Should register primary node:false
[main] 14 Dec 2014 19:04:40,917 INFO com.singularity.proxyControl.ZeroMQControlServer - ZeroMQControlServer - init
[main] 14 Dec 2014 19:04:40,936 INFO com.singularity.proxyControl.ZeroMQControlServer - ControlReqRouterSocket started at:ipc:///app/proxy.communication/0
[main] 14 Dec 2014 19:04:40,940 INFO com.singularity.proxyControl.ProxyEntryPoint - ProxyControl - init completed
but the agent.log is still giving the same above errors..
Please advise ..
thanks
Hey Rootsami,
Can you post the output of `php -i` to this thread?
Best regards,
Kyle
Hey Rootsami,
Could you disable any manual launch proxy you have configured, and restart your web server. Then provide the full logs again. I suspect it was enough to simply resolve the permissions issue. The logs will verify and help further diagnosis if there are other issues to resolve.
Your php -i looks good though.
Best regards,
Kyle
Dear Kyle..
Thanks for quick response..
i have commented the line agent.auto_launch_proxy
and the it started automatically thanks..
Please look into the new logs for futher diagnosis as problem still presist
please download the tar file from http://httpd.guru/logs_PHP.tar.gz
as i got issues with uploading speed
Thanks
Hey Rootsami,
Could you also remove the agent.proxy_ctrl_dir setting and restart? New logs after this process will help us continue diagnosing.
Best regards,
Kyle
hey kyle,
now my agent is connected to the contoller and detected my node
but im not getting any BTs or load
see attached screenshot
and please refer to new logs at below URL
good process thou 🙂
thanks
Hi rootsami,
Attached zipped logs doesn't have log files created by our proxy component. The files proxyCore* are different and created up on starting of the proxy component but once it is up and running it will create log file under logs folder in php_agent_installation_directory. Proxy log filenames starts with proxy*.log
Can you please attach them also here. Also please post all the appdynamics related configuration changes done in the php.ini
Best Regards,
Piyush
hi piyush,
i dont why the file was excluded from the tar.. maybe because every few sconds one appears and the other disappear..
here attached logfile
http://httpd.guru/logs19Dec.tar.gz
and this is the output of my php.ini
[AppDynamics Agent]
extension = appdynamics_agent.so
agent.log4cxx_config = /app/appdynamics-php-agent/php/conf/appdynamics_agent_log4cxx.xml
agent.php_agent_root = /app/appdynamics-php-agent
agent.controller.hostName = httpd.guru
agent.controller.port = 18090
agent.applicationName = KL28
agent.tierName = KL28TIERS
agent.nodeName = KL28_NODE
agent.accountName = customer1
agent.accountAccessKey = SJ5b2m7d1$354
and i want to add that the Java process is going away and starts up every few seconds though
which causes high CPU utilization
Best Regards,
Hi rootsami,
Thanks for providing the logs. proxy logs were not having any usable information as they were truncated possibly because java proxy agent looks to be not stable in your environment and starts up every few seconds. Let us try to launch proxy component manually and see the results. Below are the steps you can follow to achieve the same.
1) Create a directory in /tmp on which the apache/php user has read and executable permissions.
2) Add / Update two directives to your appdynamics_agent.ini
3) agent.auto_launch_proxy = 0
4) agent.proxy_ctrl_dir = dir you created in step 1
5) If there is an agent running, stop Apache, and kill any leftover java proxy processes
6) cd <AppDinstallPath>/proxy
7) nohup ./runProxy -- "dir you created in step 1" <AppDinstallPath>/logs &
Then start Apache
This should allow you to have one running Java proxy component, a communications directory which both that component and the extension know about, and an extension which will not try and launch a proxy component automatically.
Do let me know if you hit any roadblocks.
Also I could notice that you have "agent.accountName" and "agent.accountAccessKey" in your config values and I assume that the controller is running in a multi tenant mode. Correct me if otherwise.
Best Regards,
Piyush
Dear Piyush,
thanks for your support..
i followed your steps .. now it providing actual logs
attached the new logs + the nohup.out for running the proxy
its still not detecting any load
for the multi tatnent its just i added them in case it was needed .. im running a single tanent
http://httpd.guru/logs19-2Dec.tar.gz
best Regards,
Hi rootsami,
Thanks for trying out the suggested steps. From provided logs I could spot a few issues including "Too many open files" for proxy service. Also as you mentioned that this is single tenant controller so please remove "agent.accountName" and "agent.accountAccessKey" from the config files then restart the proxy component and then apache to reconsider the updated config values. After these steps if the issue still persists, can you please provide me the recent AppD related config values in INI file and the exact command you executed to start the proxy manually.
Thanks for your patience.
Best Regards,
Piyush
Dear Piyush,
i applied all above..
this is my php.ini
[AppDynamics Agent]
extension = appdynamics_agent.so
agent.log4cxx_config = /app/appdynamics-php-agent/php/conf/appdynamics_agent_log4cxx.xml
agent.php_agent_root = /app/appdynamics-php-agent
agent.controller.hostName = httpd.guru
agent.controller.port = 18090
agent.applicationName = KL28
agent.tierName = KL28TIERS
agent.nodeName = KL28_NODE
agent.auto_launch_proxy = 0
agent.proxy_ctrl_dir = /app/proxyComu
and my run command is
nohup ./runProxy -- /app/proxyComu /app/appdynamics-php-agent/logs &
please look into my nohup.out because i see some errors ..
really thanks for the great support and efforts
i hope we can get along with this as my trial has ended and we cannot purchase if this is not working yet
Best regards,
Hi rootsami,
From the attached logs, I could see the agent is still trying to connect to proxy at a wrong location.
23:57:08,774 WARN [Thread-0] AgentErrorProcessor - Agent error occurred, [name,transformId]=[com.singularity.proxyControl.ZeroMQControlServer - java.io.FileNotFoundException,2147483647]
23:57:08,774 WARN [Thread-0] AgentErrorProcessor - 4 instance(s) remaining before error log is silenced
23:57:08,774 ERROR [Thread-0] ZeroMQControlServer - Error while handling a startNodeRequest
java.io.FileNotFoundException: /app/appdynamics-php-agent/proxy/0 (No such device or address)
Can you please provide me complete output of "ps -ef | grep java | grep php" command. Regardind the trial license, please contact your account manager for the extension.
Best Regards,
Piyush
Hi Piyush
here's the output
/app/appdynamics-php-agent/proxy/jre/bin/java -server -Xmx300m -Xms50m -classpath /app/appdynamics-php-agent/proxy/conf/logging:/app/appdynamics-php-agent/proxy/lib/*:/app/appdynamics-php-agent/proxy/lib/tp/*:/app/appdynamics-php-agent/proxy/* -Djava.library.path=/app/appdynamics-php-agent/proxy/lib/tp -Dappdynamics.agent.logs.dir=/app/appdynamics-php-agent/logs -Dcomm=/app/proxyComu -DagentType=PHP_APP_AGENT -Dappdynamics.agent.runtime.dir=/app/appdynamics-php-agent/proxy -Dlog4j.ignoreTCL=true -XX:MaxPermSize=120m -XX:-UseGCOverheadLimit com.appdynamics.ee.agent.proxy.bootstrap.ProxyEntryPoint
Best Regards,
Hi rootsami,
Thanks for providing the details. The proxy config seems to be absolutely fine and should work. Can you verify once, in the "phpinfo()" the value of "agent.proxy_ctrl_dir" should be "/app/proxyComu".
- If it is not matching then request you to stop and start Apache and verify.
- If it is matching, I suspect this is something related to permission so try to create "proxyComu" directory under "/tmp" and provide 777 permission (for testing purpose) and then update the same in PHP config values as well as in the "runProxy" command and see if it works.
Best Regards,
Piyush