openboxes setup on ES2 instance

Hii guys help me in settin up the openboxes in my server.

As I mentioned via email, I’ll be offline for the next few days. So please continue to use our existing email exchange or we can move the conversation here.

Here’s my last message to you. Please follow up with any new issues you might have encountered.

The following error (from your log file) indicates that you’re data source URL is wrong.

2020-05-19 21:15:50,867 [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 -> 1br9vb9aaczectu1t2q6r0|7d79cfa, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1br9vb9aaczectu1t2q6r0|7d79cfa, idleConnectionTestPeriod -> 7200, initialPoolSize -> 10, jdbcUrl -> jdbc:mysql://['<ip-address>:3306/openboxes?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 ] 2020-05-19 21:16:21,329 [C3P0PooledConnectionPoolManager[identityToken->1br9vb9aaczectu1t2q6r0|7d79cfa]-HelperThread-#2] WARN resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@7f0608f8 -- 
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: java.sql.SQLException: null, message from server: "Host 
'<ip-address>' is not allowed to connect to this MySQL server"

The problem is that your EC2 instance does not allow connections to port 3306 without a firewall rule change. And even with the firewall rule, MySQL is not listening on the external IP address by default so it’ll reject connections.

It’s best to leave the firewall and MySQL configuration because in your case MySQL and Tomcat are running on the same server, so there’s no need for the application to create database connections against an external IP address.

So please change the dataSource.url back to the default (localhost) and make sure that username and password is set properly.

# Database connection settings

Then test your connection

mysql -u <username> -p<password> openboxes

NOTE: There’s no space between the -p and <password>.

If that does not work, make sure you followed the MySQL section from the installation instructions.

mysql -u root -p -e 'create database openboxes default charset utf8;'
mysql -u root -p -e 'grant all on openboxes.* to <username>@localhost identified by "<password>";'

The and in the instructions should be used as the dataSource.username and dataSource.password above.

Once you can successfully log into MySQL from the command line with the username and password, then you can restart Tomcat.

If OpenBoxes connects to the database you need to be very patient. It takes about 10-15 minutes for the database migrations to be executed. You can tail the logs to see whether it’s making process.

NOTE: It’ll probably take about 30 minutes for you since your EC2 instance only has 1GB of memory. So please be patient.

Attach the catalina.out if you encounter any other issues (I recommend using or just attach the log to this post).