← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Connection error

 

Hi Fatima,

My guess is that the previous tomcat process is still running. You could
try to kill all java processes before attempting a new restart.

For example:

ps aux | grep java
Dear All,

Hey i am using dhis2 version 2.9 few months.

Recently , i checkout the dhis2 version 2.9 source code and build it and
keep the war file inside tomcat->webapps.
when i am running the tomcat i got a error "Failed to initialize connector
[Connector[AJP/1.3-8009]", "SEVERE: Error listenerStart",
"SEVERE: Context [/dhis] startup failed due to previous errors"

Details error are given bellow. Please help

Mar 11, 2013 4:36:45 PM org.apache.catalina.core.AprLifecycleListener init
INFO: An older version 1.1.20 of the APR based Apache Tomcat Native library
is i
nstalled, while Tomcat recommends a minimum version of 1.1.22
Mar 11, 2013 4:36:45 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Mar 11, 2013 4:36:45 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], ra
ndom [true].
Mar 11, 2013 4:36:46 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8085"]
Mar 11, 2013 4:36:46 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Mar 11, 2013 4:36:46 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler
["ajp-apr
-8009"]
java.lang.Exception: Socket bind failed: [730048] Only one usage of each
socket
address (protocol/network address/port) is normally permitted.
        at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:423)
        at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.jav
a:566)
        at
org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:417)
        at
org.apache.catalina.connector.Connector.initInternal(Connector.java:9
56)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at
org.apache.catalina.core.StandardService.initInternal(StandardService
.java:559)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.j
ava:814)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:624)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:649)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)

Mar 11, 2013 4:36:46 PM org.apache.catalina.core.StandardService
initInternal
SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Failed to initialize component
[Connecto
r[AJP/1.3-8009]]
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
        at
org.apache.catalina.core.StandardService.initInternal(StandardService
.java:559)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at
org.apache.catalina.core.StandardServer.initInternal(StandardServer.j
ava:814)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:624)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:649)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:449)
Caused by: org.apache.catalina.LifecycleException: Protocol handler
initializati
on failed
        at
org.apache.catalina.connector.Connector.initInternal(Connector.java:9
58)
        at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        ... 12 more
Caused by: java.lang.Exception: Socket bind failed: [730048] Only one usage
of e
ach socket address (protocol/network address/port) is normally permitted.
        at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:423)
        at
org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.jav
a:566)
        at
org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:417)
        at
org.apache.catalina.connector.Connector.initInternal(Connector.java:9
56)
        ... 13 more

Mar 11, 2013 4:36:46 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1415 ms
Mar 11, 2013 4:36:46 PM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 11, 2013 4:36:46 PM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Mar 11, 2013 4:36:46 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\tomcat-7.0.27\webapps\birt.war
Mar 11, 2013 4:36:46 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://www.eclipse.org/birt/taglibs/birt.tld is
already
defined
Mar 11, 2013 4:36:48 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\tomcat-7.0.27\webapps\dhis.war
Mar 11, 2013 4:36:52 PM org.apache.catalina.loader.WebappClassLoader
validateJar
File
INFO:
validateJarFile(C:\tomcat-7.0.27\webapps\dhis\WEB-INF\lib\geronimo-servlet
_2.5_spec-1.1.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offe
nding class: javax/servlet/Servlet.class
* ERROR 2013-03-11 16:37:09,593 Context initialization failed
(ContextLoader.jav
a [pool-2-thread-1])
org.springframework.beans.factory.BeanCreationException: Error creating
bean wit
h name 'org.hisp.dhis.dxf2.metadata.ExportService': Injection of autowired
depen
dencies failed; nested exception is
org.springframework.beans.factory.BeanCreati
onException: Could not autowire field: protected
org.hisp.dhis.common.Identifiab
leObjectManager org.hisp.dhis.dxf2.metadata.DefaultExportService.manager;
nested
 exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Er
ror loading class
[org.hisp.dhis.dataverify.hibernate.HibernateDataVerificationS
tore] for bean with name 'org.hisp.dhis.dataverify.DataVerificationStore'
define
d in URL
[jar:file:/C:/tomcat-7.0.27/webapps/dhis/WEB-INF/lib/dhis-in-service-re
ports-2.9.jar!/META-INF/dhis/beans.xml]: problem with class file or
dependent cl
ass; nested exception is java.lang.NoClassDefFoundError:
org/hisp/dhis/dataverif
y/DataVerificationStore
        at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java
:287)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:294)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:193)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at
org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:913)
        at
org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:464)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebA
pplicationContext(ContextLoader.java:385)
        at
org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:284)
        at
org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:111)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4779)
        at
org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5273)
        at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:895)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
1)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)

        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)

        at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1603)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not au
