News:

We really need your input in this questionnaire

Main Menu
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 - 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
After you fix the bus. I hope you can tell me how to fix it detailly in these post
Thanks ;D
#3
General Support / Re: About Mysql Database
June 12, 2012, 09:19:00 AM
idata_XXX the "XXX" is the node object ID. The table is use to store the DCI data. These table create when a new agent object is found
#4
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.
#5
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!
#6
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!
#7
General / Re: About the repeat Node object problem
February 23, 2012, 04:58:32 PM
     Oh,I am sorry for my simple summarize. I am not in the office,so I can not capture a picture on it.
     But I can tell you,the node's IP is 10.0.12.254,it have only one interfacer(it also show only one interface object on the object tree,too).The system is windows 2000.
     When a time I open active discovery and passive discovery but it can not detect the agent soon(may be it can not get the arp information about that agent),so I try to create that node with it's IP by myself manual operation(with console).
    The note object was add immediately in the object tree,but after a while,the other repeat node object also appear. 

    How I can fix that problem(or how I can avoid it)?
Thanks
#8
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?
#9
Thanks you :)
#10
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!
#11
General / Re: About the discover poll
December 22, 2011, 11:22:18 AM
Very thank you for answering me so carefully and so rapidly

In all, the theory of it is :

1、The DiscoveryPoller() is deal with the existing Network Node and find out the candidate nodes by arp/route table and deliver to the NodePoller()

2、The  NodePoller() is validation the candidate nodes and Create the real Network Node.    And The new create Network Node deliver to the DiscoveryPoller()

The above workflowis a cycle flow.

And the first existing Network Node in the Server itself and be create by CheckForMgmtNode().


It that right ?

#12
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!
#13
Thank you very much
#14
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!  
#15
General / Re: How to get the "object tree" and
November 17, 2011, 04:48:52 AM
Thank you very much