Module Quarantine Because License Not Yet Accepted

Hello,

I recently added a license file into a module that I developed. When installing the module, I checked the accept license button and finished the install. The module never appeared in the list of modules so I started to investigate.

First I attempted to reinstall the module. It didn’t prompt again with the license and it didn’t show up.

Second, I removed the license from the module. It installed and showed up.

Then I added the license back in, and it again didn’t show me the license prompt screen, and it didn’t show up.

I renamed the module and installed it, then the license prompt showed back up, but it didn’t really install.

Next I increased the trace level for ModuleMananger and ran through the above steps again.

Without a license I got the following results:

INFO | jvm 1 | 2016/06/03 10:41:41 | DEBUG [ModuleManager ] [10:41:41,900]: Installing module from file: Workshop-Connection-Driver-Snap.modl INFO | jvm 1 | 2016/06/03 10:41:42 | INFO [ModuleManager ] [10:41:41,910]: Installing module: "com.mwes.gfms.wsc-snap" INFO | jvm 1 | 2016/06/03 10:41:42 | DEBUG [ModuleManager ] [10:41:41,927]: Loading module "user-lib\modules\Workshop-Connection-Driver-Snap.modl" INFO | jvm 1 | 2016/06/03 10:41:42 | DEBUG [ModuleManager ] [10:41:42,440]: certificates.p7b not found in module Workshop-Connection-Driver-Snap.modl INFO | jvm 1 | 2016/06/03 10:41:42 | java.io.IOException: Entry: "certificates.p7b" not found. INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.util.GatewayUtils.unzipFile(GatewayUtils.java:426) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.util.GatewayUtils.unzipFile(GatewayUtils.java:385) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.getCertsFromFile(ModuleManagerImpl.java:2173) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.loadModule(ModuleManagerImpl.java:1701) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$4.call(ModuleManagerImpl.java:1117) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.executeModuleOperation(ModuleManagerImpl.java:1262) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.installModuleInternal(ModuleManagerImpl.java:1099) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.access$1500(ModuleManagerImpl.java:155) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$InstallCommand.execute(ModuleManagerImpl.java:2301) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$Receiver.receiveCall(ModuleManagerImpl.java:2242) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.redundancy.QueueableMessageReceiver.receiveCall(QueueableMessageReceiver.java:45) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.dispatchMessage(RedundancyManagerImpl.java:658) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl$ExecuteTask.run(RedundancyManagerImpl.java:678) INFO | jvm 1 | 2016/06/03 10:41:42 | at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:537) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) INFO | jvm 1 | 2016/06/03 10:41:42 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | 2016/06/03 10:41:42 | INFO [ModuleManager ] [10:41:42,458]: Starting up module 'com.mwes.gfms.wsc-snap' (v1.5.0 (b0))... INFO | jvm 1 | 2016/06/03 10:41:44 | DEBUG [ModuleManager ] [10:41:44,058]: Loading hook class "com.mwes.gfms.wsc.driver.GatewayHook" for module "com.mwes.gfms.wsc-snap". INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [GatewayHook ] [10:41:44,122]: InitMenu Called INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [GatewayHook ] [10:41:44,128]: GetDriverTypes Called INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [ModuleManager ] [10:41:44,128]: Starting up module 'com.mwes.gfms.wsc-snap' v1.5.0 (b0)... INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [GatewayHook ] [10:41:44,128]: Startup Called INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [GatewayHook ] [10:41:44,129]: GetExpectedAPIVersion Called INFO | jvm 1 | 2016/06/03 10:41:44 | INFO [GatewayHook ] [10:41:44,129]: ServiceReady Called for interface com.inductiveautomation.xopc.driver.api.configuration.DriverManager

With a license I got the following results:

INFO | jvm 1 | 2016/06/03 10:45:40 | DEBUG [ModuleManager ] [10:45:40,813]: Installing module from file: Workshop-Connection-Driver-Snap.modl INFO | jvm 1 | 2016/06/03 10:45:40 | INFO [ModuleManager ] [10:45:40,824]: Installing module: "com.mwes.gfms.wsc-snap" INFO | jvm 1 | 2016/06/03 10:45:40 | DEBUG [ModuleManager ] [10:45:40,824]: Shutting down existing module instance... INFO | jvm 1 | 2016/06/03 10:45:40 | INFO [ModuleManager ] [10:45:40,824]: Shutting down module 'com.mwes.gfms.wsc-snap' v1.5.0 (b0)... INFO | jvm 1 | 2016/06/03 10:45:40 | INFO [GatewayHook ] [10:45:40,824]: Shutdown Called INFO | jvm 1 | 2016/06/03 10:45:40 | INFO [ModuleManager ] [10:45:40,826]: Shutdown of module "com.mwes.gfms.wsc-snap" completed in 2 ms INFO | jvm 1 | 2016/06/03 10:45:40 | DEBUG [ModuleManager ] [10:45:40,848]: Loading module "user-lib\modules\Workshop-Connection-Driver-Snap.modl" INFO | jvm 1 | 2016/06/03 10:45:41 | DEBUG [ModuleManager ] [10:45:41,437]: certificates.p7b not found in module Workshop-Connection-Driver-Snap.modl INFO | jvm 1 | 2016/06/03 10:45:41 | java.io.IOException: Entry: "certificates.p7b" not found. INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.util.GatewayUtils.unzipFile(GatewayUtils.java:426) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.util.GatewayUtils.unzipFile(GatewayUtils.java:385) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.getCertsFromFile(ModuleManagerImpl.java:2173) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.loadModule(ModuleManagerImpl.java:1701) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$4.call(ModuleManagerImpl.java:1117) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.executeModuleOperation(ModuleManagerImpl.java:1262) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.installModuleInternal(ModuleManagerImpl.java:1099) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl.access$1500(ModuleManagerImpl.java:155) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$InstallCommand.execute(ModuleManagerImpl.java:2301) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.modules.ModuleManagerImpl$Receiver.receiveCall(ModuleManagerImpl.java:2242) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.redundancy.QueueableMessageReceiver.receiveCall(QueueableMessageReceiver.java:45) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl.dispatchMessage(RedundancyManagerImpl.java:658) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.gateway.redundancy.RedundancyManagerImpl$ExecuteTask.run(RedundancyManagerImpl.java:678) INFO | jvm 1 | 2016/06/03 10:45:41 | at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:537) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) INFO | jvm 1 | 2016/06/03 10:45:41 | at java.lang.Thread.run(Thread.java:745) INFO | jvm 1 | 2016/06/03 10:45:41 | WARN [ModuleManager ] [10:45:41,438]: Moving module Workshop Connection Driver-Snap to quarantine because license not yet accepted. INFO | jvm 1 | 2016/06/03 10:45:41 | ERROR [ModuleManager ] [10:45:41,438]: Cannot start up module "com.mwes.gfms.wsc-snap", it doesn't exist.

In both cases it is complaining about a certificates.p7b file which is slightly confusing. But more confusing is the fact that I DID accept the license!

In the past I’ve been told by the support line that I shouldn’t ask them questions regarding module development, so I’m asking here.

Any suggestions?

Thank you,
Bill

Forgot to mention:

Ignition 7.7.8 SDK 7.7.5 using Maven Plugin 1.0.9

Is this 7.7.8 or the 7.8.3 beta?

In either case, what’s happening here is its complaining that your module is not signed. 7.7.8/7.8.3 introduces new module signing for 3rd party modules: docs.inductiveautomation.com:84 … le+Signing

You mean I have to pay to get a signed certificate from a CA in order to self-sign. I can’t use the IA module signing anymore?

See message above your response for version… 7.7.8

No, you can’t use the IA certificate any more.

You don’t need to buy a CA-certified code signing certificate either though - you can simply generate your own certificate that will be used to sign the modules. This is presented at a lower level of trust in the UI, but for internal use (i.e. you’re not selling modules to end users) it should be fine. If you want the warm fuzzies from the presentation of a higher level of trust you can buy a real code signing certificate from one of the CAs.

I may be just missing something obvious, but the module-signer as provided @ github doesn’t run.

