Installation problems on Ubuntu 20.04

Hello People,
so at first I have to admit, I am pretty new to Linux, install and configure your own server etc. But I still hope you can help me and pardon my stupid questions. So i tried to install OpenBoxes on my own device, but now I am stuck at the step “deployment”.
I got the following error message: “Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.”
Despite the fact I already defined this: “dataSource.url=jdbc:mysql://localhost:3306/openboxes?useSSL=false”
I am pretty much at the end of my wisdom. I would like to grand you access to the whole “catalina.out” file, but since i am new in this forum, i do not have permission to do so.

If you need more information or got a question, just do not hesitate.

Thank you very much in advance!

My suspicion is that if you’re seeing this message

Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

and you have the following in openboxes-config.properties

dataSource.url=jdbc:mysql://localhost:3306/openboxes?useSSL=false

then that means openboxes is not finding your openboxes-config.properties file.

We’d need to see the catalina.out to find out why.

I am pretty much at the end of my wisdom. I would like to grand you access to the whole “catalina.out” file, but since i am new in this forum, i do not have permission to do so.

If that means that you don’t have permission to upload to this thread, then just send it to me at support@openboxes.com. However, I don’t remember restricting uploads to the discussion forum, so I’ll look into that as well.

Hey jmiranda,
thank you so much for your fast response, I will send the file right now. In addition i also will send you a picture of the “pop-up” I get, every time i try to upload a file.

A post was split to a new topic: NoClassDefFoundError during connection pool creation

Ok so catalina.out shows us what’s happening here. We have some debug logging that helps verify what configuration files are being picked up by the application. In your case, none of the config property file candidates are being found on your system.

Using configuration locations [classpath:openboxes-config.properties, classpath:openboxes-config.groovy, file:/home/jonas/.grails/openboxes-config.properties, file:/home/jonas/.grails/openboxes-config.groovy] [production]
Unable to load specified config location classpath:openboxes-config.properties : class path resource [openboxes-config.properties] cannot be opened because it does not exist
Unable to load specified config location classpath:openboxes-config.groovy : class path resource [openboxes-config.groovy] cannot be opened because it does not exist
Unable to load specified config location file:/home/jonas/.grails/openboxes-config.properties : /home/jonas/.grails/openboxes-config.properties (No such file or directory)
Unable to load specified config location file:/home/jonas/.grails/openboxes-config.groovy : /home/jonas/.grails/openboxes-config.groovy (No such file or directory)

This might be because you’re starting the Tomcat service as yourself instead of the tomcat user specified in the docs (Tomcat - OpenBoxes). That’s not a big deal … you can start Tomcat with whatever user you want. You just need to make sure that the user has full access to all directories under the Tomcat home directory AND you need to move your configuration files to a .grails directory under that user’s home directory.

As for this issue, Discourse requires a Trust Level 1 in order to upload new files. This is what is required in order to attain Trust Level 1.

I cannot find a way to change this configuration but will keep searching. In the meantime, I’ve given your user Trust Level 1 so you should be able to upload files now.

Another clue that should tip you off that the expected config is not being picked up would be the exception that occurs when the application tries to create database connections for the connection pool.

	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1714)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2199)
	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2046)
	... 15 more

Allright so I checked the user, he is member of the group “root” and i removed the need of access permissions for each of the files, this should not be a source of problems.
After that I the .grails directory under the home directory:

image

I definitely helped, but I still get those three lines:

By the way, about this “.groovy” file, may be i missed something in the instructions, but i can not remember to have read something about creating one. Did I accidentally skipped a step?

I definitely helped, but I still get those three lines:

That’s fine. As long as you only see 3 lines then that means the openboxes-config.properties file was found. Those other files are optional.

By the way, about this “.groovy” file, may be i missed something in the instructions, but i can not remember to have read something about creating one. Did I accidentally skipped a step?

The .groovy file is used in cases where the configuration is more complex like boolean values or DSL (nested objects) that won’t get processed properly if included in the .properties file.

You don’t need to use the .groovy file unless you are trying to use boolean values (i.e. enable / disable features or Quartz jobs).

As an example, my local development environment includes a nested object in the openboxes-config.groovy properties file to specify mail properties.

grails { 
    mail { 
        enabled = true
        debug = true
        host = "smtp.gmail.com"
        port = 587
        username = "justin.miranda@gmail.com"
        password = "<password>" 
        from = "info@openboxes.com"
        props = ["mail.smtp.auth":"true", "mail.smtp.starttls.enable":"true", "mail.smtp.port":"587"]
    }
}

In order to do the same thing in openboxes-config.properties you’d need to add a property for each nested property.

grails.mail.enabled = true
grails.mail.debut = true
grails.mail.host = smtp.gmail.com
...
grails.mail.props = ["mail.smtp.auth":"true", "mail.smtp.starttls.enable":"true", "mail.smtp.port":"587"]

