WebServer agent shared memory mismatch

Environment

AppMon: all version

(AppMon Agent is not affected)

Symptoms

The logs of a Web Server agent (master- or sub agent) contains similar lines:


warning [native] Detected version mismatch in shared memory segment. This agent has version: 6.1.0.8154, SHM is written with version: 6.1.0.7880. Not syncing. When rolling out a new dynaTrace version (or fixpack), make sure to bounce both the web server agent service and the web server itself (Apache/IIS). Waiting for agent to re-initialize the data. Suppressing this warning.

This issue might also lead to the sub-agent not being able to report any data to the server.

Solution

Make sure that both the related master and sub agents have been restarted after every update. This is necessary because each agent component (master/slave agent) performs the update individually during their respective startup sequences.

If you are not sure which agent component is falling behind on the version, you can verify it either from the DT client in the Agent Overview dashboard or in the logs of the agent component:


2017-05-15 08:31:44.171787 [2984/0000023c] info [native] ------------------------------------------------------------------------------------------
2017-05-15 08:31:44.171787 [2984/0000023c] info [native] Dynatrace Agent for Web server Copyright (C) 2004-2016 Dynatrace, http://www.dynatrace.com
2017-05-15 08:31:44.171787 [2984/0000023c] info [native] ------------------------------------------------------------------------------------------
2017-05-15 08:31:44.171787 [2984/0000023c] info [native] Version ..................... 6.5.0.1289, build date Sep 16 2016 08:48:48, svn rev. 654178

Most of the time the solution is to restart the master agents once. This can be done from the agent overview screen in the client. Just right-click the webserver master agent > restart (admin permissions are required).

Root cause

For the master <-> sub-agent communication to work without risk of different protocol versions (and thus potential conflicts), the same exact versions have to be active on both components at startup. Our agents perform this mandatory check on every startup to prevent a protocol version mismatch from leading to more serious issues.

Warning

The most common root cause for this issue is that master-agents are not restarted after an update has been installed. The sub-agents will receive an update when a workprocess is restarted. The webserver master agent however need to be restarted manually to apply the update. If the master agent is not restarted, the sub-agents can have a new version than the master agent, therefore causing this problem.