Hello,
between a SNMP-Device and the WinCC-SNMP-Driver is a unstable connection.I thought the WinCC-SNMP-driver tries to reconnect regularly, but that is apparently not the case. How can I trigger a reconnect when ConnState = False manually or by script? Currently I am restarting the driver manually. Didn't found anything on the doc.
Thanks for your Help.
SNMP Agent automatic reconnect
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: SNMP Agent automatic reconnect
According to the information I have found in the WinCC OA Documentation the driver checks if the agents are alive.
Have you set any specific config entries for the SNMP driver?
Possibly with the debug flag "-dbg 2" you can get more information for the tasks running in the SNMP driver.
Best Regards
Leopold Knipp
Senior Support Specialist
Have you set any specific config entries for the SNMP driver?
Possibly with the debug flag "-dbg 2" you can get more information for the tasks running in the SNMP driver.
Best Regards
Leopold Knipp
Senior Support Specialist
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: SNMP Agent automatic reconnect
You could better use the 'Timeout' element for monitoring if the device is responding. Because SNMP uses the UDP protocol, which is connectionless.
- n.kuehl
- Posts:28
- Joined: Mon Mar 18, 2019 9:35 am
Re: SNMP Agent automatic reconnect
True, but it does only reconnects "Access.Retries"-times, which maximum is set to 10. With the maximum timeout of 10s you can only bridge 100s downtime of the decentralized device, which is way too small! After these 100s the Agent never reconnects, i have to restart the full driver to fix it. Therefore i want to trigger a reconnect by script, has somebody an idea?
Here the Doc-Entries i refer to:
Access.Timeout uint
The timeout for SNMP messages in 1/100 seconds. This means that a reply to a message has to be sent before this timeout elapses. The default value is 100 (=1s). It might be necessary to increase the timeout in case of slow networks /agents . Valid values are 100 - 1000 (= 1 - 10secs).
Access.Retries uInt
Retries before a SNMP protocol error is shown. The standard value is 1, maximum 10 retries can be configured.
Here the Doc-Entries i refer to:
Access.Timeout uint
The timeout for SNMP messages in 1/100 seconds. This means that a reply to a message has to be sent before this timeout elapses. The default value is 100 (=1s). It might be necessary to increase the timeout in case of slow networks /agents . Valid values are 100 - 1000 (= 1 - 10secs).
Access.Retries uInt
Retries before a SNMP protocol error is shown. The standard value is 1, maximum 10 retries can be configured.
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: SNMP Agent automatic reconnect
n.kuehl wrote: ↑ Wed Dec 09, 2020 11:54 am Retries before a SNMP protocol error is shown. The standard value is 1, maximum 10 retries can be configured.
Drivers do not stop trying to communicate with devices. Retries refer to the number of retries before an error is reported.
In my experience the 'Status.Timeout' element provides a better indicator than the 'Status.ConnState' element of the SNMP agent. Just compare their values and if there are still values read from the device.
- n.kuehl
- Posts:28
- Joined: Mon Mar 18, 2019 9:35 am
Re: SNMP Agent automatic reconnect
Okay, you are saying, that the SNMP Driver reconnects automatically? Unfortunately I cannot agree with that. I now have the status of the agent in the monitoring, but I am not 24/7 available to restart the driver. It still happens that after a connection loss, the connection is not reestablished, although the connection can be re-established for hours. A connection is only established by restarting the whole driver via Project Console.
That's why I have the question: How can I script a restart of the driver or how can I initiate a reconnect of the SNMP driver?
That's why I have the question: How can I script a restart of the driver or how can I initiate a reconnect of the SNMP driver?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: SNMP Agent automatic reconnect
As described in a previous posting you can possibly get more information by activating a debug flag for the SNMP agent.
If you want to stop a WinCC OA process it can be done by writing the manager ID (CTRL function convManIdToInt) to the _Managers.Exit datapoint element.
When the option "always" is set for a manager in the progs file the Process Monitor will automatically restart the manager.
Best Regards
Leopold Knipp
Senior Support Specialist
If you want to stop a WinCC OA process it can be done by writing the manager ID (CTRL function convManIdToInt) to the _Managers.Exit datapoint element.
When the option "always" is set for a manager in the progs file the Process Monitor will automatically restart the manager.
Best Regards
Leopold Knipp
Senior Support Specialist