question

Virdavinder S. avatar image
Virdavinder S. asked ·

PHP Agent is not showing up in agent Overview in AppMon 7.2

php_agent_app_log.png


I am not able to bring up the php agent in AppMon 7.2
PHP Implementation: PHP-FPM is the standalone PHP App served by NGINX and we are using php agents to instrument this implementation.

looks like we are timing out during the bootstrapping, do we need to add wait in the agentpath? If yes, please elaborate on the configuration. please check the screenshot for the error in the application logs.


Vir

configurationappmon 7administration7.2php
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Virdavinder S. avatar image
Virdavinder S. answered ·

We found that the port 8041 between the AppMon server and the collector needed to be opened in the firewall. that was the issue.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Virdavinder S. avatar image
Virdavinder S. answered ·

I found below in the app logs, looks like user that owns the app lost its permissions to dynatrace agent directories. what do you guys think?


2019-08-29 17:41:02 UTC [7fa0e777] warning [native] Agent download directory '/opt/dynatrace-7.2/agent/downloads' not writable: Permission denied (13)

2019-08-29 17:41:02 UTC [7fa0e777] severe [native] bootstrap: Input/output error while reading configuration file '/tmp/dynaTrace/agent/conf/dtwsagent.ini': Unable to open file: No such file or directory

2019-08-29 17:41:02 UTC [7fa0e777] info [native] bootstrap: Detected PHP version 7.2.x: Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies


2019-08-29 17:41:02 UTC [7fa0e777] info [native] bootstrap: Detected non-ts PHP (tsrm_startup absent)

PHP Warning: PHP Startup: dtphpagent (bootstrap failed, see dtagent log for details): Unable to initialize module

Module compiled with module API=0

PHP compiled with module API=20170718

These options need to match

in Unknown on line 0

3 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Agreed, looks like a file permission issue. Be sure the process running PHP has R+W access to the Dynatrace agent directory.

0 Likes 0 · ·

giving permissions to the user didn't solve the issue.

0 Likes 0 · ·

This question has morphed into several issues and is getting difficult to follow and respond. I suggest you reach out to our Support team and open a support ticket. That will ensure you get each issue resolved properly and in a timely manner.

0 Likes 0 · ·
Virdavinder S. avatar image
Virdavinder S. answered ·

When I start the dynaTraceWebServerAgent in /ini.d directory, Web Server agent shows up in agent OV, but I am looking for PHP agent.


2 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Did you try restart your webserver after starting master agent?

0 Likes 0 · ·

it is a standalone PHP implementation, NGINX is just serving PHP-FPM process and sends all the web requests its way.


Vir

0 Likes 0 · ·
Virdavinder S. avatar image
Virdavinder S. answered ·

dynatrace_agent_log_1.png


@Joseph M. H. I don't think we need webserver master agent process running in this case, but property "isMasterAgentServiceInstalled" is set as "true" in dtwsagent.ini file in the agent/conf directory.


@sebastian k. No, there is no firewall between collector and agent, and the network is fine to port 9995.


I just did a clean install and above is the app logs and dynatrace agent logs.

Do you guys know if I can set up wait flag in the agent path? how do I do that for PHP implementation?


Vir


2 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Yes you can add a wait flag to the agent to increase the wait time for a connection, but this wont help, as you're already connected to the collector, as can be seen in the log. Therefore the issue is something else, as suggested by Sebastian.

0 Likes 0 · ·

how do you add the wait flag for php agent?

do we add it in the extension? or dtwsagent.ini?

0 Likes 0 · ·
Joe H. avatar image
Joe H. answered ·

Did you start the Web Server Master Agent process on that host where the PHP process is running?

https://www.dynatrace.com/support/doc/appmon/installation/set-up-agents/php-agent-configuration/

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Sebastian K. avatar image
Sebastian K. answered ·

Are you sure that between agent and collector network is fine? Are there any firewall between? It seems that communication is possible because we have info about connected agent to collector. But no data can be send....

Sebastian

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.