[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-user
Subject:    Re: Unable to Start James as a Service on Windows 2003 SP2
From:       Stefano Bagnara <apache () bago ! org>
Date:       2008-05-05 10:35:13
Message-ID: 5013262.3244911209983748044.JavaMail.root () elysia ! void ! it
[Download RAW message or body]

The exceptions logged are about shutting down james and not starting it.

Try cleaning up all the logs and only starting james. Maybe the 
"wrapper" is using "java" from the classpath and it is different from 
the one declared by JAVA_HOME.
I often remove "java" and "javaw" from my windows and windows/system32 
folders because they give me issues with multiple different JVM 
installed, maybe this is also the issue you are hitting.

Stefano

Athar Shiraz Siddiqui ha scritto:
> Ok the admin user has java_home set to the following : C:\Java\jdk1.6.0_06
> 
> There are no logs in the temp directory under james_home
> (C:\James\james-binary-2.3.1\james-2.3.1\temp).
> 
> In wrapper.log:
> FATAL  | wrapper  | 2008/05/01 11:50:38 | Unable to execute Java
> command.  The system cannot find the file specified. (0x2)
> FATAL  | wrapper  | 2008/05/01 11:50:38 |     "java"
> -Djava.ext.dirs=../lib;../tools/lib -Dphoenix.home=..
> -Djava.security.policy=jar:file:phoenix-loader.jar!/META-INF/java.policy
> -Djava.security.manager -Dnetworkaddress.cache.ttl=300 -Xms16m -Xmx64m
> -Djava.library.path="./" -classpath "phoenix-loader.jar;wrapper.jar"
> -Dwrapper.key="qIYjdzZF6VRaFTjL" -Dwrapper.port=15012
> -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999
> -Dwrapper.pid=37892 -Dwrapper.version="3.2.0"
> -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE"
> -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1
> org.apache.avalon.phoenix.launcher.DaemonLauncher
> FATAL  | wrapper  | 2008/05/01 11:50:38 | Critical error: wait for JVM
> process failed
> STATUS | wrapper  | 2008/05/02 08:12:42 | --> Wrapper Started as Service
> STATUS | wrapper  | 2008/05/02 08:12:43 | Launching a JVM...
> FATAL  | wrapper  | 2008/05/02 08:12:43 | Unable to execute Java
> command.  The system cannot find the file specified. (0x2)
> FATAL  | wrapper  | 2008/05/02 08:12:43 |     "java"
> -Djava.ext.dirs=../lib;../tools/lib -Dphoenix.home=..
> -Djava.security.policy=jar:file:phoenix-loader.jar!/META-INF/java.policy
> -Djava.security.manager -Dnetworkaddress.cache.ttl=300 -Xms16m -Xmx64m
> -Djava.library.path="./" -classpath "phoenix-loader.jar;wrapper.jar"
> -Dwrapper.key="4SzuIhGfca0QWzxu" -Dwrapper.port=15012
> -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999
> -Dwrapper.pid=22560 -Dwrapper.version="3.2.0"
> -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE"
> -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1
> org.apache.avalon.phoenix.launcher.DaemonLauncher
> FATAL  | wrapper  | 2008/05/02 08:12:43 | Critical error: wait for JVM
> process failed
> 
> In phoenix.log:
> 
> INFO    2008-05-02 08:12:04.912 [Phoenix ] (): Logger started
> WARN    2008-05-02 08:12:04.927 [Phoenix ] (): Phoenix was not started
> by the daemon thus it will not be possible to restart the JVM via the
> Management interface.
> INFO    2008-05-02 08:12:04.990 [Phoenix.] (): Installing Sar located
> at file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/sqlResources.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\sqlResources.xml
> because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/james-fetchmail.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\james-fetchmail.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/james-smtphandlerchain.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\james-smtphandlerchain.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/miResources.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\miResources.xml
> because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/james-listmanager.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\james-listmanager.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/james-liststores.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\james-liststores.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/maxMessageSize.xml can not be extracted from
> the Sar "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar"
> into directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\maxMessageSize.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/oneAccountManyUsers.xml can not be extracted
> from the Sar "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar"
> into directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\oneAccountManyUsers.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/oneAccountManyUsersDynamic.xml can not be
> extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\oneAccountManyUsersDynamic.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/oneAccountPerUser.xml can not be extracted from
> the Sar "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar"
> into directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\oneAccountPerUser.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/oneAccountPerUserDynamic.xml can not be
> extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\oneAccountPerUserDynamic.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> conf/samples/fetchmail/remoteReceivedHeader.xml can not be extracted
> from the Sar "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar"
> into directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\conf\samples\fetchmail\remoteReceivedHeader.xml
>  because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> SAR-INF/config.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\SAR-INF\config.xml
> because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> SAR-INF/assembly.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\SAR-INF\assembly.xml
> because there is a file in the way.
> WARN    2008-05-02 08:12:05.068 [Phoenix.] (): The file
> SAR-INF/environment.xml can not be extracted from the Sar
> "file:/C:/James/james-binary-2.3.1/james-2.3.1/apps/james.sar" into
> directory C:\James\james-binary-2.3.1\james-2.3.1\apps\james\SAR-INF\environment.xml
>  because there is a file in the way.
> INFO    2008-05-02 08:12:05.209 [Phoenix.] (): Verifying that all
> key-stores have valid names.
> INFO    2008-05-02 08:12:05.209 [Phoenix.] (): Verify that any
> keystore names used by grant or permission reference actual keystores
> INFO    2008-05-02 08:12:05.209 [Phoenix.] (): Verify that if target
> is null then actions is null.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the name
> specified for Blocks and BlockListeners are valid.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the
> names specified for Component are valid.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the
> names specified for the Components are unique.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the
> dependency mapping is valid according to ComponentInfos.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the
> dependency mapping for every Component is valid with respect to other
> components.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that there
> are no circular dependencies between Components.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the name
> specified for Blocks and BlockListeners are unique.
> INFO    2008-05-02 08:12:05.318 [Phoenix.] (): Verifying that the
> specified Blocks have valid types.
> INFO    2008-05-02 08:12:05.349 [Phoenix.] (): Verifying that the
> specified BlockListeners have valid types.
> INFO    2008-05-02 08:12:05.381 [Phoenix.] (): 20 Blocks to process
> for phase "startup". Order of processing = [dnsserver,
> database-connections, mailstore, users-store, localusersrepository,
> spoolrepository, sockets, thread-manager, scheduler, James,
> mailetpackages, matcherpackages, spoolmanager, connections,
> remotemanager, pop3server, smtpserver, nntp-repository, nntpserver,
> fetchmail].
> INFO    2008-05-02 08:12:08.256 [Phoenix.] (): 20 Blocks to process
> for phase "shutdown". Order of processing = [spoolmanager,
> matcherpackages, mailetpackages, remotemanager, pop3server,
> smtpserver, fetchmail, James, dnsserver, nntpserver, nntp-repository,
> spoolrepository, localusersrepository, users-store, mailstore,
> connections, sockets, scheduler, database-connections,
> thread-manager].
> ERROR   2008-05-02 08:12:09.349 [Phoenix.] (): Component named
> "thread-manager" failed to pass through the Destruction stage.
> (Reason: java.lang.IllegalThreadStateException).
> ERROR   2008-05-02 08:12:09.349 [Phoenix.] (): Component named
> "thread-manager" failed to pass through the Destruction stage.
> (Reason: java.lang.IllegalThreadStateException).
> ERROR   2008-05-02 08:12:09.349 [Phoenix.] (): There was an error
> running phase "shutdown" for Block named "thread-manager". (Reason:
> Component named "thread-manager" failed to pass through the
> Destruction stage. (Reason: java.lang.IllegalThreadStateException).).
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
> Component named "thread-manager" failed to pass through the
> Destruction stage. (Reason: java.lang.IllegalThreadStateException).
> 	at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
>   at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:288)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:482)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:233)
>   at org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
>  rethrown from
> java.lang.IllegalThreadStateException
> 	at java.lang.ThreadGroup.destroy(ThreadGroup.java:743)
> 	at org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.dispose(DefaultThreadPool.java:76)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>   at org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager.dispose(AbstractThreadManager.java:69)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>   at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:274)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
>  INFO    2008-05-02 08:12:09.365 [Phoenix.] (): exception while
> stopping:Component named "thread-manager" failed to pass through the
> Destruction stage. (Reason: java.lang.IllegalThreadStateException).
> 
> ERROR   2008-05-02 08:12:09.365 [Phoenix.] (): Error undeploying
> application "james" when disposing Deployer. (Reason: Component named
> "thread-manager" failed to pass through the Destruction stage.
> (Reason: java.lang.IllegalThreadStateException).)
> org.apache.avalon.phoenix.interfaces.DeploymentException: Component
> named "thread-manager" failed to pass through the Destruction stage.
> (Reason: java.lang.IllegalThreadStateException).
> 	at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(DefaultDeployer.java:249)
>   at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(DefaultDeployer.java:154)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>   at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:67)
>   at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.shutdownComponents(DefaultEmbeddor.java:598)
>   at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.dispose(DefaultEmbeddor.java:342)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>  rethrown from
> org.apache.avalon.phoenix.interfaces.ApplicationException: Component
> named "thread-manager" failed to pass through the Destruction stage.
> (Reason: java.lang.IllegalThreadStateException).
> 	at org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:239)
>   at org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
>   at org.apache.avalon.framework.container.ContainerUtil.shutdown(ContainerUtil.java:66)
>   at org.apache.avalon.phoenix.components.kernel.DefaultKernel.shutdown(DefaultKernel.java:346)
>   at org.apache.avalon.phoenix.components.kernel.DefaultKernel.removeApplication(DefaultKernel.java:455)
>   at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.undeploy(DefaultDeployer.java:244)
>   at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.dispose(DefaultDeployer.java:154)
>  rethrown from
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
> Component named "thread-manager" failed to pass through the
> Destruction stage. (Reason: java.lang.IllegalThreadStateException).
> 	at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
>   at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:288)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:482)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.stop(DefaultApplication.java:233)
>   at org.apache.avalon.framework.container.ContainerUtil.stop(ContainerUtil.java:292)
>  rethrown from
> java.lang.IllegalThreadStateException
> 	at java.lang.ThreadGroup.destroy(ThreadGroup.java:743)
> 	at org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.dispose(DefaultThreadPool.java:76)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>   at org.apache.avalon.cornerstone.blocks.threads.AbstractThreadManager.dispose(AbstractThreadManager.java:69)
>   at org.apache.avalon.framework.container.ContainerUtil.dispose(ContainerUtil.java:306)
>   at org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.shutdown(LifecycleHelper.java:274)
>   at org.apache.avalon.phoenix.components.application.DefaultApplication.shutdown(DefaultApplication.java:566)
>  INFO    2008-05-02 08:12:09.396 [Phoenix ] (): Shutting down because
> there are not any applications running.
> 
> --
> 
> from windows logs ;
> 
> Event Type:	Error
> Event Source:	Service Control Manager
> Event Category:	None
> Event ID:	7034
> Date:		5/2/2008
> Time:		8:18:50 AM
> User:		N/A
> Computer:	LETTER4SURE
> Description:
> The James Mail Server 2.3.0 service terminated unexpectedly.  It has
> done this 5 time(s).
> 
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> 
> 
> On Fri, May 2, 2008 at 3:38 AM, Stefano Bagnara <apache@bago.org> wrote:
> > Athar Shiraz Siddiqui ha scritto:
> > 
> > 
> > 
> > > Using Windows Server 2003 SP2. James 2.3.1
> > > 
> > > Ok, I tried installing James as a service wrapper -i ..
> > > 
> > > and I had trouble adding it what with permissions being denied so I
> > > login as an Admin and I was able to add. Now when I try to have the
> > > service started I always get this strange error :
> > > 
> > > Could not start James Mail Server 2.3.0 service on Local Computer
> > > Error 1067: The process terminated unexpectedly.
> > > 
> > > Now I would like James to start as a service because that is kind of
> > > important for obvious reasons. What work arounds would you kind people
> > > suggest? Would you like more info or errors from logs etc.?
> > > 
> > Yes, we need some logs.
> > Look at the phoenix.console file in #jamesfolder#/temp, in logs in
> > #jamesfolder#/apps/james/logs and also at windows service logs.
> > 
> > As I first guess, check that *admin* has the JAVA_HOME set.
> > 
> > Stefano
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic