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

Topics - 165432896

#1
General Support / Is it a bug?
June 15, 2012, 06:03:52 AM
hi,victor
    netxms 1.1.6   in /src/server/core/Client.cpp::ClientListener()

while(!IsShutdownInProgress())
   {
      iSize = sizeof(struct sockaddr_in);
      if ((sockClient = accept(sock, (struct sockaddr *)&servAddr, &iSize)) == -1)
      {
         int error;

#ifdef _WIN32
         error = WSAGetLastError();
         if (error != WSAEINTR)
#else
         error = errno;
         if (error != EINTR)
#endif
            nxlog_write(MSG_ACCEPT_ERROR, EVENTLOG_ERROR_TYPE, "e", error);
         errorCount++;
         if (errorCount > 1000)
         {
            nxlog_write(MSG_TOO_MANY_ACCEPT_ERRORS, EVENTLOG_WARNING_TYPE, NULL);
            errorCount = 0;
         }
         ThreadSleepMs(500);
      }

      errorCount = 0;     // Reset consecutive errors counter

      // Create new session structure and threads
      pSession = new ClientSession(sockClient, (struct sockaddr *)&servAddr);
      if (!RegisterSession(pSession))
      {
         delete pSession;
      }
      else
      {
         pSession->run();
      }


when accept error, The sockClient is -1, Then ThreadSleepMs(500);  but it will continue to create ClientSession with the wrong sockClient .
Don't it we should insert " continue; " after ThreadSleepMs(500); to skip this round cycle.
#2
Hi victor,
    In netxmns 1.1.6. The server is normally work at most time, But sometimes I can not connect server by my own client that I write with java api. Then I try to connect it by the official console,but it also failure,it said:Unable to connect:Request timed out.. ----but the server is keep success get the agent DCI date and write it to database.
    After I restart the server,both my own client and official console can connect to the server. So I think That problem may not cause by my own client.

----------------------------------------------
So I use the GDB to debug it. I found that problem cause by the resource competition with the lock:

In Client.cpp: ClientListener()--->if (!RegisterSession(pSession))
When the ClientSessioncreate create , it will register. But the "m_rwlockSessionListAccess" is lock. So the client cann't get the response by the client,and It disappear "Unable to connect:Request timed out."


Who get the "m_rwlockSessionListAccess" and not release it?
I found that it is in the client.cpp-->NotifyClientSessions()-->m_pSessionList->notify(dwCode, dwData); the code is stop in this and it can not continue to run on,so it do not release the "m_rwlockSessionListAccess".

How did the notify() is block?
notify()-->sendMessage()-->SendEx()-->MutexLock(mutex, INFINITE)-->send(nSocket, ((char *)pBuff) + (nSize - nLeft), nLeft, nFlags);
The send() is block(I do not know why).so the lock "m_mutexSocketWrite" is keep locking.

In a world:
Send() is block--> "m_mutexSocketWrite" can not release-->"m_rwlockSessionListAccess" can not release-->client:Request timed out.
-------------------------------------------------------------------

The above is just my speculated, It may need you to check it againg.
Finally,How I should solve that problem?  My friend ask me to set the send() work with unblock(It is block default). By I think it may cause other problem. Is it any good idea?
Thanks.
#3
Hi victor
I deploy netxms in our company. And I use "RunNetworkDiscovery " and found the "switch" in the in the network object tree.

After that,the "switch" come up some wrong message,such as the "SNMP community string is unmatched". 

In safety reason,my boss ask me to stop the server to scanf the switch after the "switch" appear in the object tree
It try to set like that,and restart the server,but the server keep scanf the switch in cycle time
EnableSNMPTraps:0
RunNetworkDiscovery:0
DiscoveryFilterFlags:1
DiscoveryFilter:Filter::Agent


How I can configure it in console to stop the server scanf the switch after the server find the switch object
(in a word,we can see the "switch" in the network object tree,but we don't want it to scanf the switch any longer )

Thanks!
#4
hi,
when I install the agent(1.1.6) in windows 2000 sp4,it can not work and show that:
"The procedure entry point RtlCaptureContext could not be located in the dynamic link library KERNEL32.dll."
Does netxms's agent can not be use in the win2000,how I can fix this problem?
Thanks!
#5
General / About the repeat Node object problem
February 23, 2012, 09:52:45 AM
when I run active discovery and passive discovery to detect the agent. It can be create the repeat node object with the same ip address in a subnet(the PC have only one interfacer but its node object was created in the object tree twice). Even I delete the repeat node object,it will appear soon.
maybe it is the conflict when active discovery and passive discovery work together.How I can fix this problem?
#6
hi Victor:
    My mother language is Chinese.The netxms is 1.1.6. The agent is in windows. The server is centos-5.4. But When the agent's interface name have chinese string.The console cann't display it(It display messy code when it is Chinese.) 
    Maybe it is the encoding problem. But I can not find where the encodeing problem arise(Is it in agent、Server、DB or console?)Can you tell me the which types of encode the agent and the Server used.
    I try to  compile the server with "--enable-unicode" but it can not compile  success.
    Is there any way to make the console display the interfaces name support Chinese string?   ???
Thanks!
#7
General / About the discover poll
December 20, 2011, 02:28:37 PM
Merry Christmas!

That's the workflow I think in the passive discovery polls :
1、The server get it's own Interfaces and create a manager node(The manager node is Server's host itself)
2、When The manager node create,it will be inserted into the Node Queue.(The manager node will be the first node in the queue)
3、The DiscoveryPoller() run for the first time and It get a Node in the Node Queue(The First node is The manager node)
4、Access the Node above and get the arp table or route table information and add the relevant nodes into the  Node Queue.

My question is:
The Node object is create in the DiscoveryPoller.But I can not find when the interface object and the subbet object created in the source code.
Can you point it out for me?

- 10.0.1.0/24    //subnet
  |
   -10.10.1.10   // Node(Server)
    |
     -eth0       //Interface

best wish!
#8
These is the workflow of Threshold:
step 1: (In client)Set a DCI for a node in the console
step 2:(In client)Create a  Threshold for above DCI
Step 3:(In server)When the Server collect data from the node and correspond the Threshold condition it will raise a Event
Step 4:(In server) The Event above can cause a alarm/action

I am develop a client with java api
my question is:How I can  "bind" the Threshold with the DCI  ??? I mean How can I do that with java api to reach step 1 and step 2,I don't know how to set a Threshold with java api.
If you are not such busy,can you offer a model for me with step 1 and step 2!
Best wish :)
Thanks!  
#9
General / How to get the "object tree" and
November 15, 2011, 02:58:52 PM
hi:
I am developping our own console by the client java api(version 1.1.5). my friend have been ask you the get the official java-client(nxmc),but we are incapable the read it(because we are a new hand in java) .

