uberAgent fails to start on UniconOS/eLux with "Could not find configuration file /etc/uberAgent/uberAgent.conf"

book

Article ID: CTX697250

calendar_today

Updated On:

Description

Applies to: UniconOS / eLux 7 (observed on 7.2607.2), uberAgent 8.x delivered as a UniconOS package, with configuration deployed through Device configuration → Files.

How uberAgent reads its configuration on UniconOS

uberAgent reads its configuration from one location only: /etc/uberAgent/uberAgent.conf. On UniconOS the root filesystem is read-only, so the uberAgent package creates a symbolic link during installation, /etc/uberAgent pointing to /setup/uberAgent.

/setup/uberAgent is a writable directory and is uberAgent's working directory. It also contains the agent's own runtime folders, OutputQueue and PersistentStorage. The correct destination for the configuration file is therefore /setup/uberAgent/uberAgent.conf. Administrators do not need to create the link or interact with /etc/uberAgent directly.

Typical log output

The uberAgent log shows the daemon initialising correctly, detecting the managed device and validating the licence, and then exiting at the configuration read with ERROR,ReadConfiguration,Could not find configuration file /etc/uberAgent/uberAgent.conf, followed by Daemon,Shutting down daemon....

Cause 1 — Trailing space in the destination file path

If the Destination file field contains a trailing space, for example /setup/uberAgent/uberAgent.conf followed by a space, the device creates a file whose name genuinely ends in a space. uberAgent opens uberAgent.conf and does not find it, because the two filenames differ.

A trailing space is not visible in a normal directory listing. ls -la displays the file as uberAgent.conf and everything appears correct.

To confirm, run ls /setup/uberAgent/ | od -c on the device. This displays every byte of the filename. A correct filename ends immediately with \n. An incorrect filename shows a space character between the final f and the newline. An equivalent check is ls -la /etc/uberAgent/uberAgent.conf, which fails if the name is not an exact match.

Cause 2 — Destination changed between /etc/uberAgent and /setup/uberAgent

Because /etc/uberAgent is a symbolic link to /setup/uberAgent, the paths /etc/uberAgent/uberAgent.conf and /setup/uberAgent/uberAgent.conf refer to the same file on disk.

If the destination is configured as one of these paths and later changed to the other, the device delivers the file to the new path and then removes the previously configured path as part of normal cleanup. Because both resolve to the same file, the newly delivered file is deleted.

The device then records the configuration as successfully applied. On subsequent restarts it detects no change and performs no file transfer, so the file is not restored automatically. The result is that the management console shows the file as correctly deployed while the device has no configuration file at all, and uberAgent fails to start at every boot.

To confirm, run ls -la /setup/uberAgent/. The directory contains OutputQueue and PersistentStorage but no uberAgent.conf.

Configuration changes require a restart, and uberAgent may need two

Files configured under Device configuration → Files are transferred to the device only during startup. Saving a change in the console does not deliver it to a running device.

In addition, uberAgent starts approximately 10 seconds after boot and stops retrying approximately 13 seconds after boot, while configuration files are delivered approximately 14 to 15 seconds after boot. On the first restart after a configuration change the file therefore arrives shortly after uberAgent has already stopped. This is expected behaviour, and uberAgent starts normally on the next restart.

Resolution

If the destination path contains a trailing space

Open the uberAgent.conf file entry in the management console and correct the Destination file value to /setup/uberAgent/uberAgent.conf, ensuring there is no space at the end of the path. Save the configuration, then restart the device twice, or follow the manual start procedure described below.

If the configuration file is missing after a path change

The configuration must be changed so that the device performs a new file transfer.

First, open the uberAgent.conf file entry and re-upload the source file. Leave the destination as /setup/uberAgent/uberAgent.conf and do not retype it, then save the configuration.

Next, restart the device. The file is restored during this restart, but uberAgent will not yet be running. Verify that the file is present using ls -la /setup/uberAgent/ /etc/uberAgent/uberAgent.conf.

Finally, restart the device once more. uberAgent now reads its configuration at startup and resumes sending data.

If the first restart does not restore the file, the re-upload was not registered as a configuration change. In that case, remove the file entry, save, then add it again with the same destination path and save. Take particular care that the path contains no trailing space.

Avoiding the second restart

Once the configuration file is present on the device, the service can be started manually instead of rebooting again. Run systemctl reset-failed uberAgent followed by systemctl start uberAgent. The reset-failed command is required because the service start limit is reached after the repeated startup attempts.

Verifying a working configuration

The file /var/log/uberAgent/uberAgentConfiguration.log shows the configuration being read successfully, beginning with Start reading configuration file /etc/uberAgent/uberAgent.conf, then Reading config file </etc/uberAgent/uberAgent.conf>, followed by the individual configuration sections.

A correctly configured device shows the configuration file alongside the agent's runtime folders when running ls -la /setup/uberAgent/, listing OutputQueue, PersistentStorage and uberAgent.conf.

Errors referring to uberAgent-ESA.conf or uberAgent-eventdata-filter.conf are not fatal. These optional files are only required if the corresponding features are used.

Prevention

Configure the destination as /setup/uberAgent/uberAgent.conf and do not change it afterwards. Avoid configuring /etc/uberAgent/uberAgent.conf as a destination, even though it resolves to the same file.

Issue/Introduction

uberAgent does not start on a UniconOS (eLux) thin client and no data reaches the configured receiver. The uberAgent log shows the daemon initialising correctly and then exiting with "Could not find configuration file /etc/uberAgent/uberAgent.conf", even though the configuration file appears to be correctly deployed in the management console and appears present on the device.

This occurs when the configured destination file path does not exactly match the filename uberAgent expects, or when the destination path was changed between /etc/uberAgent and /setup/uberAgent, which both refer to the same file. In the second case the configuration file is removed from the device and is not redelivered automatically.