AnsweredAssumed Answered

can't login due to no database connection

Question asked by jackomohle on Nov 29, 2012
Latest reply on Nov 30, 2012 by jackomohle
Hi guys,
im a new user on this forum but i already browsed a lot of topics , none of the posters had the same problem as i have.
Fist of all my hardware setup:
hp proliant G6, 4 GB Ram, 1x ssd, 2x hdd 2 TB (software raid-1, mirror). (i ve read that alfresco and HP proliant servers are not compatible, i think this is non-sense)
software setup:
Ubuntu 12.10 installed in the ssd, Mysql server 5, pptpd server. i have copied the alf_data folder to my raidpartition, made the folder chown "user" and symbolic linked it to /opt/alfresco/alf_data  (this way i never lose content if one disk fails) .

the problem:
when i install alfresco it works fine, i can login to the share, add users etc.., for some reason after a few hours or days (installed multiple times) i cannot login anymore. After hours of searching and almost throwing my server out of the window i figured, i shouldn't do this on my own and try to be a new community uses en maybe in the future a valued contributer. So i hope u guys can help me with my problem.

mysql:
netstat -an | grep -i mysql
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
mysql> use alfresco;
Database changed
mysql> show tables
    -> ;
Empty set (0.00 sec)  –> this is because i deleted the database (it was filled before, but for some reason i couldn't anymore) and tried to setup an empty one with db_setup.sql



the database connector (mysql-connector-java-5.1.22-bin.jar) is stored in <alfrescodir>/tomcat/lib


The config common properties:
dir.root=/opt/alfresco/alf_data
web.application.context.url=http://127.0.0.1:8080/alfresco
db.username=alfresco
db.password=alfresco
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost:3306/alfresco?useUnicode=yes&characterEncoding=UTF-8
alfresco.rmi.services.host=0.0.0.0
the rest of the config is commented


The logs:
alfresco.log:
1
1:35:05,655 WARN  [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null,  message from server: "Host 'serveracg.local' is not allowed to connect to this MySQL server")
        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
      and so on……

catalina log:
      Nov 29, 2012 11:34:26 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
      Nov 29, 2012 11:34:26 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
      Nov 29, 2012 11:34:26 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
      INFO: OpenSSL successfully initialized (OpenSSL 0.9.8o 01 Jun 2010)
      Nov 29, 2012 11:34:26 AM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-apr-8080"]
      Nov 29, 2012 11:34:26 AM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
      Nov 29, 2012 11:34:26 AM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-8443"]
      Nov 29, 2012 11:34:26 AM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 1012 ms
      Nov 29, 2012 11:34:26 AM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Catalina
      Nov 29, 2012 11:34:26 AM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.30
      Nov 29, 2012 11:34:26 AM org.apache.catalina.startup.HostConfig deployDescriptor
      INFO: Deploying configuration descriptor /opt/alfresco/tomcat/conf/Catalina/localhost/solr.xml
      Nov 29, 2012 11:34:26 AM org.apache.catalina.startup.SetContextPropertiesRule begin
      WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
      Nov 29, 2012 11:34:32 AM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/wcmqs.war
      Nov 29, 2012 11:34:39 AM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/share.war
      Nov 29, 2012 11:34:50 AM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/alfresco.war
      Nov 29, 2012 11:34:56 AM org.apache.catalina.core.StandardContext addApplicationListener
      INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
      Nov 29, 2012 11:35:10 AM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Error listenerStart
      Nov 29, 2012 11:35:10 AM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Context [/alfresco] startup failed due to previous errors
      Nov 29, 2012 11:35:10 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
      SEVERE: The web application [/alfresco] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
      Nov 29, 2012 11:35:10 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
      SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@75eef295]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@1a7850b0]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      Nov 29, 2012 11:35:10 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
      SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@75eef295]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@1a7850b0]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      Nov 29, 2012 11:35:10 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
      SEVERE: The web application [/alfresco] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1@50f96063]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference@74197215}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
      Nov 29, 2012 11:35:10 AM org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive /opt/alfresco/tomcat/webapps/awe.war
      Nov 29, 2012 11:35:14 AM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory /opt/alfresco/tomcat/webapps/host-manager
      Nov 29, 2012 11:35:15 AM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory /opt/alfresco/tomcat/webapps/manager
      Nov 29, 2012 11:35:15 AM org.apache.catalina.startup.HostConfig deployDirectory
      INFO: Deploying web application directory /opt/alfresco/tomcat/webapps/ROOT
      Nov 29, 2012 11:35:15 AM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["http-apr-8080"]
      Nov 29, 2012 11:35:15 AM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["ajp-apr-8009"]
      Nov 29, 2012 11:35:15 AM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["http-bio-8443"]
      Nov 29, 2012 11:35:15 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 48309 ms

Outcomes