Gateway startup fault due to access denied in Module Hook

I just upgraded to 7.7 on 64-bit Windows…I’m having trouble getting the Gateway to restart; it is faulted and I see this in the wrapper.log. Any suggestions?

INFO | jvm 1 | 2014/08/05 11:52:07 | INFO [ModuleManager ] [11:52:07,535]: Setting up modules
INFO [ModuleHook ] [11:52:20,124]: JNI Library: C:\Windows\TEMP\jniwrap-3.8.3304715667401831135.Build.3.8.31966291242\jniwrap64.dll
INFO | jvm 1 | 2014/08/05 11:52:20 | ERROR [SRContext ] [11:52:20,156]: Error during context startup.
INFO | jvm 1 | 2014/08/05 11:52:20 | java.lang.ExceptionInInitializerError
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.jniwrapper.win32.system.Kernel32.isUnicode(Kernel32.java:77)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.jniwrapper.win32.FunctionName.(FunctionName.java:24)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.jniwrapper.win32.MessageLoopThread.(MessageLoopThread.java:24)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.opccom.ModuleHook.setup(ModuleHook.java:176)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.setup(ModuleManagerImpl.java:2189)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.setup(ModuleManagerImpl.java:265)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.SRContext.startupInternal(SRContext.java:1169)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.startup(RedundancyManagerImpl.java:194)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.SRContext.asyncInit(SRContext.java:917)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.SRContext.access$200(SRContext.java:249)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.gateway.SRContext$2.run(SRContext.java:651)
INFO | jvm 1 | 2014/08/05 11:52:20 | at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:526)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
INFO | jvm 1 | 2014/08/05 11:52:20 | at java.lang.Thread.run(Thread.java:745)
INFO | jvm 1 | 2014/08/05 11:52:20 | Caused by: com.jniwrapper.JNIWrapperException: java.io.IOException: Access is denied
INFO | jvm 1 | 2014/08/05 11:52:20 | Caused by: java.io.IOException: Access is denied
INFO | jvm 1 | 2014/08/05 11:52:20 | INFO [SRContext ] [11:52:20,171]: Ignition["/main", state=STARTING] ContextState = FAULTED

Did you upgrade Java to version 8?

Yes, I upgraded to 1.8.

This is getting to be quite a problem; I can’t get the Gateway to come up at all now.

This is on 64-bit Windows 7.

java version info as follows:

$ java -version
java version “1.8.0_11”
Java™ SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot™ 64-Bit Server VM (build 25.11-b03, mixed mode)

Rob

…wrapper log attached…
wrapper.log (67.7 KB)

Are you sure these are the right logs? They actually show the gateway starting up the second time…

The following:

INFO   | jvm 1    | 2014/08/08 11:48:32 | INFO  [ActivateSessionService        ] [11:48:32,132]: User "opcuauser" connected but could not authenticate. (invalid username or password)
INFO   | jvm 1    | 2014/08/08 11:48:32 | WARN  [ActivateSessionService        ] [11:48:32,132]: Returning ServiceFault for request: com.inductiveautomation.opcua.types.messages.ActivateSessionRequest@238167dd.  StatusCode=StatusCode[Severity=Bad, Subcode=Bad_UserAccessDenied]

is the OPC-UA connection failing to authenticate, which is weird, but wouldn’t stop the gateway from starting.

Hi,

Based on what I read, my guess is that it’s potentially something about the way the temp files are generated/named… there have been various issues in the past that have been fixed in Java with symptoms like this, and then I’ve found other discussions from the particular library vendor talking about them fixing issues, maybe something regressed in Java 7 or 8?

Anyhow, in reading around, one possible cause is if the new temp file name clashes with an existing file. This is supposed to be unlikely, since the files are generated with random numbers. But if this problem is so reproducible for you, maybe we can help narrow down when & why it’s happening.

When you get the error, try the following:

  1. Stop the Ignition service.
  2. Go to C:\windows\temp and delete all of the folders that start with “jniwrap-*”.
  3. Start again, see if the error occurs. Try restarting a few times if you want.

If it keeps happening after this, or happens after a short period, maybe we can look at other causes.

Regards,

I had the same problem. I followed Colby’s instructions to get it to work. After deleting temp files and restarting a few times it worked.

Deleting the c:\windows\temp files helped me also to start the gateway. However, I did not find folders that start with "jniwrap-*".

OS: Windows 7 Home Premium, Built 7601

java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Ignition 64 bits, v7.7.1