Back to our topic:
I want to get the "object tree" just like below:
Entire Network
  + 10.0.0.0/24
  + 10.0.1.0/24
  - 10.0.2.0/24
     + 10.2.2.3/24
     + 10.2.2.4/24

How can it come true in the official java-client(nxmc)? It that some of the existing java api for it?
Best wish!

If you a free,can you tell me how the "topological graph"(ip neighbors) come true? Is it  come true just like the  "object tree"  above
#10
General Support / About the nxcp_reference.PDF
October 14, 2011, 12:08:28 PM
hi,Victor:
   I have success developed a small client to control(access) the Server with C/C++ in Linux. It bases on the document nxcp_reference.PDF Version 0.2.22.  But I only implement the base functions.  Because The document only cover some base message command(such as:CMD_LOGIN、CMD_GET_LAST_VALUES). But most of the  message command (such as:CMD_GET_MIB_TIMESTAMP、CMD_MODIFY_NODE_DCI、CMD_GET_NODE_DCI_LIST),it is not introduce. so I don't know which "Variable" I should deliver to those message command. I want to develop more senior functions.
   Dose it have some detailed document about the  NetXMS Communication Protocol? or I have to find the rule about the coding regulation by the source code?

Best wish!
Thanks!
#11
There is a few question in netxms 1.0.12:
1、The Server send a request to the Agent and the Agent send a response to the Server,that's the workflow between the Server and the Agent.My first question is:There is too many Agents,if the Server want to send the same request to all the Agents,does it send the requset to the Broadcast address or sent it one by one(it may be a inefficient way).

2、When I open my console,it can generate a Network topology tree include many nodes Automaticly. My question is: Do the Agents will send its "response" with default information to the Server every in Rated time without the Server launch a request? or the Server Automaticly launch a request to the Agents in Rated time without the user Operation.

I have read the source code,but I can not find these part,please help me.

Best wish!
Thanks !
#12
General Support / About the "nxget" tool
September 22, 2011, 12:35:40 PM
Can I get all of the information(Raw data) of the Agent by using the "nxget" tool?  Is any other raw data I can not get by the "nxget" tool?

My boss wants me to monitor the computers and offer him the data about the CPU、Memory、Disk、and network outflow. But I am too lazy too see the source code,so I decide to get these data by "nxget" directly.
#13
I want to modify the client application(especially the Web Interface). But I can not find the API of it. Do anyone can offer me the NetXMS Client Library Programmer's Manual?
Thanks
Best wish!