IgnitionModuleDevelopmentCommunity / IgnitionNode-RED

Adds support for Node-RED
Apache License 2.0
31 stars 7 forks source link

Exception while starting up module "org.imdc.nodered.IgnitionNodeRED". #33

Closed apbrauer73 closed 1 year ago

apbrauer73 commented 1 year ago

I imported the node red module v1.5.12 into my Ignition instance Maker Edition v8.1.25 and this is a in a docker container. The module fails to run. This also happens with v1.5.11 in Ignition Maker Edition v8.1.24. The last time this worked was in Maker Edition v8.1.23 with node red module v1.5.11. I see the following error in the log.

java.lang.IllegalArgumentException: Servlet map already contains "node-red" at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.addServlet(MapServlet.java:107) at com.inductiveautomation.ignition.gateway.web.WebResourceManagerImpl.addServlet(WebResourceManagerImpl.java:241) at org.imdc.nodered.GatewayHook.startup(GatewayHook.java:38) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$LoadedModule.startup(ModuleManagerImpl.java:2439) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.startupModule(ModuleManagerImpl.java:1232) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$2.call(ModuleManagerImpl.java:777) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.executeModuleOperation(ModuleManagerImpl.java:953) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.installModuleInternal(ModuleManagerImpl.java:743) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$InstallCommand.execute(ModuleManagerImpl.java:1909) at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$Receiver.receiveCall(ModuleManagerImpl.java:1862) at com.inductiveautomation.ignition.gateway.redundancy.QueueableMessageReceiver.receiveCall(QueueableMessageReceiver.java:47) at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.dispatchMessage(RedundancyManagerImpl.java:1030) at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl$ExecuteTask.run(RedundancyManagerImpl.java:1098) at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:544) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

This is what I see on the module page... image

apbrauer73 commented 1 year ago

I figured it out. I created a new container for Ignition v8.1.25 and I restored a gateway backup from a gateway that was using the node red module. After the restore I imported the node red module and the exception occurs.

So I tried this... I created a new Ignition v8.1.25 container and imported the node red module first then restored the gateway backup. The node red module started up fine in the gateway. So having the node red module installed before restoring a gateway backup that references the node red module is the way to go.

iatraviscox commented 1 year ago

Hmm, it seems the module wasn't shutdown properly, meaning the servlet wasn't removed. I will try to replicate this on my end. I will close this for now.