Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - pvo

#61
General Support / Stacked graph error
May 11, 2020, 11:03:20 PM
I have probably found an error in stacked graph presentation.
If I have a stacked graph on the Performance tab it is displayed correctly.
After double click on the graph a new tab with this graph is open but this new graph is not stacked.

I can check the Stacked option in the Properties of the graph tab after opening and the graph is displayed correctly but I think it is an error that this setting is not taken from the original Performance tab. I think it is confusing that after double click on a performance graph a graph in another format is displayed.

I have attached a template with Dummy DCIs from my test therefore you can easily reproduce the problem.

#62
I've tried a new fresh installation with the latest Debian packages 3.2.472 and the rights are OK.
#63
It was fresh 3.2. installation and I've used Debian Buster packages therefore I'm not sure about the exact version but I guess it was 3.2.400.
#64
I was logged in as admin, but the Admins group didn't have the "Manage web service definitions". It works now, thank you for your help.

I didn't modify the Groups rights therefore it is probably default setting. It is strange. I thought that the Admin group has all rights. Why is this right an exception?
If there is difference in database initialization and for other databases is it OK. I use the PostgreSQL database.
#65
When I open Configuration - Web Service Definitions in the Web Management Console or in the Windows Management Console I get following error message: "Cannot get web service definitions: Access denied".
What does this error mean?
#66
I did a new test with different waiting times (0, 1, 2, 5, 10, 0 and 1s) only the last try was successful and the call has returned the value 5.
I've attached the captured ssh communication which was done localy only (from agent on the same RPi) therefore the network cannot be the source of the problem.
I've attached the source of my test program, but it is very simple.

Here is the filtered agent log (the full log is attached):
2020.04.15 09:03:24.435 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 0 5")"
2020.04.15 09:03:24.736 *D* [                   ] SSH: created new session [email protected]:22/1
2020.04.15 09:03:24.841 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:03:34.496 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 1 5")"
2020.04.15 09:03:34.496 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:03:35.517 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:03:42.637 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 2 5")"
2020.04.15 09:03:42.637 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:03:44.657 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:03:52.416 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 5 5")"
2020.04.15 09:03:52.416 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:03:57.436 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:04:03.635 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 10 5")"
2020.04.15 09:04:03.635 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:04:03.917 *D* [comm.cs.1          ] Received message CMD_KEEPALIVE (146)
2020.04.15 09:04:13.656 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:04:20.165 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 0 5")"
2020.04.15 09:04:20.165 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:04:20.185 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.15 09:04:29.965 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 1 5")"
2020.04.15 09:04:29.966 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.15 09:04:30.986 *D* [comm.cs.1          ] GetListValue(): result is 0 (SUCCESS)

#67
The time the error occurs depends on waiting time in seconds in my test program (first parameter of the program). In one test I've used the value 0, therefore the program ended immediately in other tests I've used the waiting time 1s.

2020.04.09 13:34:04.416 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 1 5")"
2020.04.09 13:34:04.722 *D* [                   ] SSH: created new session [email protected]:22/1
2020.04.09 13:34:05.828 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.09 13:34:12.345 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 1 5")"
2020.04.09 13:34:12.345 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.09 13:34:13.366 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.09 13:34:19.436 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 0 5")"
2020.04.09 13:34:19.436 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.09 13:34:19.456 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)
--
2020.04.09 13:34:30.496 *D* [comm.cs.1          ] Requesting list "SSH.Command(192.168.18.134,"pi","raspberry","/opt/disp_ctrl/mon_c 1 5")"
2020.04.09 13:34:30.496 *D* [                   ] SSH: acquired existing session [email protected]:22/1
2020.04.09 13:34:31.517 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)


I will take the tcpdump tomorrow and I will try to use more different waiting times.
#68
I don't think it is due to timeout. I've tested it with AgentCommandTimeout = 30000.

I've started a test script calling my test program manually and it always returned after specified waiting time. I the log I sent I only used the waiting time 0s and 1s, but I've tested it with longer waiting times too 10s and 20s and event in this case the script returned after 10s and 20s.
#69
On CentOS the libssh can be installed as a package.
Compiling form sources works fine.

It even works with ssh.nsm copied from Debian package but libpcre.so.3.13.3, libpcre32.so.3.13.3 are missing on CentOS and cannot be installed as packages therefore these libraries must be copied too.
#70
I use executeSSHCommand in my script and it sometimes doesn't return value. I've set  DebugLevel = 9 and there is following message in the agent log:
2020.04.09 13:12:51.493 *D* [comm.cs.1          ] GetListValue(): result is 500 (INTERNAL_ERROR)

The behavior is very strange. The problem occurs only on Raspberry Pi or on x64 linux accesed from other server and even in this case it doesn't occur every time.
I wrote a C program to test it. It has two parameters first is sleep time in seconds a the second one is the return value (output to stdout).


The log is attached.
   

#71
I've found that the ssh.nsm is missing in nxagent-3.2.451-linux-x86_64.tar.gz and nxagent-3.2.451-linux-x86_64.apkg.
The Debian package seems to be OK.

Is it an intention or it was removed by mistake?
#72
General Support / Re: Source node and templates?
March 26, 2020, 07:20:53 PM
I'm a stupid newbie. I've tested the output from  executeSSHCommand with println and it cannot write an array.

This works fine:
ret = $node->executeSSHCommand("/opt/test/test.sh");

println ArrayToString(ret, "\n");  // prints all lines
println ret[0];  // prints first line only
#73
General Support / Re: Source node and templates?
March 26, 2020, 12:09:55 AM
I've checked the source code for the executeSSHCommand function and if I understand it right the output of the ssh command is converted to a string array and stored in the memory specified by the C result variable.
Unfortunately I don't know how to access these data form a nxsl script.

I've seen that lot of other nxsl functions return void as well as the the executeSSHCommand function does. Therefore I guess there is some posibility to access these data, but I didn't found any example.

Without output form the ssh command the executeSSHCommand doesn't help me to to implement the script DCI calling ssh command.

Can anybody help me?
#74
General Support / Re: Source node and templates?
March 24, 2020, 03:21:35 PM
There is a problem with this solution.

The executeSSHCommand doesn't return any values. It even doesn't return any error if the command was not found.
#75
General Support / Source node and templates?
March 24, 2020, 11:18:47 AM
I have some SSH DCIs which run the ssh commands on different server using Source node setting.
It works fine when I configure the DCI directly on a Node but different Nodes needs to use different Source nodes therefore I have problem to convert these commands to templates.

When I set  the Source node in the template the same Source node is copied to all Nodes a when I leave it empty it is empty on all Nodes.

I've tried to set the SSH Proxy on the Node, but it is not used by the SSH DCIs. I probably din 't understood the SSH Proxy functionality and I didn't find any description in the Administrator Guide.

What is the reason for SSH Proxy and how it works?

Is it possible to configure what I need (= different Source nodes for DCIs assigned from a template)?

Thank you in advance for any help.