It’s missing the manifest indicating the class that contains the main function. When I add the appropriate entries to the pom.xml

<plugin> <!-- Build an executable JAR --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>com.inductiveautomation.ignitionsdk.ModuleSigner</mainClass>> </manifest> </archive> </configuration> </plugin>

That doesn’t work because the main method is contained in a static subclass of ModuleSigner, and when I specify the full path to that class, I get an error message

java -cp module-signer-1.0.0-SNAPSHOT.jar com.inductiveautomation.ignitionsdk.ModuleSigner.Main Error: Could not find or load main class com.inductiveautomation.ignitionsdk.ModuleSigner.Main

When I end with just ModuleSigner I get

[code]java -cp module-signer-1.0.0-SNAPSHOT.jar com.inductiveautomation.ignitionsdk.ModuleSigner

Error: Main method not found in class com.inductiveautomation.ignitionsdk.ModuleSigner, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
[/code]

This is fixed by moving the Main class into it’s own source file.

Next, the class path doesn’t include the CommandLineParser, or either of the two dependency jars. So, I replaced the maven-jar-plugin with the maven-shade-plugin and now I have a executable jar produced from the sources at github.

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.inductiveautomation.ignitionsdk.Main</mainClass>> </transformer> </transformers> </configuration> </execution> </executions> </plugin>

Now to attempt to figure out how to use a self-signed certificate (hopefully created correctly) with this module…

Is there a detailed step by step howto for setting up for signing drivers?

I mean starting from no keystore all the way through producing a self-signed p7b file.

Presently I’m getting the following error:

C:\Sources\Woodward\50879\Driver\gfms_wsc_driver\gfms-wsc-build\target>java -jar ../../../module-signer/target/module-si gner-1.0.0-SNAPSHOT.jar -keystore=..\signer.ks -keystore-pwd=pwd -alias=rootk -alias-pwd=pwd -chain=..\rootk.p7b -module-in=Workshop-Connection-Driver-Test-unsigned.modl -module-out=Workshop-Connection-Driver-Test.modl Exception in thread "main" java.security.UnrecoverableKeyException: Cannot recover key at sun.security.provider.KeyProtector.recover(KeyProtector.java:328) at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146) at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56) at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70) at java.security.KeyStore.getKey(KeyStore.java:1023) at com.inductiveautomation.ignitionsdk.Main.main(Main.java:41)

Ok, while a step-by-step would still be nice, It turns out that alias-pwd is optional and since I didn’t put a password into that one, I shouldn’t have specified it on the command line.

Supposedly I have a signed module. Trying it now.

Still having problems with license not accepted

10:13:00 AM ModuleManager Cannot start up module "com.mwes.gfms.wsc-test", it doesn't exist. WARN 10:13:00 AM ModuleManager Moving module Workshop Connection Driver-Test to quarantine because license not yet accepted.

It didn’t even prompt me for the license. It did prompt me to accept the self-signed certificate.

[quote=“BillS”]I may be just missing something obvious, but the module-signer as provided @ github doesn’t run.

It’s missing the manifest indicating the class that contains the main function. When I add the appropriate entries to the pom.xml

<plugin> <!-- Build an executable JAR --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib/</classpathPrefix> <mainClass>com.inductiveautomation.ignitionsdk.ModuleSigner</mainClass>> </manifest> </archive> </configuration> </plugin>

That doesn’t work because the main method is contained in a static subclass of ModuleSigner, and when I specify the full path to that class, I get an error message

java -cp module-signer-1.0.0-SNAPSHOT.jar com.inductiveautomation.ignitionsdk.ModuleSigner.Main Error: Could not find or load main class com.inductiveautomation.ignitionsdk.ModuleSigner.Main

When I end with just ModuleSigner I get

[code]java -cp module-signer-1.0.0-SNAPSHOT.jar com.inductiveautomation.ignitionsdk.ModuleSigner

Error: Main method not found in class com.inductiveautomation.ignitionsdk.ModuleSigner, please define the main method as:
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
[/code]

This is fixed by moving the Main class into it’s own source file.