NOTE: I can’t remember if the grails.mail.props is even possible in the .properties version so it’s best to use the .groovy file for complex config and boolean values.

Let me know if the application was able to create database connections and start the database migration process.

Unfortunately it was not able to connect and it is still not working.
catalina.out (81.3 KB)

I’ve got you here the newest catalina.out version. May be you can give me a few suggestions what i have to change to get openboxes running.

Upload or send me the full file again and I’ll review it in the morning.

Ok, so from catalina.out it looks like the application is picking up the /home/jonas/.grails/openboxes-config.properties since there’s only 3 “Unable to load specified config location …” lines.

Using configuration locations [classpath:openboxes-config.properties, classpath:openboxes-config.groovy, file:/home/jonas/.grails/openboxes-config.properties, file:/home/jonas/.grails/openboxes-config.groovy] [production]
Unable to load specified config location classpath:openboxes-config.properties : class path resource [openboxes-config.properties] cannot be opened because it does not exist
Unable to load specified config location classpath:openboxes-config.groovy : class path resource [openboxes-config.groovy] cannot be opened because it does not exist
Unable to load specified config location file:/home/jonas/.grails/openboxes-config.groovy : /home/jonas/.grails/openboxes-config.groovy (No such file or directory)

We can also see that the connection pool is using what appears to be the URL that you specified in openboxes-config.properties. You’ll need to verify that this is true.

jdbcUrl -> jdbc:mysql://localhost:3306/openboxes?autoReconnect=true&useSSL=false

Aside: One change I would recommend … remove “autoReconnect=true&” from the dataSource url as this is no longer needed / used. This isn’t causing any problems but let’s simplify as much as we can.

So here’s the actual error you’re seeing in catalina.out.

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed

There’s an explanation about the error here

I assume we just need to set the allowPublicKeyRetrieval parameter on the dataSource URL.

dataSource.url=jdbc:mysql://localhost:3306/openboxes?allowPublicKeyRetrieval=true&useSSL=false

catalina.out

2022-08-16 08:00:18,848 [localhost-startStop-1] INFO  impl.AbstractPoolBackedDataSource  - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> z8kfsxaq19uirjtsnn0q1|ab65cc1, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> z8kfsxaq19uirjtsnn0q1|ab65cc1, idleConnectionTestPeriod -> 7200, initialPoolSize -> 10, jdbcUrl -> jdbc:mysql://localhost:3306/openboxes?autoReconnect=true&useSSL=false, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 14400, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 1800, maxPoolSize -> 100, maxStatements -> 180, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, preferredTestQuery -> SELECT 1, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 1, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
2022-08-16 08:06:59,784 [C3P0PooledConnectionPoolManager[identityToken->z8kfsxaq19uirjtsnn0q1|ab65cc1]-HelperThread-#0] WARN  resourcepool.BasicResourcePool  - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2546b9c6 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
	at sun.reflect.GeneratedConstructorAccessor31.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2105)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2030)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	at sun.reflect.GeneratedConstructorAccessor36.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
	at sun.reflect.GeneratedConstructorAccessor31.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:878)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:874)
	at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1777)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2199)
	at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2046)
	... 18 more

so I changed the settings like you recommended me.

But as you said in one of previous answers there is still a problem with the database connection.

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

This is the exception I get, as far as I know, this means that the database isn’t reachable at all.

I’ve already tried the following: I verified the IP adress with the “ping” command → it worked

  • I configured the firewall so it will allow the port
  • verified the “skip-networking” option is turned off
  • I started the server with “sudo service mysql start”

Is there anything else I could check?

I also uploaded the catalina.out file, so you can check it yourself.

Thanks again for your help and patience

So I would take OpenBoxes out of the equation until you can connect to the database remotely from a MySQL client.

For that, you need to set the bind address in MySQL configuration and then restart MySQL service.

bind-address = 0.0.0.0

After that, I would SSH into your OpenBoxes server and try to connect to the MySQL server.

mysql -u openboxes -p -h <ip address> openboxes

Until that works, OpenBoxes will be unable to connect to your database.

Allright so I bound the adress in the mysqld.cnf file and checked if I am able to connect to the MySql Server, this worked so far.

The problem is, it is still not working properly. I get the same exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Is there anything else you would suggest?

Are MySQL and Tomcat running on the same server?

For some reason I thought you were trying to connect to the database running on a different server?

Fwiw if the dataSource.url points to a MySQL database running on localhost then we don’t have to do any of the network configuration for MySQL.

Remove catalina.out and then restart Tomcat so we can get a clean log. Then upload the file again.

You’re having more trouble then you should be if you’re running the two services on the same machine.