You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by philguillard <ph...@gmail.com> on 2006/04/06 12:21:29 UTC

"Shutting down because there are not any applications running"

Hi all,

James seems to shutdown regularly, at the moment i've just found that
in phoenix.log :

INFO    2006-04-06 04:47:09.314 [Phoenix.] (): 18 Blocks to process for 
phase "shutdown". Order of processing = [spoolmanager, remotemanager, 
pop3server, smtpserver, fetchpop, fetchmail, James, dnsserver, 
nntpserver, nntp-repository, mailstore, users-store, objectstorage, 
connections, sockets, scheduler, database-connections, thread-manager].
INFO    2006-04-06 04:47:10.596 [Phoenix ] (): Shutting down because 
there are not any applications running.


Some people here can interprete that?

Regards,

Phil

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


Re: "Shutting down because there are not any applications running"

Posted by philguillard <ph...@gmail.com>.
Thanks a lot Stefano, i feel stupid, problem was just that...

PHil



Stefano Bagnara wrote:
> philguillard wrote:
> 
>> Thanks,
>> This is what i was thinking at first time, but since i deleted all the 
>> cron jobs and nothing appeared on /var/log/*.log i'm blocked.
>> I forgot to mention that i launch james like this (.run.sh &), this is 
>> maybe not the best way..
> 
> 
> If you run it with "./run.sh &" it can die when you leave the shell 
> where you ran the command and James has filled the stdout buffer.
> Furthermore you loose exception thrown to the stderr.
> 
> 
> I create a /etc/rc.d/init.d/phoenix file:
> --------------------------
> #!/bin/sh
> # Startup script for anacron
> #
> # chkconfig: 3 80 20
> # description: Run cron jobs that were left out due to downtime
> 
> # Source function library.
> . /etc/rc.d/init.d/functions
> 
> [ -f /usr/local/james-2.3-dev/bin/phoenix.sh ] || exit 0
> 
> /usr/local/james-2.3-dev/bin/phoenix.sh $1
> ------------------------------
> 
> And if you are on RedHat/Fedora here are the commands to handle it as a 
> service:
>  > chkconfig --add phoenix
> Start the service:
>  > service phoenix start
> Stop the service:
>  > service phoenix start
> 
> 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


Re: "Shutting down because there are not any applications running"

Posted by Stefano Bagnara <ap...@bago.org>.
philguillard wrote:
> Thanks,
> This is what i was thinking at first time, but since i deleted all the 
> cron jobs and nothing appeared on /var/log/*.log i'm blocked.
> I forgot to mention that i launch james like this (.run.sh &), this is 
> maybe not the best way..

If you run it with "./run.sh &" it can die when you leave the shell 
where you ran the command and James has filled the stdout buffer.
Furthermore you loose exception thrown to the stderr.


I create a /etc/rc.d/init.d/phoenix file:
--------------------------
#!/bin/sh
# Startup script for anacron
#
# chkconfig: 3 80 20
# description: Run cron jobs that were left out due to downtime

# Source function library.
. /etc/rc.d/init.d/functions

[ -f /usr/local/james-2.3-dev/bin/phoenix.sh ] || exit 0

/usr/local/james-2.3-dev/bin/phoenix.sh $1
------------------------------

And if you are on RedHat/Fedora here are the commands to handle it as a 
service:
 > chkconfig --add phoenix
Start the service:
 > service phoenix start
Stop the service:
 > service phoenix start

Stefano


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


Re: "Shutting down because there are not any applications running"

Posted by philguillard <ph...@gmail.com>.
Thanks,
This is what i was thinking at first time, but since i deleted all the 
cron jobs and nothing appeared on /var/log/*.log i'm blocked.
I forgot to mention that i launch james like this (.run.sh &), this is 
maybe not the best way..

Regards,

Phil


Stefano Bagnara wrote:
> If James does not logs exception then the problem is probably in the 
> system.
> 
> Check your system logs (/var/log/messages and other files depending on 
> your OS).
> 
> Are you on a VPS with limited/controlled resources? If the OS try to 
> kill one of the java processes (threads) it may close that way.
> 
> Once I had a VPS that was killing any "non registered" TCP listening 
> process once an hour.
> 
> Stefano
> 
> philguillard wrote:
> 
>> Hi,
>>
>> I come back on the same subject, hope somebody can help!
>>
>> James runs for a while (1-2 hours) then shuts down. I thought the 
>> cause came from some cron job but it seems not.
>>
>> My conf in short:
>> - I have smtpserver, pop3server
>> - repository form mails in files
>> - repository for users in DB mysql
>> 2 mailets (1 of them is checking data_source in mysql database to 
>> check members, replacing subjetc, from and destination fields)
>> - James is shutdown with low or even no activity after 1 or 2 hours
>> - The logs i get below
>> - (just in case see config.xml in attachment)
>>
>> This is the few lines i get with a tail -f on /var/logs/, 
>> james-2.2.0/logs/ and james-2.2.0/apps/james/logs/ running from after 
>> start to the shutdown :
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: "Shutting down because there are not any applications running"

Posted by Norman Maurer <nm...@spam-box.de>.
I would consider using screen or daemontools. With daemontools james
will get started automaticly if it dies:

http://cr.yp.to/daemontools.html


With screen you can open a new "screen" and run it in foreground in it.

I use daemontools.

bye


Am Mittwoch, den 19.04.2006, 10:41 -0500 schrieb philguillard:
> Thanks,
> This is what i was thinking at first time, but since i deleted all the 
> cron jobs and nothing appeared on /var/log/*.log i'm blocked.
> I forgot to mention that i launch james like this (.run.sh &), this is 
> maybe not the best way..
> 
> Regards,
> 
> Phil
> 
> 
> Stefano Bagnara wrote:
> > If James does not logs exception then the problem is probably in the 
> > system.
> > 
> > Check your system logs (/var/log/messages and other files depending on 
> > your OS).
> > 
> > Are you on a VPS with limited/controlled resources? If the OS try to 
> > kill one of the java processes (threads) it may close that way.
> > 
> > Once I had a VPS that was killing any "non registered" TCP listening 
> > process once an hour.
> > 
> > Stefano
> > 
> > philguillard wrote:
> > 
> >> Hi,
> >>
> >> I come back on the same subject, hope somebody can help!
> >>
> >> James runs for a while (1-2 hours) then shuts down. I thought the 
> >> cause came from some cron job but it seems not.
> >>
> >> My conf in short:
> >> - I have smtpserver, pop3server
> >> - repository form mails in files
> >> - repository for users in DB mysql
> >> 2 mailets (1 of them is checking data_source in mysql database to 
> >> check members, replacing subjetc, from and destination fields)
> >> - James is shutdown with low or even no activity after 1 or 2 hours
> >> - The logs i get below
> >> - (just in case see config.xml in attachment)
> >>
> >> This is the few lines i get with a tail -f on /var/logs/, 
> >> james-2.2.0/logs/ and james-2.2.0/apps/james/logs/ running from after 
> >> start to the shutdown :
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> !EXCUBATOR:2,44465b6144181244018481!


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


Re: "Shutting down because there are not any applications running"

Posted by Stefano Bagnara <ap...@bago.org>.
If James does not logs exception then the problem is probably in the system.

Check your system logs (/var/log/messages and other files depending on 
your OS).

Are you on a VPS with limited/controlled resources? If the OS try to 
kill one of the java processes (threads) it may close that way.

Once I had a VPS that was killing any "non registered" TCP listening 
process once an hour.

Stefano

philguillard wrote:
> Hi,
> 
> I come back on the same subject, hope somebody can help!
> 
> James runs for a while (1-2 hours) then shuts down. I thought the cause 
> came from some cron job but it seems not.
> 
> My conf in short:
> - I have smtpserver, pop3server
> - repository form mails in files
> - repository for users in DB mysql
> 2 mailets (1 of them is checking data_source in mysql database to check 
> members, replacing subjetc, from and destination fields)
> - James is shutdown with low or even no activity after 1 or 2 hours
> - The logs i get below
> - (just in case see config.xml in attachment)
> 
> This is the few lines i get with a tail -f on /var/logs/, 
> james-2.2.0/logs/ and james-2.2.0/apps/james/logs/ running from after 
> start to the shutdown :


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


Re: "Shutting down because there are not any applications running"

Posted by philguillard <ph...@gmail.com>.
Hi,

I come back on the same subject, hope somebody can help!

James runs for a while (1-2 hours) then shuts down. I thought the cause 
came from some cron job but it seems not.

My conf in short:
- I have smtpserver, pop3server
- repository form mails in files
- repository for users in DB mysql
2 mailets (1 of them is checking data_source in mysql database to check 
members, replacing subjetc, from and destination fields)
- James is shutdown with low or even no activity after 1 or 2 hours
- The logs i get below
- (just in case see config.xml in attachment)

This is the few lines i get with a tail -f on /var/logs/, 
james-2.2.0/logs/ and james-2.2.0/apps/james/logs/ running from after 
start to the shutdown :


==> spoolmanager-2006-04-19-06-10.log <==
19/04/06 08:13:35 INFO  spoolmanager: JamesSpoolManager dispose...
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #2
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #9
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #3
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #1
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #3
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #1
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #4
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #9
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #4
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #5
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #7
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #5
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #7
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #8
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #2
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #8
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #6
19/04/06 08:13:35 INFO  spoolmanager: Interrupted JamesSpoolManager: 
Spool Thread #0
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #6
19/04/06 08:13:35 INFO  spoolmanager: Stop JamesSpoolManager: Spool 
Thread #0

==> /opt/james-2.2.0/logs/phoenix.log <==
INFO    2006-04-19 08:13:35.274 [Phoenix.] (): 18 Blocks to process for 
phase "shutdown". Order of processing = [spoolmanager, remotemanager, 
pop3server, smtpserver, fetchpop, fetchmail, James, dnsserver, 
nntpserver, nntp-repository, mailstore, users-store, objectstorage, 
connections, sockets, scheduler, database-connections, thread-manager].

==> spoolmanager-2006-04-19-06-10.log <==
19/04/06 08:13:36 INFO  spoolmanager: JamesSpoolManager thread shutdown 
completed.

==> /opt/james-2.2.0/logs/phoenix.log <==
INFO    2006-04-19 08:13:36.548 [Phoenix ] (): Shutting down because 
there are not any applications running.

Phil

Stefano Bagnara wrote:
> This should only happen when there are no enabled services or when the 
> enabled services cannot be started so there are no active services.
> 
> What did you change from the default configuration?
> 
> Can you provide more logs?
> Does the server start and suddenly stop with this message or does it 
> work for a while?
> Can you provide more information on your environment (james version, os, 
> jvm version)
> 
> Stefano
> 
> philguillard wrote:
> 
>> Hi all,
>>
>> James seems to shutdown regularly, at the moment i've just found that
>> in phoenix.log :
>>
>> INFO    2006-04-06 04:47:09.314 [Phoenix.] (): 18 Blocks to process 
>> for phase "shutdown". Order of processing = [spoolmanager, 
>> remotemanager, pop3server, smtpserver, fetchpop, fetchmail, James, 
>> dnsserver, nntpserver, nntp-repository, mailstore, users-store, 
>> objectstorage, connections, sockets, scheduler, database-connections, 
>> thread-manager].
>> INFO    2006-04-06 04:47:10.596 [Phoenix ] (): Shutting down because 
>> there are not any applications running.
>>
>>
>> Some people here can interprete that?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 

Re: "Shutting down because there are not any applications running"

Posted by Stefano Bagnara <ap...@bago.org>.
There are 3 logs:
logs/phoenix.log
tmp/phoenix.console (or the console if you run it as a service)
apps/james/logs/*.log

You should check all of them in the last seconds before it shutdown.

A clean shutdown task should only happen when you kill the process from 
the outside.

Can you provide the script that restart exim? If it kills james because 
it binds the port 25 then the shutdown is the correct consequence.

Stefano

philguillard wrote:
> Thanks a lot Stefano,
> 
> The server starts and stops a few hours later. James 2.2.0, jvm 5, 
> redhat enterprise 9.
> 
>  From default configuration i added a mailet to configure my mailinglist 
> from DB, and setted users from DB also.
> 
>  From last news it could be done from another script from my provider 
> trying to restart another mail service called exim so i don't know what 
> to think about it right now. I didn't find any more interesting logs at 
> the moment.


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


Re: "Shutting down because there are not any applications running"

Posted by philguillard <ph...@gmail.com>.
Thanks a lot Stefano,

The server starts and stops a few hours later. James 2.2.0, jvm 5, 
redhat enterprise 9.

 From default configuration i added a mailet to configure my mailinglist 
from DB, and setted users from DB also.

 From last news it could be done from another script from my provider 
trying to restart another mail service called exim so i don't know what 
to think about it right now. I didn't find any more interesting logs at 
the moment.

Phil


Stefano Bagnara wrote:
> This should only happen when there are no enabled services or when the 
> enabled services cannot be started so there are no active services.
> 
> What did you change from the default configuration?
> 
> Can you provide more logs?
> Does the server start and suddenly stop with this message or does it 
> work for a while?
> Can you provide more information on your environment (james version, os, 
> jvm version)
> 
> Stefano
> 
> philguillard wrote:
> 
>> Hi all,
>>
>> James seems to shutdown regularly, at the moment i've just found that
>> in phoenix.log :
>>
>> INFO    2006-04-06 04:47:09.314 [Phoenix.] (): 18 Blocks to process 
>> for phase "shutdown". Order of processing = [spoolmanager, 
>> remotemanager, pop3server, smtpserver, fetchpop, fetchmail, James, 
>> dnsserver, nntpserver, nntp-repository, mailstore, users-store, 
>> objectstorage, connections, sockets, scheduler, database-connections, 
>> thread-manager].
>> INFO    2006-04-06 04:47:10.596 [Phoenix ] (): Shutting down because 
>> there are not any applications running.
>>
>>
>> Some people here can interprete that?
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: "Shutting down because there are not any applications running"

Posted by Stefano Bagnara <ap...@bago.org>.
This should only happen when there are no enabled services or when the 
enabled services cannot be started so there are no active services.

What did you change from the default configuration?

Can you provide more logs?
Does the server start and suddenly stop with this message or does it 
work for a while?
Can you provide more information on your environment (james version, os, 
jvm version)

Stefano

philguillard wrote:
> Hi all,
> 
> James seems to shutdown regularly, at the moment i've just found that
> in phoenix.log :
> 
> INFO    2006-04-06 04:47:09.314 [Phoenix.] (): 18 Blocks to process for 
> phase "shutdown". Order of processing = [spoolmanager, remotemanager, 
> pop3server, smtpserver, fetchpop, fetchmail, James, dnsserver, 
> nntpserver, nntp-repository, mailstore, users-store, objectstorage, 
> connections, sockets, scheduler, database-connections, thread-manager].
> INFO    2006-04-06 04:47:10.596 [Phoenix ] (): Shutting down because 
> there are not any applications running.
> 
> 
> Some people here can interprete that?


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


Re: Circular Dependency

Posted by Stefano Bagnara <ap...@bago.org>.
The mailet is a multithreaded component started at james initialization 
and disposed just before the james stop.
You can create the scheduler just inside the Mailet with no need to use 
an avalon-component.

The fulcrum-quartz package is useful if you need to schedule processes 
in the container not starting from the mailet.

Stefano

Philip Tomlinson wrote:
> Hi,
> 
> I have a mailet in which I want to schedule a job.
> I am using James 2.2.0.
> 
> I have found the fulcrum-quartz package which shows how to configure the 
> quartz scheduler in an avalon container.
> 
> I have added in a new block into the assembly.xml for the quartz 
> scheduler and added it into the James block as a provider.
> Now in a mailet I can schedule a job.
> 
> However I want the job to send an email.
> 
> I have tried adding in a the James block as a provide of the quartz 
> block I defined (and added in the dependency in the .xinfo) file.
> 
> Now I have a circular dependency which the server duly tells me.
> 
> In the case where I have 2 blocks that "use" the services of each other, 
> how can one set up the assembly.xml and .xinfo files to facilitate this
> and avoid the circular dependency.
> I cant see how to do it other than using the service method in the 
> container (James) to potentially set itself into the component 
> (QuartzScheduler).
> Is there a better way?
> 
> Rgds,
> Phil


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


Circular Dependency

Posted by Philip Tomlinson <ph...@pot.co.nz>.
Hi,

I have a mailet in which I want to schedule a job.
I am using James 2.2.0.

I have found the fulcrum-quartz package which shows how to configure the 
quartz scheduler in an avalon container.

I have added in a new block into the assembly.xml for the quartz 
scheduler and added it into the James block as a provider.
Now in a mailet I can schedule a job.

However I want the job to send an email.

I have tried adding in a the James block as a provide of the quartz 
block I defined (and added in the dependency in the .xinfo) file.

Now I have a circular dependency which the server duly tells me.

In the case where I have 2 blocks that "use" the services of each other, 
how can one set up the assembly.xml and .xinfo files to facilitate this
and avoid the circular dependency.
I cant see how to do it other than using the service method in the 
container (James) to potentially set itself into the component 
(QuartzScheduler).
Is there a better way?

Rgds,
Phil

-------------------------
Philip Tomlinson
PJT Consulting
Email: phil@pot.co.nz
Mobile: 021 707 385




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