Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Stash 2.2.0 Upgrade - DB authentication issues

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2013

I'm trying to upgrade our sandbox/test instance of Stash from 2.1.2 (what Prod is currently on) to the 2.2.0 release, and after the upgrade (which on our test instance is merely unzipping the new 2.2.0 folder, stopping the old release, updating the service wrapper in /etc/init.d, and starting the new version) the web UI shows the following:

A fatal error has occurred

The following problem occurred which prevents Atlassian Stash from starting correctly:

  • The database, as currently configured, is not accessible.

The stash log shows the following:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.transaction.PlatformTransactionManager]: : Error creating bean with name 'pluginConfiguration' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'pluginPersistentStateStore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginPersistentStateStore' defined in class path resource [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#79720870' of type [com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#79720870' defined in class path resource [stash-context.xml]: Cannot resolve reference to bean 'pluginStateDao' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginStateDao' defined in URL [jar:file:/opt/atlassian/atlassian-stash-2.2.0/atlassian-stash/WEB-INF/lib/stash-dao-impl-2.2.0.jar!/com/atlassian/stash/internal/plugin/HibernatePluginStateDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'databaseService': Invocation of init method failed; nested exception is com.atlassian.util.concurrent.LazyReference$InitializationException: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:sqlserver://XXX;databaseName=XXX;, username = XXX. Terminating connection pool. Original Exception: ------

com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'XXX'. ClientConnectionId:656e6fe7-88c3-4d39-9e70-4642c5135447

The stash-config.properties was migrated to jdbc in the 2.1.x upgrade, and is the following (anonymized of course):

jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

jdbc.url=jdbc:sqlserver://XXX;databaseName=XXX

jdbc.user=XXX

jdbc.password=XXX

If I shut Stash 2.2.0 down and go to the 2.1.2 folder, I can run start-stash.sh in the bin subfolder and it starts right up. I switch back to 2.2.0 and I go back to "login failed". Since I can go back to 2.1.2 with the same jdbc values and the same file, I don't feel it's likely the ms-sql account is locked out.
Did something change in 2.2.0? Our username and password contains special characters consisting from the pool of !@#$%^&*() (the shift-number values on a US keyboard). Could 2.2.0 not be thrilled with our characters now?

2 answers

1 accepted

1 vote
Answer accepted
Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2013

I figured it out. There was a space at the end of the password line. Whatever Atlassian used in Stash 2.1.2 stopped at the end of the alpha-numeric character string, Stash 2.2.0's parser is now including everything, including the space. I removed the space and now Stash 2.2.0 starts up fine. Marking as resolved.

0 votes
Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013

Kelly,

There were some changes around how the connections are opened in 2.2, though nothing that should affect how it handles special characters in the username or password. Could you please open a support request so that we can work with you more directly? Once we've found the root cause, we can then update this question with an answer to hopefully benefit anyone else who encounters the issue.

Looking forward to hearing from you,
Bryan Turner

Kelly Schoenhofen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2013

I did open up a support request, just refreshing this so it quits bugging me to close this. I plan on closing this with the resolution that Atlassian support comes up with, in case anyone else has the same issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events