Ignition lost the connection with OPC server

Ignition connects without problems at first but then the connection goes ‘faulted’. To connect again I have to delete the connection and make a new one with a different name. The version of Ignition is 7.3.4 32 bits for Windows. the java version is 1.6.0_16_b01. Her is a part of the wrapper.log

INFO   | jvm 1    | 2012/03/22 08:56:29 | com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040202; CONNECT_E_ADVISELIMIT
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:744)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:723)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.jniwrapper.win32.ole.impl.IConnectionPointImpl.advise(SourceFile:93)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.inductiveautomation.opccom.wrapper.shutdown.ServerShutdownDispatcher.advise(ServerShutdownDispatcher.java:52)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.inductiveautomation.opccom.COMServerImpl$ConnectServerJob.internalRun(COMServerImpl.java:743)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.inductiveautomation.opccom.wrapper.OleJob.run(OleJob.java:47)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:566)
INFO   | jvm 1    | 2012/03/22 08:56:29 | 	at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:508)
INFO   | jvm 1    | 2012/03/22 08:56:29 | INFO  [COMServerImpl                 ] [08:56:29,640]: Server 'Wonderware' state set to [CONNECTED]
INFO   | jvm 1    | 2012/03/22 08:56:48 | INFO  [COMServerImpl                 ] [08:56:48,687]: COMServerImpl.Shutdown
INFO   | jvm 1    | 2012/03/22 08:56:48 | INFO  [COMServerImpl                 ] [08:56:48,687]: Disconnecting server 'Wonderware'
INFO   | jvm 1    | 2012/03/22 08:56:48 | INFO  [COMServerImpl                 ] [08:56:48,687]: Server 'Wonderware' state set to [CLOSED]
INFO   | jvm 1    | 2012/03/22 08:57:37 | INFO  [COMServerImpl                 ] [08:57:37,437]: COMServerImpl.Startup
INFO   | jvm 1    | 2012/03/22 08:57:39 | INFO  [COMServerImpl                 ] [08:57:39,453]: Server 'Wonderware' state set to [CONNECTING]
INFO   | jvm 1    | 2012/03/22 08:57:39 | INFO  [COMServerImpl                 ] [08:57:39,453]: Attempting to connect COM server 'Wonderware'
INFO   | jvm 1    | 2012/03/22 08:57:39 | WARN  [COMServerImpl                 ] [08:57:39,468]: Unable to advise server shutdown hook. Server may not support this functionality.
INFO   | jvm 1    | 2012/03/22 08:57:39 | com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040202; CONNECT_E_ADVISELIMIT
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:744)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:723)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.jniwrapper.win32.ole.impl.IConnectionPointImpl.advise(SourceFile:93)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.inductiveautomation.opccom.wrapper.shutdown.ServerShutdownDispatcher.advise(ServerShutdownDispatcher.java:52)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.inductiveautomation.opccom.COMServerImpl$ConnectServerJob.internalRun(COMServerImpl.java:743)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.inductiveautomation.opccom.wrapper.OleJob.run(OleJob.java:47)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:566)
INFO   | jvm 1    | 2012/03/22 08:57:39 | 	at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:508)
INFO   | jvm 1    | 2012/03/22 08:57:39 | INFO  [COMServerImpl                 ] [08:57:39,468]: Server 'Wonderware' state set to [CONNECTED]
INFO   | jvm 1    | 2012/03/22 08:59:25 | INFO  [LocalDBManagerImpl            ] [08:59:25,140]: Creating auto-backup of internal database "settings"...
INFO   | jvm 1    | 2012/03/22 08:59:25 | INFO  [ENGINE                        ] [08:59:25,171]: dataFileCache commit start
INFO   | jvm 1    | 2012/03/22 08:59:25 | INFO  [ENGINE                        ] [08:59:25,343]: Initiating backup of instance 'settings'
INFO   | jvm 1    | 2012/03/22 08:59:25 | 1 / 4 settings.properties... 
INFO   | jvm 1    | 2012/03/22 08:59:25 | 2 / 4 settings.script... 
INFO   | jvm 1    | 2012/03/22 08:59:25 | 3 / 4 settings.data... 
INFO   | jvm 1    | 2012/03/22 08:59:25 | 4 / 4 settings.lobs... 
INFO   | jvm 1    | 2012/03/22 08:59:25 | INFO  [ENGINE                        ] [08:59:25,562]: Successfully backed up instance 'settings' to 'C:\\Archivos de programa\\Inductive Automation\\Ignition\\data\\db\\autobackup\\db_20120322_085925.tar.gz'
INFO   | jvm 1    | 2012/03/22 08:59:25 | INFO  [LocalDBManagerImpl            ] [08:59:25,671]: Created auto-backup of internal database "settings" in 531 ms
INFO   | wrapper  | 2012/03/22 09:41:50 | User logged out.  Ignored.
INFO   | jvm 1    | 2012/03/22 09:41:50 | WrapperSimpleApp: User logged out.  Ignored.
INFO   | jvm 1    | 2012/03/22 09:41:50 | WrapperSimpleApp: User logged out.  Ignored.
INFO   | wrapper  | 2012/03/22 09:42:07 | User logged out.  Ignored.
INFO   | jvm 1    | 2012/03/22 09:42:07 | WrapperSimpleApp: User logged out.  Ignored.
INFO   | jvm 1    | 2012/03/22 09:42:07 | WrapperSimpleApp: User logged out.  Ignored.
STATUS | wrapper  | 2012/03/22 09:42:09 | Machine is shutting down.
INFO   | jvm 1    | 2012/03/22 09:42:10 | ERROR [COMServerImpl                 ] [09:42:10,265]: [Wonderware] Server status check failed with error.
INFO   | jvm 1    | 2012/03/22 09:42:10 | com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80070005; E_ACCESSDENIED (Acceso denegado.)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:744)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.jniwrapper.win32.com.impl.IUnknownImpl.invokeStandardVirtualMethod(SourceFile:723)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.inductiveautomation.opccom.interop.opcda.impl.IOPCServerImpl.getStatus(IOPCServerImpl.java:126)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.inductiveautomation.opccom.COMServerImpl$GetStateJob.internalRun(COMServerImpl.java:791)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.inductiveautomation.opccom.wrapper.OleJob.run(OleJob.java:47)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:566)
INFO   | jvm 1    | 2012/03/22 09:42:10 | 	at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:508)
INFO   | jvm 1    | 2012/03/22 09:42:10 | INFO  [COMServerImpl                 ] [09:42:10,265]: [Wonderware] Server failure detected. Disconnecting.
INFO   | jvm 1    | 2012/03/22 09:42:10 | INFO  [COMServerImpl                 ] [09:42:10,265]: Disconnecting server 'Wonderware'
INFO   | jvm 1    | 2012/03/22 09:42:10 | INFO  [COMServerImpl                 ] [09:42:10,265]: Server 'Wonderware' state set to [CLOSED]
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [SRContext                     ] [09:42:10,953]: Ignition["/main", state=RUNNING] ContextState = STOPPING
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [SRContext                     ] [09:42:10,953]: Ignition Gateway shutting down...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: ModuleManager shutting down...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "mobile"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [VMManager                     ] [09:42:10,953]: Shutting down.
INFO   | jvm 1    | 2012/03/22 09:42:11 | WARN  [SRContext                     ] [09:42:10,953]: Trying to remove servlet "mobile", but map servlet is gone.
INFO   | jvm 1    | 2012/03/22 09:42:11 | WARN  [SRContext                     ] [09:42:10,953]: Trying to remove servlet "mobiledata", but map servlet is gone.
INFO   | jvm 1    | 2012/03/22 09:42:11 | WARN  [SRContext                     ] [09:42:10,953]: Trying to remove servlet "mobileimg", but map servlet is gone.
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutdown of module "mobile" completed in 0 ms
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "udp-driver"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutdown of module "udp-driver" completed in 0 ms
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "modbus-driver2"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutdown of module "modbus-driver2" completed in 0 ms
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "xopc-drivers"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutdown of module "xopc-drivers" completed in 0 ms
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "siemens-drivers"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutdown of module "siemens-drivers" completed in 0 ms
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [ModuleManager                 ] [09:42:10,953]: Shutting down module "opccom"...
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [COMServerImpl                 ] [09:42:10,953]: COMServerImpl.Shutdown
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [COMServerImpl                 ] [09:42:10,953]: Disconnecting server 'Wonderware'
INFO   | jvm 1    | 2012/03/22 09:42:11 | INFO  [COMServerImpl                 ] [09:42:10,953]: Server 'Wonderware' state set to [CLOSED]
INFO   | jvm 1    | 2012/03/22 09:42:11 | ERROR [NativeResourceCollector       ] [09:42:10,953]: 
INFO   | jvm 1    | 2012/03/22 09:42:11 | java.lang.InterruptedException
INFO   | jvm 1    | 2012/03/22 09:42:11 | 	at java.lang.Object.wait(Native Method)
INFO   | jvm 1    | 2012/03/22 09:42:11 | 	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
INFO   | jvm 1    | 2012/03/22 09:42:11 | 	at java.lang.ref.ReferenceQueue.remove(Unknown Source)
INFO   | jvm 1    | 2012/03/22 09:42:11 | 	at com.jniwrapper.a.run(SourceFile:160)

And this other part

INFO | jvm 1 | 2012/03/22 10:05:45 | ERROR [COMServerImpl ] [10:05:45,765]: Error connecting OPC-COM server. INFO | jvm 1 | 2012/03/22 10:05:45 | java.lang.Exception: Error advising subscription callback. DCOM security settings are likely preventing the OPC server from connecting to the client for callbacks. INFO | jvm 1 | 2012/03/22 10:05:45 | at com.inductiveautomation.opccom.wrapper.subscriptions.COMSubscription.oleloop_updateGroup(COMSubscription.java:654) INFO | jvm 1 | 2012/03/22 10:05:45 | at com.inductiveautomation.opccom.wrapper.subscriptions.COMSubscription$Connector.internalRun(COMSubscription.java:700) INFO | jvm 1 | 2012/03/22 10:05:45 | at com.inductiveautomation.opccom.wrapper.OleJob.run(OleJob.java:47) INFO | jvm 1 | 2012/03/22 10:05:45 | at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:566) INFO | jvm 1 | 2012/03/22 10:05:45 | at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:508)

Am I doing something wrong? what should I change to get connected without problems?

Thanks!

I think that in general some settings aren’t quite correct in DCOM.

In the first log, there was an error setting up the “server shutdown hook”. This is not critical, but the “advise limit” error might indicate a problem with security. Anyhow, after that, it appears that the machine is shutting down, so I’m not sure the errors are valid.

The second error, however, is a problem with security on the Ignition machine. When trying to subscribe to values, the wonderware machine must connect back to Ignition, but is getting “access denied”.

Perhaps what is happening on the others is that you are able to connect correctly, but as soon as you try to subscribe, the connection faults? If so, try to adjust the dcom settings on the Ignition machine.
In dcomcnfg, grant access to “everyone” and “anonymous” on the four areas under Computer>Properties>COM Security (there are a bunch of white papers around that describe this, and I think you already have some experience with it). Also, under the “Default Properties” tab, set “Default Authentication Level” to “None”, and “Default Impersonation Level” to “Identify”. You’ll need to restart Ignition after doing this.

Hope this helps,

I just upgraded Ignition to a newer version and now is working correctly… :confused:

Yeah, I can’t think of a specific reason why that should matter, though there have been a variety of small changes to the OPC-COM module. However, I thought that the original problem might be somewhat sporadic, based on the DCOM settings, and the state of the system (whether the opc server was already running, who was logged in, etc) at a given time. So, something might still pop up after a system restart or something.

Thanks for the update,