'Failed to find matching configuration' unexpectedly displayed in vfagent.net.log
Overview of the Issue
This issue occurs in the following circumstances:
- An organization uses Azure App Services to deploy a .NET Application
- The Application includes multiple processes that need to separately be tracked by vFunction
- The organization creates an Application Setting for the Key VF_MULTI_AGENT_CONF_LOCATION and points to a static configuration.json
- The configuration.json is configured with required values for each process
[
{
"log_conf": {
"level": "debug",
"target_file": "C:\\home\\vfunction\\log\\instances\\Organization.Domain.Director\\vfagent.net.log"
},
"port": 9779,
"instance": "Organization.Domain.Director",
"shared_folder": "C:\\home\\vfunction\\controller\\instances\\Organization.Domain.Director\\temp",
"cmd" : "dotnet Organization.Domain.Director.dll"
},
{
"log_conf": {
"level": "debug",
"target_file": "C:\\home\\vfunction\\log\\instances\\Organization.Domain.Manager\\vfagent.net.log"
},
"port": 9780,
"instance": "Organization.Domain.Manager",
"shared_folder": "C:\\home\\vfunction\\controller\\instances\\Organization.Domain.Manager\\temp",
"cmd" : "dotnet Organization.Domain.Manager.dll"
}
]
- The C:\home\vfunction\log\instances\Organization.Domain.Manager\vfagent.net.log or %TMP%\vfagent.net.log throws the following error
[2024-06-30 16:33:55.854+00:00] [pid 3844] [tid 7924] [vfagent.net] [info] [::] Logging initialized
[2024-06-30 16:33:55.854+00:00] [pid 3844] [tid 7924] [vfagent.net] [info] [ProfilerModule.cpp:ProfilerModule::init:140] loading vfagent.net 3.6.1418
[2024-06-30 16:33:55.854+00:00] [pid 3844] [tid 7924] [vfagent.net] [info] [ProfilerModule.cpp:ProfilerModule::init:141] cmd line: dotnet Organization.Domain.Manager.dll
[2024-06-30 16:33:55.854+00:00] [pid 3844] [tid 7924] [vfagent.net] [info] [ProfilerModule.cpp:ProfilerModule::init:144] failed to load configuration, aborting agent, err: Failed to find matching configuration in multi conf file cmd: dotnet Organization.Domain.Director.dll, configured: [dotnet Organization.Domain.Director.dll, dotnet Organization.Domain.Manager.dll]
Steps to Resolve the Issue
This issue can be resolved by taking the following steps:
- Copy the exact “cmd line” from the vfagent.net.log. In the example above, there are two spaces between “dotnet” and the name of the DLL in the “cmd line” whereas the configuration.json was configured with only one space
- Paste the “cmd line” from the vfagent.net.log into the process-specific CMD configuration.json used for the VF_MULTI_AGENT_CONF_LOCATION
[
{
"log_conf": {
"level": "debug",
"target_file": "C:\\home\\vfunction\\log\\instances\\Organization.Domain.Director\\vfagent.net.log"
},
"port": 9779,
"instance": "Organization.Domain.Director",
"shared_folder": "C:\\home\\vfunction\\controller\\instances\\Organization.Domain.Director\\temp",
"cmd" : "dotnet Organization.Domain.Director.dll"
},
{
"log_conf": {
"level": "debug",
"target_file": "C:\\home\\vfunction\\log\\instances\\Organization.Domain.Manager\\vfagent.net.log"
},
"port": 9780,
"instance": "Organization.Domain.Manager",
"shared_folder": "C:\\home\\vfunction\\controller\\instances\\Organization.Domain.Manager\\temp",
"cmd" : "dotnet Organization.Domain.Manager.dll"
}
]
- Restart the Azure App Services instances or the individual processes