Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-44258

Wrong db credentials generated for Synchrony when using JNDI datasource

    XMLWordPrintable

Details

    Description

      Synchrony generates wrong credentials when connecting to database, if Confluence is configured using a JNDI datasource.

      We use a Tomcat JDBC datasource to connect Confluence to our MySQL server. With Confluence 6.0 rc 2 Synchrony uses this datasource (Previous bug) but generated the wrong user name to connect to the MySQL server.

      atlassian-synchrony.log displays:

      java.sql.SQLException: Access denied for user 'root@sbdevcon1.schb.local'@'sbdevcon1.schb.local' (using password: YES)
      
      

      The datasource used by Confluence & configured in server.xml is:

      <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
       username="root"
       password="XXXXXXXXXXXXXXXXXX"
       driverClassName="com.mysql.jdbc.Driver"
       url="jdbc:mysql://mydbserver.mydomain/confluence?sessionVariables=storage_engine%3DInnoDB&amp;useUnicode=true&amp;characterEncoding=utf8" 
       defaultTransactionIsolation="READ_COMMITTED"
       validationQuery="SELECT 1"
       initialSize="10"
       maxTotal="30"
       maxIdle="10"
       minIdle="0" 
       maxWaitMillis="-1"
       timeBetweenEvictionRunsMillis="30000"
       minEvictableIdleTimeMillis="60000"
       testOnBorrow="true"
       removeAbandonedOnBorrow="false"
       removeAbandonedOnMaintenance="false"
       removeAbandonedTimeout="120"
       logAbandoned="true"
       />
      
      

      As you can see, the user name "root" is appended with the Confluence server name. This user is not configured AND cannot be created in MySQL because the username exceeds 16 chars. No workaround is known by now.

      Best regards,

      Jan-Peter Rusch

      Attachments

        Issue Links

          Activity

            People

              ttranminh Tam Tran
              160e57dc4064 Jan-Peter Rusch
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: