SSL Installation on the mango cloud
-
Hi
I am having issue on installing SSL on my mango hosted in my cloud.
I've already got the ssl certificate from Domain.co.za and I have created a jdk file that
I pasted under mango/propertie/override, and I changed the env property according to the notes in your website.
But everytime I activate the SSL settings from mango, my web page can no longer be reached.
I went through your forum and I see someone had the same issue and I followed the instruction given and still having the same issue.See below log data
//your code here ```INFO 2019-07-08T12:20:35,146 (com.serotonin.m2m2.Main.main:101) - Starting Mango 3.5.6 with Schema Version: 26 INFO 2019-07-08T12:20:38,815 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'pop3', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,030 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'dataFile', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,170 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'excelReports', v3.5.3 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,291 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'loggingConsole', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,342 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'mangoApi', v3.5.2 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,384 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'watchlists', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,641 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'advancedScheduler', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,646 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'ssh', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,727 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'sstGlobalScripts', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,777 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'asciiFile', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,842 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'vmstat', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,909 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'virtualDS', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:39,952 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'snmp', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,004 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'dashboardDesigner', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,012 (com.serotonin.m2m2.util.DocumentationManifest.parseManifestFile:60) - Documentation manifest file not found: /opt/mango/web/modules/dashboardDesigner/web/dox/manifest.xml INFO 2019-07-08T12:20:40,020 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'reports', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,057 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'egauge', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,082 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'sqlConsole', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,106 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'BACnet', v3.5.3 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,125 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'log4JReset', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,141 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'templateConfig', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,186 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'jsonFileImport', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,204 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'dataImport', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,228 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'deviceConfig', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,243 (com.serotonin.m2m2.util.DocumentationManifest.parseManifestFile:60) - Documentation manifest file not found: /opt/mango/web/modules/deviceConfig/web/dox/manifest.xml INFO 2019-07-08T12:20:40,247 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'maintenanceEvents', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,264 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'modbus', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,300 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'mangoUI', v3.5.5 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,305 (com.serotonin.m2m2.util.DocumentationManifest.parseManifestFile:60) - Documentation manifest file not found: /opt/mango/web/modules/mangoUI/web/dox/manifest.xml INFO 2019-07-08T12:20:40,341 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'log4jDS', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,372 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'graphicalViews', v3.5.3 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,442 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'TCPIP', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,451 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'scripting', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,472 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'mangoNoSqlDatabase', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,499 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'pointLinks', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,524 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'sstGraphics', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,564 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'controlcore', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,575 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'opcda', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,592 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'mbus', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,625 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'dnp3', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,665 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'persistent', v3.5.6 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,691 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'advancedComponents', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,695 (com.serotonin.m2m2.util.DocumentationManifest.parseManifestFile:60) - Documentation manifest file not found: /opt/mango/web/modules/advancedComponents/web/dox/manifest.xml INFO 2019-07-08T12:20:40,702 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'twilio', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,714 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'envcands', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,758 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'mqttClientDataSource', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,775 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'sqlds', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,785 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'Haystack', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,795 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'onewire', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,804 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'scheduledEvents', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,818 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'meta', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,827 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'pakbus', v3.5.4 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,836 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'http', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,854 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'dataPointDetailsView', v3.5.0 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,871 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'serial', v3.5.1 by Infinite Automation Systems Inc. INFO 2019-07-08T12:20:40,880 (com.serotonin.m2m2.Main.loadModules:588) - Loading module 'internal', v3.5.0 by Infinite Automation Systems Inc. ERROR 2019-07-08T12:20:50,153 (com.serotonin.m2m2.Main.main:142) - Error during initialization java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780) ~[?:1.8.0_171] at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) ~[?:1.8.0_171] at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) ~[?:1.8.0_171] at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) ~[?:1.8.0_171] at java.security.KeyStore.load(KeyStore.java:1445) ~[?:1.8.0_171] at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(CertificateUtils.java:54) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(SslContextFactory.java:1089) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.ssl.SslContextFactory.load(SslContextFactory.java:274) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:241) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.server.SslConnectionFactory.doStart(SslConnectionFactory.java:94) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:282) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.server.Server.doStart(Server.java:395) ~[jetty-server-9.4.12.v20180830.jar:9.4.12.v20180830] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) ~[jetty-util-9.4.12.v20180830.jar:9.4.12.v20180830] at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:999) ~[ma-priv-3.5.6.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:244) ~[ma-priv-3.5.6.jar:?] at com.serotonin.m2m2.Main.main(Main.java:138) ~[ma-priv-3.5.6.jar:?] Caused by: java.security.UnrecoverableKeyException: Password verification failed at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778) ~[?:1.8.0_171] ... 24 more INFO 2019-07-08T12:20:50,153 (com.serotonin.m2m2.Lifecycle.terminate:422) - Mango Lifecycle terminating... ERROR 2019-07-08T12:20:50,230 (com.serotonin.m2m2.Lifecycle.terminate:501) - com.serotonin.provider.InputStreamEPollProvider com.serotonin.provider.ProviderNotFoundException: com.serotonin.provider.InputStreamEPollProvider at com.serotonin.provider.Providers.get(Providers.java:30) ~[mango-3.5.6.jar:?] at com.serotonin.provider.Providers.get(Providers.java:20) ~[mango-3.5.6.jar:?] at com.serotonin.m2m2.Lifecycle.terminate(Lifecycle.java:496) ~[ma-priv-3.5.6.jar:?] at com.serotonin.m2m2.Main.main(Main.java:143) ~[ma-priv-3.5.6.jar:?] ERROR 2019-07-08T12:20:50,234 (com.serotonin.m2m2.Lifecycle.terminate:509) - com.serotonin.provider.ProcessEPollProvider com.serotonin.provider.ProviderNotFoundException: com.serotonin.provider.ProcessEPollProvider at com.serotonin.provider.Providers.get(Providers.java:30) ~[mango-3.5.6.jar:?] at com.serotonin.provider.Providers.get(Providers.java:20) ~[mango-3.5.6.jar:?] at com.serotonin.m2m2.Lifecycle.terminate(Lifecycle.java:504) ~[ma-priv-3.5.6.jar:?] at com.serotonin.m2m2.Main.main(Main.java:143) ~[ma-priv-3.5.6.jar:?] INFO 2019-07-08T12:20:50,300 (com.serotonin.m2m2.Lifecycle.terminate:571) - Mango Lifecycle terminated.[link text]([link url]([link url](``` link url ```)))
-
Hi Jerrry
Welcome to the forum. Please could you edit your post so that the ma.log text is inside a code element. It makes it a lot easier to scroll and copy.
Text
ERROR 2019-07-08T12:20:50,153 (com.serotonin.m2m2.Main.main:142) - Error during initialization java.io.IOException: Keystore was tampered with, or password was incorrect
Can you confirm that the keystore password is correct?
Can you also show us which forum thread you followed. -
This thread here provides a handy step by step on how to apply the cert given your version of mango. If you upgrade to the latest version you will have the ability to use letsEncrypt certs which can update on the fly. That was implemented from 3.5.3 I believe.
https://forum.infiniteautomation.com/topic/3725/external-ip/8
Alternatively if you're running multiple web services on the same server, a proxy might suit you more.
Fox
-
Hi Graig!
Thanks for your response,I have created my keystore .jdk using windows key tool.and i pasted it in the directory as shown on the mango.i have not use a password to generate my key.
this is the link i got information from: https://forum.infiniteautomation.com/topic/3725/external-ip/7 -
Hi Jerry
Did you use a password when creating the keystore, not the key? The logs show Mango cannot access the keystore.
What did you put on this line in your env.properties:
ssl.keystore.password=morethan6characters
-
Hi craigweb i did put : ssl.keystore.password=freetextpassword
-
@jmbayo said in SSL Installation on the mango cloud:
Caused by: java.security.UnrecoverableKeyException: Password verification failed
Your logs show that the password is not correct. You need to first test your password on the keystore.
-
this is the link i got information from: https://forum.infiniteautomation.com/topic/3725/external-ip/7
Did you use the keytool command exactly as it appears in this thread? If so, your keystore password would likely be
changei
-
This post is deleted! -
I trust you got things sorted Jimmy? Welcome to message via chat as well if you have any concerns
Fox
-
Hi Jimmy
The process is as follows:
- Create a keystore.jks to hold your keys
- Import the certificate into the keystore.
- Move the keystore onto your cloud server.
- edit the env.properties folder to point to your keystore.
If any passwords were used on either the key or the certificate then add them to the env.properties file
-
This post is deleted! -
@craigweb Thanks. Let me try that, will let you know how it goes.
-
Hi all; the SSL is now working on my cloud. I thought I would share the procedure and challenges encountered.
Step 0.
Buy a genuine SSL certificate
Step 1.
Generate a CSR to request a certificate from a recognised CA
Step 2
Generate a file.jks; on my case I used keystore explore to create a keystore.jks and load all my certificate in it.
Setp 3
I then imported it into my mango /opt/mango/overrides/properties
Challenges:
After all these steps, when I edited my env file to activate the SSL, my web page couldn’t be access. The issue was on my env file, I didn’t uncommented the ssl.key.password. I followed the instruction for using certbot which was not the right one for my case. The right is on support under configurationinstallation- ssl.on=true
- ssl.port=443
- ssl.keystore.location=[YOUR FULL MANGO PATH HERE]/overrides/keystore.jks
- ssl.keystore.password=[leave empty if you didn’t use a password]
- ssl.key.password=[leave empty if you didn’t use a password] (Note that this need to be uncommented as it is initially commented out)
Then I restarted mango, and that’s it