4 Replies Latest reply on Dec 11, 2007 1:01 PM by Daniel Gallot

    JBoss refuses to start again after stopping/starting MySQL

    Daniel Gallot Newbie


      I have got a pb running AS 4.2.2 + portal 2.6.2 after stopping/starting MySQL 5.0.26.

      Everything was running OK.
      I have just stopped/started MySQL to change a variable value (max_allowed_packet). First I had stopped JBoss, and after MySQL being running again, I had started JBoss again. But then JBoss makes an error :

      18:02:47,654 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      18:02:47,797 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      18:02:48,103 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.CommunicationsException: Communications link failure
      Last packet sent to the server was 0 ms ago.)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)

      I have tried several times to start/stop everything, putting again the first MySQL variable value, verifying it is possible to connect to MySQL (command line, MySQL admin). But I did not get again JBoss connecting to MySQL.
      I don't understand what has changed.
      It is like if stopping/starting MySQL, something changed on MySQL server but I don't see what.

      If somebody can give me some help, that would be very nice.
      Thanks a lot.

        • 1. Re: JBoss refuses to start again after stopping/starting MyS
          Peter Johnson Master

          Based on the location of the error immediately after the establishment of DefaultDS, I assume that the error messages concern that datasource (the portal uses PortlaDS, not DefaultDS, and it is opened much later in the console output). I therefore assume that you replaced the hsqldb-ds.xml file, which uses Hypersonic to manage DefaultDS, with another *-ds.xml file to use MySQL for DefaultDS. Could you post the contents of that *-ds.xml file.

          • 2. Re: JBoss refuses to start again after stopping/starting MyS
            Daniel Gallot Newbie

            here it is :

            <!-- Datasource config for MySQL using 3.0.9 available from:

            It worked fine before stopping/starting MySQL.
            It was the first time I stop/start MySQL since the JBoss installation.

            Thanks for your help.

            • 3. Re: JBoss refuses to start again after stopping/starting MyS
              Peter Johnson Master

              What operating system (and version) are you using? What version of mysql?

              If you run the mysql command line utility, can you log into mysql with the user-name and password in you *-ds.xml file and then access the jboss_appserver database?

              • 4. Re: JBoss refuses to start again after stopping/starting MyS
                Daniel Gallot Newbie

                I have looked for a pb around modifications of MySQL variables.
                And I have found that the "skip-networking" parameter has been added.
                How was it added ? I suspect some MySQL administrator using and saving, but first without effect since MySQL was not restarted.

                Thanks for your replies.