I am trying to upgrade our old Bitbucket instance to the new 7.6.0 version. I can't pass the database setup because it can't connect to MySQL 8.0.21. Both Bitbucket and MySQL run in separate Docker containers. New instances of Jira and Confluence (those too are running in separate Docker containers) can connect normaly without too much trouble.
This is the error:
The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again. com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:217) com.atlassian.stash.internal.migration.DefaultDatabaseMigrationService.validateConfiguration(DefaultDatabaseMigrationService.java:85) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4 milliseconds ago. The last packet sent successfully to the server was 4 milliseconds ago. org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:43) com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:214) ... Communications link failure The last packet successfully received from the server was 4 milliseconds ago. The last packet sent successfully to the server was 4 milliseconds ago. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ... Received fatal alert: protocol_version sun.security.ssl.Alerts.getSSLException(Alerts.java:214) sun.security.ssl.Alerts.getSSLException(Alerts.java:159) sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2041) ...
Hey @Fabrizio Santini!
A few things stand out to me here that make this a bit tricky.
I am trying to upgrade our old Bitbucket instance to the new 7.6.0 version. I can't pass the database setup
A regular upgrade should not bring you to the database setup page. If you are doing a test upgrade of an already existing instance, you won't need to set up the DB connection again. If you are getting that page it means that either:
If you are just trying to install a fresh 7.6.0 instance than the above can be ignored. Otherwise, you need to make sure your Bitbucket home and shared directory are where you expect them to be.
Onto the error itself.
Received fatal alert: protocol_version sun.security.ssl.Alerts.getSSLException(Alerts.java:214) sun.security.ssl.Alerts.getSSLException(Alerts.java:159) sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2041)
This is an SSL error being thrown to Bitbucket. I haven't seen anything specific to Bitbucket, but I did come across https://support.huaweicloud.com/intl/en-us/trouble-rds/rds_12_0005.html
So some possibilities are:
So what can we do?
I hope this helps!
Dev Tools Support Engineer
Hi @Fabrizio Santini, thanks for reaching out!
Please note that while MySQL is supported by Bitbucket Server, it's currently not recommended especially in larger instances, due to inherent performance and deadlock issues that occur in this database engine under heavy load. You can see Connecting Bitbucket Server to MySQL for more information.
That said, let's look at a few things to make sure the configuration has been set correctly. First, let's start by making sure that the Bitbucket container is able to see the MySQL container on the network. You can check if the container is on the same docker network and try a ping or telnet to confirm if they can reach each other.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events