towire field: protected org.hisp.dhis.common.IdentifiableObjectManager
org.hisp.
dhis.dxf2.metadata.DefaultExportService.manager; nested exception is
org.springf
ramework.beans.factory.CannotLoadBeanClassException: Error loading class
[org.hi
sp.dhis.dataverify.hibernate.HibernateDataVerificationStore] for bean with
name
'org.hisp.dhis.dataverify.DataVerificationStore' defined in URL
[jar:file:/C:/to
mcat-7.0.27/webapps/dhis/WEB-INF/lib/dhis-in-service-reports-2.9.jar!/META-INF/d
his/beans.xml]: problem with class file or dependent class; nested
exception is
java.lang.NoClassDefFoundError:
org/hisp/dhis/dataverify/DataVerificationStore
        at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:506)
        at
org.springframework.beans.factory.annotation.InjectionMetadata.inject
(InjectionMetadata.java:87)
        at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java
:284)
        ... 27 more
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
Error
 loading class
[org.hisp.dhis.dataverify.hibernate.HibernateDataVerificationStor
e] for bean with name 'org.hisp.dhis.dataverify.DataVerificationStore'
defined i
n URL
[jar:file:/C:/tomcat-7.0.27/webapps/dhis/WEB-INF/lib/dhis-in-service-repor
ts-2.9.jar!/META-INF/dhis/beans.xml]: problem with class file or dependent
class
; nested exception is java.lang.NoClassDefFoundError:
org/hisp/dhis/dataverify/D
ataVerificationStore
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolve
BeanClass(AbstractBeanFactory.java:1265)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
ryBean(AbstractBeanFactory.java:1331)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanNamesForType(DefaultListableBeanFactory.java:317)
        at
org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIn
cludingAncestors(BeanFactoryUtils.java:185)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
findAutowireCandidates(DefaultListableBeanFactory.java:833)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
doResolveDependency(DefaultListableBeanFactory.java:790)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:707)
        at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:478)
        ... 29 more
Caused by: java.lang.NoClassDefFoundError:
org/hisp/dhis/dataverify/DataVerifica
tionStore
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:2889)
        at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:1170)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1678)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1556)
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
        at
org.springframework.beans.factory.support.AbstractBeanDefinition.reso
lveBeanClass(AbstractBeanDefinition.java:417)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doResol
veBeanClass(AbstractBeanFactory.java:1283)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.resolve
BeanClass(AbstractBeanFactory.java:1254)
        ... 37 more
Caused by: java.lang.ClassNotFoundException:
org.hisp.dhis.dataverify.DataVerifi
cationStore
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1711)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1556)
        ... 48 more
Mar 11, 2013 4:37:09 PM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Error listenerStart
Mar 11, 2013 4:37:09 PM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Context [/dhis] startup failed due to previous errors
* INFO  2013-03-11 16:37:09,609 De-registering jdbc driver:
sun.jdbc.odbc.JdbcOd
bcDriver@1513d1e (StartupListener.java [pool-2-thread-1])
Mar 11, 2013 4:37:09 PM org.apache.catalina.loader.WebappClassLoader
checkThread
LocalMapForLeaks
SEVERE: The web application [/dhis] created a ThreadLocal with key of type
[com.
sun.xml.bind.v2.ClassFactory$1] (value
[com.sun.xml.bind.v2.ClassFactory$1@737bf
e]) and a value of type [java.util.WeakHashMap] (value [{class
java.util.ArrayLi
st=java.lang.ref.WeakReference@1d162fa, class
javax.xml.bind.annotation.adapters
.CollapsedStringAdapter=java.lang.ref.WeakReference@1b928bd, class
org.apache.ca
mel.model.PackageScanDefinition=java.lang.ref.WeakReference@121c26a, class
org.a
pache.camel.spring.CamelProducerTemplateFactoryBean=java.lang.ref.WeakReference@
162df94, class
org.apache.camel.spring.CamelContextFactoryBean=java.lang.ref.Wea
kReference@449d72}]) but failed to remove it when the web application was
stoppe
d. Threads are going to be renewed over time to try and avoid a probable
memory
leak.
Mar 11, 2013 4:37:09 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory C:\tomcat-7.0.27\webapps\docs
Mar 11, 2013 4:37:10 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory C:\tomcat-7.0.27\webapps\examples
Mar 11, 2013 4:37:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
C:\tomcat-7.0.27\webapps\host-manager
Mar 11, 2013 4:37:12 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory C:\tomcat-7.0.27\webapps\manager
Mar 11, 2013 4:37:13 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory C:\tomcat-7.0.27\webapps\ROOT
Mar 11, 2013 4:37:13 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8085"]
Mar 11, 2013 4:37:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 26697 ms


-- 

*Fatema Uddin**
*----------------------------------------
*Junior Advisor HIS*
Priority Area Health
Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh
*Office location:*
Monitoring & Evaluation Unit
Ministry of Health and Family Welfare
Janashankha Bhaban (2nd Floor), Azimpur
Dhaka 1205, Bangladesh

Phone: +880 2 966 53 13
Fax:   +880 2 966 53 14
**

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

Follow ups

References