openITCOCKPIT icon indicating copy to clipboard operation
openITCOCKPIT copied to clipboard

Agent fails in "Push" configuration if there't never been an agent in "Pull" configuration

Open crl0901 opened this issue 2 years ago • 0 comments

Describe the bug During initial configuration of openITCOCKPIT server, when setting up a new server using the agent and push configuration, it will fail to find services unless there's already been a server setup with the agent in pull configuration.

To Reproduce Steps to reproduce the behavior:

  1. On a new instance of openITCOCKPIT server, run the agent wizard for a server in push configuration.
  2. Agent will fail to initialize properly. You will see the following error in the frontend log: 2021-09-20 15:28:22 Error: [RuntimeException] Config file "/opt/openitc/receiver/etc/production.json" not found in /opt/openitc/receiver/src/itnovum/openITCOCKPIT/Checks/Receiver/CheckConfig.php on line 46 Request URL: /agentconnector/submit_checkdata.json

Expected behavior The agent detects the services initially and finished the configuration of the agent.

Versions

  • openITCOKPIT Server Version: 4.2.3
  • Operating system: Ubuntu 20.04

Additional context The workaround for this issue is to install the agent on the openITCOCKPIT server itself and configure it in pull mode. This will create the required production.json file. You can then go and reconfigure the push agent and it will work.

crl0901 avatar Sep 20 '21 19:09 crl0901