Assets Discovery agent throws "Value cannot be null. Parameter name: localaddr" error when starting
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Users may encounter an issue where the Assets Discovery Agent fails to start, displaying errors related to loading settings from the config file and starting the server, specifically mentioning a null value for the parameter localaddr
. This issue prevents the Assets Discovery Agent from functioning correctly.
5/13/2024 1:44:15 PM: [Normal] Could not load settings from config file or file is not up to date. Getting settings from backup file...
5/13/2024 1:44:15 PM: [Error] Error starting Server
5/13/2024 1:44:15 PM: [Normal] Exceptions:
5/13/2024 1:44:15 PM: [Normal] Value cannot be null.
Parameter name: localaddr
at System.Net.Sockets.TcpListener..ctor(IPAddress localaddr, Int32 port)
at Insight.Discovery.Tools.Networking.NetServer.StartServer()
5/13/2024 1:44:15 PM: [Error] AgentServer did not start!
Environment
Assets Discovery Agent
Diagnosis
The <UseAllNetworkInterfaces> parameter is set to false in the Agent.cfg file.
Cause
The error logs indicate that the Assets Discovery Agent is unable to retrieve the Server IP address. This is typically due to the Agent's inability to determine the correct network interface to use for its operations.
Solution
To fix the issue we could configure the Agent to listen to any active network interface:
- Stop the Agent Service (Discovery Agent Service) in Windows Services
- Edit the Agent.cfg file
- Locate the <UseAllNetworkInterfaces> parameter
- Modify the value to true (it is set to false by default)
<UseAllNetworkInterfaces>true</UseAllNetworkInterfaces>
- Save the file
- Start the Agent Service