Update 3.5.6 to 3.6 failed
-
@Ralf it looks like you are using an outdated version of Java. I would suggest updating to the latest Java 8. To me it looks like you are on a version before 1.8u40. We require some classes that were added to Java after this upgrade and Mango will not run until you upgrade.
-
Hi,
the MangoES update to 3.6 failed.
java version is updated to Java(TM) SE Runtime Environment (build 1.8.0_212-b10).ma.log report is : Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-199]
ma.log:
INFO 2019-06-26T14:09:17,910 (com.serotonin.m2m2.Lifecycle.loadLic:611) - Checking license... INFO 2019-06-26T14:09:18,332 (com.serotonin.m2m2.db.H2Proxy.initializeImpl:61) - Initializing H2 connection manager FATAL 2019-06-26T14:09:21,552 (com.serotonin.m2m2.db.AbstractDatabaseProxy.initialize:163) - Unable to connect to database of type H2 org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-199] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:611) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:699) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:711) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:39) ~[mango-3.6.0.jar:?] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:63) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.H2Proxy.tableExists(H2Proxy.java:405) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.AbstractDatabaseProxy.newDatabaseCheck(AbstractDatabaseProxy.java:181) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.AbstractDatabaseProxy.initialize(AbstractDatabaseProxy.java:82) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:760) ~[ma-priv-3.6.0.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:312) ~[ma-priv-3.6.0.jar:?] at com.serotonin.m2m2.Main.main(Main.java:143) ~[ma-priv-3.6.0.jar:?] Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:459) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.get(DbException.java:181) ~[h2-1.4.199.jar:1.4.199] at org.h2.message.DbException.get(DbException.java:170) ~[h2-1.4.199.jar:1.4.199] at org.h2.engine.Engine.validateUserAndPassword(Engine.java:366) ~[h2-1.4.199.jar:1.4.199] at org.h2.engine.Engine.createSessionAndValidate(Engine.java:186) ~[h2-1.4.199.jar:1.4.199] at org.h2.engine.Engine.createSession(Engine.java:161) ~[h2-1.4.199.jar:1.4.199] at org.h2.engine.Engine.createSession(Engine.java:31) ~[h2-1.4.199.jar:1.4.199] at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148) ~[h2-1.4.199.jar:1.4.199] at org.h2.Driver.connect(Driver.java:69) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:189) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:352) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:384) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:234) ~[h2-1.4.199.jar:1.4.199] at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:199) ~[h2-1.4.199.jar:1.4.199] at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:157) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] ... 12 more ERROR 2019-06-26T14:09:21,553 (com.serotonin.m2m2.Main.main:146) - Error during initialization org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-199] at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:611) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:668) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:699) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:711) ~[spring-jdbc-5.1.7.RELEASE.jar:5.1.7.RELEASE] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:39) ~[mango-3.6.0.jar:?] at com.serotonin.db.spring.ExtendedJdbcTemplate.queryForObject(ExtendedJdbcTemplate.java:63) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.H2Proxy.tableExists(H2Proxy.java:405) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.AbstractDatabaseProxy.newDatabaseCheck(AbstractDatabaseProxy.java:181) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.db.AbstractDatabaseProxy.initialize(AbstractDatabaseProxy.java:82) ~[mango-3.6.0.jar:?] at com.serotonin.m2m2.Lifecycle.databaseInitialize(Lifecycle.java:760) ~[ma-priv-3.6.0.jar:?] at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:312) ~[ma-priv-3.6.0.jar:?] at com.serotonin.m2m2.Main.main(Main.java:143) ~[ma-priv-3.6.0.jar:?]
-
Hi Vincent
Did anyone modify the env.properties file to change the h2 database password?
db.type=h2 db.url=jdbc:h2:${ma.home}/databases/mah2 db.location=${ma.home}/databases/mah2 db.username= db.password=
-
No. it;s Clean!!
# set max age of cached files in seconds, only if noStore=false # versioned resources are those with ?v=xxx on the query string web.cache.maxAge=0 web.cache.maxAge.rest=0 web.cache.maxAge.resources=86400 web.cache.maxAge.versionedResources=31536000 #Upload file size limit (bytes) -1 means no limit web.fileUpload.maxSize=250000000 # Default database settings, NOTE that on windows this must be an absolute path db.type=h2 db.url=jdbc:h2:${ma.home}/databases/mah2 db.location=${ma.home}/databases/mah2 db.username= db.password= #For web console db.web.start=false db.web.port=8091 #to compact the database size at shutdown (may take longer but will free up disk space) db.h2.shutdownCompact=false
-
It’s really weird! There’s no problem with the enterprise version.
-
yes, it would be clean because it got replaced with a new file during the upgrade. Is there any chance that someone edited it before the upgrade?
-
I have confirmed all settings, the env.properties only one file in the /opt/mango/classes.
root@mangoES2204:/opt/mango$ ls backup databases Getting Started.txt logs overrides work bin db lib m2m2.license.old.xml RELEASE-NOTES boot filestore LICENSE m2m2.license.xml release.signed classes ftl licenseTypes.xml modules web root@mangoES2204:/opt/mango$ cd classes/ root@mangoES2204:/opt/mango/classes$ ls debug-log4j2.xml env.properties i18n.properties log4j.xml debug-log4j.xml high-performance-log4j2.xml log4j2.xml swagger.properties root@mangoES2204:/opt/mango/classes$ locate env.properties /opt/mango/classes/env.properties root@mangoES2204:/opt/mango/classes$
-
Hi Vincent
All files in your classes folder get replaced when you do an upgrade. So confirming this now is too late. The correct procedure is to copy the file into the overrides folder and then edit it. This way it will not get replaced during an upgrade. Is it possible that someone changed the H2 database on the MangoES ?
-
Hi C,
Thank your support !!It is our mistake, the early version of mangoES its H2 DataBase UserName and Password is mango, we have handled this matter!!
Thanks again !!
Vincent.
-
Please copy your env.properties file that you have edited with the username and password into /opt/mango/overrides/classes
So that this does not happen again. -
@terrypacker ja, that was the reason.
I installed a new java version "jdk-8u131-linux-arm32-vfp-hflt.tar.gz".
A installation in the old path usr/lib/jvm/java-8-oracle didn't work so I followed the manual here:
help.infiniteautomation.com/linux-installation and the MangoES is running again.
I recommend for the future that you specify which Java version is necessary for a mango update. That would be helpful....
You have made a big progress with version 3.6, thanks!
-
Thanks for sharing the resource that helped you!
This thread has some information on updating Java that could be useful if Mango is being run on a lower privileged user at port 80: https://forum.infiniteautomation.com/topic/2678/java-update-encouraged