External Parameter fail for agent daemon mode
-
Hi All,
I'm using external parameters in nxagentd.conf file, one of them:
ExternalParameter = CF2PRIVATEMEM:privatemem.sh
If I launch nxagentd -f -D 9 it executes and reads the parameter correctly
[12-Aug-2016 14:30:59.404] [DEBUG] [session:0] Received message CMD_GET_PARAMETER
[12-Aug-2016 14:30:59.404] [DEBUG] [session:0] Requesting parameter "CF2PRIVATEMEM"
[12-Aug-2016 14:30:59.404] [DEBUG] H_ExternalParameter called for "CF2PRIVATEMEM" "Eprivatemem.sh"
[12-Aug-2016 14:30:59.404] [DEBUG] RunExternal called for "CF2PRIVATEMEM" "Eprivatemem.sh"
[12-Aug-2016 14:30:59.404] [DEBUG] RunExternal: command line is "privatemem.sh"
[12-Aug-2016 14:30:59.405] [DEBUG] RunExternal (shell exec): worker thread created
[12-Aug-2016 14:30:59.502] [DEBUG] H_ExternalParameter/POpenWorker: worker thread pipe read result: 0x7f8e8f5a5d70
[12-Aug-2016 14:30:59.503] [DEBUG] RunExternal (shell exec): execution status 0
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 56)
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] Outgoing message dump:
** 001D0000000000380000001800000002
** 0000001C000000000000000000000000
** 00000015010000000000000C00340037
** 0037003300310032
** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0000 id=24 size=56 numFields=2
** [ 28] INT32 0
** [ 21] STRING "477312"However if I launch in daemon mode nxagentd -d -D 9 then I get the following
[12-Aug-2016 14:29:31.930] [DEBUG] [session:0] Received message CMD_GET_PARAMETER
[12-Aug-2016 14:29:31.930] [DEBUG] [session:0] Requesting parameter "CF2PRIVATEMEM"
[12-Aug-2016 14:29:31.930] [DEBUG] H_ExternalParameter called for "CF2PRIVATEMEM" "Eprivatemem.sh"
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal called for "CF2PRIVATEMEM" "Eprivatemem.sh"
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal: command line is "privatemem.sh"
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal (shell exec): worker thread created
[12-Aug-2016 14:29:31.936] [DEBUG] RunExternal (shell exec): execution status 0
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] Outgoing message dump:
** 001D0000000000300000001900000002
** 0000001C000000000000000000000000
** 00000015010000000000000000000000
** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0000 id=25 size=48 numFields=2
** [ 28] INT32 0
** [ 21] STRING ""Which is wrong. Current version of server and agent is 2.0.5 and it does not work here.
When I had version 1.2.17 it worked correctly. -
-
Try to remove "Defaults requiretty" from /etc/sudoers
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login