Next, the class path doesn’t include the CommandLineParser, or either of the two dependency jars. So, I replaced the maven-jar-plugin with the maven-shade-plugin and now I have a executable jar produced from the sources at github.

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.inductiveautomation.ignitionsdk.Main</mainClass>> </transformer> </transformers> </configuration> </execution> </executions> </plugin>

Now to attempt to figure out how to use a self-signed certificate (hopefully created correctly) with this module…[/quote]

I see that since I originally forked the project on GitHub, you fixed this problem a slightly different way. Interesting about the $Main to access the subclass.

I’m still having this problem. Any suggestions?

Have you pulled and re-built the jar since the last update?

Still having problems. Not really sure what you are asking for…

The following trace is what happens when I install the module after modifying the license.html file before rebuilding the package. I have an image showing that I had checked the “I accept the terms in the License Agreement” if you wish. Is there something more that I should trace?

 	Time	Logger	Message
(I)	11:30:27 AM	com.inductiveautomation.ignition.gateway.localdb.LocalDBManagerImpl	Created auto-backup of internal database "config.idb" in 2 seconds
(I)	11:30:25 AM	com.inductiveautomation.ignition.gateway.localdb.LocalDBManagerImpl	Creating auto-backup of internal database "config.idb"...
ERROR	11:30:21 AM	ModuleManager	Cannot start up module "com.mwes.gfms.wsc", it doesn't exist.
WARN	11:30:21 AM	ModuleManager	Moving module Workshop Connection Driver to quarantine because license not yet accepted.

------- Deleted all the Signature checking --------

(D)	11:30:21 AM	ModuleManager	filename: /junit-4.8.1.jar
(D)	11:30:21 AM	ModuleManager	--- verifying ---
(D)	11:30:21 AM	ModuleManager	Loading module "user-lib\modules\Workshop-Connection-Driver-1.5.1.modl"
(I)	11:30:21 AM	ModuleManager	Installing module: "com.mwes.gfms.wsc"
(D)	11:30:21 AM	ModuleManager	Installing module from file: Workshop-Connection-Driver-1.5.1.modl
(T)	11:29:47 AM	ModuleManager	checkLicense() skipping module notification - license hasn't changed.
(D)	11:29:47 AM	ModuleManager	License SystemId (788B7279) == Actual SystemId (788B7279)
(D)	11:29:42 AM	ModuleManager	Hasp version info: Aladdin.HaspApiVersion@47173dc4
(I)	11:29:27 AM	org.apache.wicket.resource.PropertiesFactory	Loading properties files from jar:file:/C:/Program%20Files/Inductive%20Automation/Ignition/temp/gateway3897030804379257987.jar!/com/inductiveautomation/ignition/gateway/web/pages/config/SystemStatus.properties with loader org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@7e263c1e
(T)	11:28:42 AM	ModuleManager	checkLicense() skipping module notification - license hasn't changed.
(D)	11:28:42 AM	ModuleManager	License SystemId (788B7279) == Actual SystemId (788B7279)
(D)	11:28:38 AM	ModuleManager	Hasp version info: Aladdin.HaspApiVersion@39c56f3d

Can you attach your module to this post or email it to support so we can take a look at it?

I have emailed it to support, referencing you in the subject line.

Thank you

Ok, so I installed this module into a 7.7.8 gateway without any issues…

You’re saying that doesn’t work for you?

As the trace from the prior message says,
The module is quarantined because the license agreement wasn’t accepted. Even though I did accept the license agreement

This is on my test server, not the production server, it is running 7.7.8 and if I remove the license file entirely the module installs with no issues.

One note, the module doesn’t show up on any screen I can find in the Web interface!

Weird. I’m not seeing the messages in my console and it shows up on the modules page after installation.

Are you sure you’re on 7.7.8 final and not a beta/rc? Is the gateway licensed or unlicensed? Dev mode?

Right now it is unlicensed. I had thought that I got a temporary license for it when the real license went to the production server, but the need for that license basically left with the rest of the line. Now I only use this server to test installation of the driver, since there is no hardware still installed.

It was a dev mode at one time… Don’t know if it still is. Where does that show up?