I'm trying to integrate AppAgent into a small C app. I'm doing a successful AppAgentInit, and then a AppAgentStart call. There are no obvious indications that it doesn't work, except that "nxappget" says "ERROR: Cannot connect to application agent" when I run it with the app name supplied in the APPAGENT_INIT struct. When configuring the local nxagentd with an AppAgent, it outputs the same error message in the logs periodically.
I've narrowed it down to the fact that it doesn't create a named pipe in /tmp as I would expect from reading the source. But I get no indication as to why. I've tried as root as well without success, so it doesn't seem to be a permission issue.
There's no helpful log output anywhere.
I'm using the libraries from NetXMS 3.5.152 source package on a Ubuntu 18.04 machine.
Init data:
The call in main():
At this point I start the rest of the application logic, which works well. But the AppAgent part just won't work. I'm not even sure that the pipe listener thread is running at all, and I'm not sure how to check it.
Do you have any hints on where to look for faults?
Thank you in advance!
I've narrowed it down to the fact that it doesn't create a named pipe in /tmp as I would expect from reading the source. But I get no indication as to why. I've tried as root as well without success, so it doesn't seem to be a permission issue.
There's no helpful log output anywhere.
I'm using the libraries from NetXMS 3.5.152 source package on a Ubuntu 18.04 machine.
Init data:
Code Select
static APPAGENT_INIT m_info =
{
_T("VRECLIENT"),
_T("root"),
handleMessage,
logger,
1,
m_parameters,
0,
NULL,
0,
NULL
};
The call in main():
Code Select
printf("Initializing AppAgent...\n");
if (!AppAgentInit(&m_info))
{
printf("Init failed!\n");
}
printf("Starting AppAgent...\n");
AppAgentStart();
At this point I start the rest of the application logic, which works well. But the AppAgent part just won't work. I'm not even sure that the pipe listener thread is running at all, and I'm not sure how to check it.
Do you have any hints on where to look for faults?
Thank you in advance!