Protocol mismatch error

Problem

You see errors in your daemon log file after upgrading your agent like this:protocol mismatch: A.B != X.Y.

Solution

  1. Ensure your agent and daemon are both up to date on the same version number.

  2. Restart your web server (Apache, Nginx, PHP-FPM, etc.).
  3. If the number A.B is less than the number X.Y, it means that you have an out of date agent trying to communicate with a more modern daemon.

    If the number A.B is higher than the number X.Y, then it means that your daemon is out of date, and the most likely cause is that you have too many daemons running. In this case, kill all of the currently running newrelic-daemon processes, and restart the daemon using /etc/init.d/newrelic-daemon start.

Cause

The only reason for this error is that your agent and daemon are out of sync with each other. The daemon and the actual agent (the PHP extension) are a very tightly coupled pair, and the daemon will only accept connections and commands from an agent that matches it.

Sometimes the upgrade process will fail to kill the old daemon correctly and you may still have old daemon processes running. Frequently, this error is caused by not restarting your web server after an upgrade. If the daemon was upgraded correctly, but your web server still contains older agents, you will see this error. The error itself points to which one is out of date.

For more help

Additional documentation resources include PHP Agent Troubleshooting (individual topics describing common problems, causes, and solutions for your PHP agent installation).

Join the discussion about PHP in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.