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 Ekaterina Davydenko <ed...@lanl.gov> on 2010/05/05 23:04:44 UTC

How to do graceful exit from James server

Hi Norman,

We are starting James server from the command line for logging and 
debugging purposes. How could I gracefully exit the process? It seems to 
be hanging for a long time when I do Ctrl+C.

Thanks,
Ekaterina.

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


Re: How to do graceful exit from James server

Posted by Thilo Götz <tw...@gmx.de>.
You can use the service wrapper that comes with James to
run it as a Windows service.  You can then use net start/stop
to start and stop the service.

If you prefer to run it from the command line, a slightly
more graceful way to kill it is to telnet to the remote
manager and issue the "shutdown" command.  I don't think
technically though that's a big difference, but we would have
to ask the developers.

> telnet localhost 4555

JAMES Remote Administration Tool 2.3.2
Please enter your login and password
Login id:
root
Password:
root
Welcome admin. HELP for a list of commands
help
Currently implemented commands:
help                                    display this help
listusers                               display existing accounts
countusers                              display the number of existing accounts
adduser [username] [password]           add a new user
verify [username]                       verify if specified user exist
deluser [username]                      delete existing user
setpassword [username] [password]       sets a user's password
setalias [user] [alias]                 locally forwards all email for 'user' to
'alias'
showalias [username]                    shows a user's current email alias
unsetalias [user]                       unsets an alias for 'user'
setforwarding [username] [emailaddress] forwards a user's email to another email
address
showforwarding [username]               shows a user's current email forwarding
unsetforwarding [username]              removes a forward
user [repositoryname]                   change to another user repository
shutdown                                kills the current JVM (convenient when
James is run as a daemon)
quit                                    close connection
shutdown
Shutting down, bye bye

--Thilo

On 5/5/2010 23:52, Ekaterina Davydenko wrote:
> Yes, thanks for reply.
> 
> We will be eventually using it on Unix machine, at at this point, we are
> running under Windows environment. That is where I am really hoping to
> see if there is  more graceful way of exiting other than killing through
> the task manager or Ctrl+C (which hangs for a long time).
> 
> Max Levinson wrote:
>> Hi Ekaterina,
>>
>> I know you are asking Norman, but I am the one who faced the same problem
>> recently, there are two possible solutions to that, first to run a
>> starting
>> script in a background:
>>
>> *./run.sh > /path/to/james/log/james.log &*
>> *
>> *
>> *In this case you'll need to manually kill the process which is not a
>> good
>> solution sometimes.*
>> *
>> *
>> *This is the easiest way, the second way is a special startup script
>> which
>> will allow you to start it Red hat style, like*
>> *
>> *
>> *james start*
>> *
>> *
>> *I think if you use most recent trunk, Norman and the rest of the team
>> embedded script which is called James which will start James as a normal
>> application. This script is located in path/to/james/trunk/bin/james*
>> *
>> *
>> *Hope it will help you.*
>>
>> 2010/5/5 Ekaterina Davydenko <ed...@lanl.gov>
>>
>>  
>>> Hi Norman,
>>>
>>> We are starting James server from the command line for logging and
>>> debugging purposes. How could I gracefully exit the process? It seems
>>> to be
>>> hanging for a long time when I do Ctrl+C.
>>>
>>> Thanks,
>>> Ekaterina.
>>>
>>> ---------------------------------------------------------------------
>>> 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: How to do graceful exit from James server

Posted by Eric Charles <er...@u-mangate.com>.
Hi,
To use "james start", you need to build from trunk.
It will generate a wrapper that can launch james as a service.
I use that on linux and it works pretty well, but didn't try on windows.
What do you call "long time"? what is the log saying?
Tks,
Eric


On 05/06/2010 12:42 AM, Max Levinson wrote:
> The same answer really, I think startup script is available in trunk, it is
> called James.bat(Windows) James(Unix). I assume this is a startup script for
> Windows. Wich will allow to gracefully start,stop and restart James service.
>
> Norman will correct myself if I am wrong.
>
> 2010/5/5 Ekaterina Davydenko<ed...@lanl.gov>
>
>    
>> Yes, thanks for reply.
>>
>> We will be eventually using it on Unix machine, at at this point, we are
>> running under Windows environment. That is where I am really hoping to see
>> if there is  more graceful way of exiting other than killing through the
>> task manager or Ctrl+C (which hangs for a long time).
>>
>>
>> Max Levinson wrote:
>>
>>      
>>> Hi Ekaterina,
>>>
>>> I know you are asking Norman, but I am the one who faced the same problem
>>> recently, there are two possible solutions to that, first to run a
>>> starting
>>> script in a background:
>>>
>>> *./run.sh>  /path/to/james/log/james.log&*
>>> *
>>> *
>>> *In this case you'll need to manually kill the process which is not a good
>>> solution sometimes.*
>>> *
>>> *
>>> *This is the easiest way, the second way is a special startup script which
>>> will allow you to start it Red hat style, like*
>>> *
>>> *
>>> *james start*
>>> *
>>> *
>>> *I think if you use most recent trunk, Norman and the rest of the team
>>> embedded script which is called James which will start James as a normal
>>> application. This script is located in path/to/james/trunk/bin/james*
>>> *
>>> *
>>> *Hope it will help you.*
>>>
>>> 2010/5/5 Ekaterina Davydenko<ed...@lanl.gov>
>>>
>>>
>>>
>>>        
>>>> Hi Norman,
>>>>
>>>> We are starting James server from the command line for logging and
>>>> debugging purposes. How could I gracefully exit the process? It seems to
>>>> be
>>>> hanging for a long time when I do Ctrl+C.
>>>>
>>>> Thanks,
>>>> Ekaterina.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: How to do graceful exit from James server

Posted by Max Levinson <ma...@gmail.com>.
The same answer really, I think startup script is available in trunk, it is
called James.bat(Windows) James(Unix). I assume this is a startup script for
Windows. Wich will allow to gracefully start,stop and restart James service.

Norman will correct myself if I am wrong.

2010/5/5 Ekaterina Davydenko <ed...@lanl.gov>

> Yes, thanks for reply.
>
> We will be eventually using it on Unix machine, at at this point, we are
> running under Windows environment. That is where I am really hoping to see
> if there is  more graceful way of exiting other than killing through the
> task manager or Ctrl+C (which hangs for a long time).
>
>
> Max Levinson wrote:
>
>> Hi Ekaterina,
>>
>> I know you are asking Norman, but I am the one who faced the same problem
>> recently, there are two possible solutions to that, first to run a
>> starting
>> script in a background:
>>
>> *./run.sh > /path/to/james/log/james.log &*
>> *
>> *
>> *In this case you'll need to manually kill the process which is not a good
>> solution sometimes.*
>> *
>> *
>> *This is the easiest way, the second way is a special startup script which
>> will allow you to start it Red hat style, like*
>> *
>> *
>> *james start*
>> *
>> *
>> *I think if you use most recent trunk, Norman and the rest of the team
>> embedded script which is called James which will start James as a normal
>> application. This script is located in path/to/james/trunk/bin/james*
>> *
>> *
>> *Hope it will help you.*
>>
>> 2010/5/5 Ekaterina Davydenko <ed...@lanl.gov>
>>
>>
>>
>>> Hi Norman,
>>>
>>> We are starting James server from the command line for logging and
>>> debugging purposes. How could I gracefully exit the process? It seems to
>>> be
>>> hanging for a long time when I do Ctrl+C.
>>>
>>> Thanks,
>>> Ekaterina.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>
>

Re: How to do graceful exit from James server

Posted by Ekaterina Davydenko <ed...@lanl.gov>.
Yes, thanks for reply.

We will be eventually using it on Unix machine, at at this point, we are 
running under Windows environment. That is where I am really hoping to 
see if there is  more graceful way of exiting other than killing through 
the task manager or Ctrl+C (which hangs for a long time).

Max Levinson wrote:
> Hi Ekaterina,
>
> I know you are asking Norman, but I am the one who faced the same problem
> recently, there are two possible solutions to that, first to run a starting
> script in a background:
>
> *./run.sh > /path/to/james/log/james.log &*
> *
> *
> *In this case you'll need to manually kill the process which is not a good
> solution sometimes.*
> *
> *
> *This is the easiest way, the second way is a special startup script which
> will allow you to start it Red hat style, like*
> *
> *
> *james start*
> *
> *
> *I think if you use most recent trunk, Norman and the rest of the team
> embedded script which is called James which will start James as a normal
> application. This script is located in path/to/james/trunk/bin/james*
> *
> *
> *Hope it will help you.*
>
> 2010/5/5 Ekaterina Davydenko <ed...@lanl.gov>
>
>   
>> Hi Norman,
>>
>> We are starting James server from the command line for logging and
>> debugging purposes. How could I gracefully exit the process? It seems to be
>> hanging for a long time when I do Ctrl+C.
>>
>> Thanks,
>> Ekaterina.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>     
>
>   


Re: How to do graceful exit from James server

Posted by Max Levinson <ma...@gmail.com>.
Hi Ekaterina,

I know you are asking Norman, but I am the one who faced the same problem
recently, there are two possible solutions to that, first to run a starting
script in a background:

*./run.sh > /path/to/james/log/james.log &*
*
*
*In this case you'll need to manually kill the process which is not a good
solution sometimes.*
*
*
*This is the easiest way, the second way is a special startup script which
will allow you to start it Red hat style, like*
*
*
*james start*
*
*
*I think if you use most recent trunk, Norman and the rest of the team
embedded script which is called James which will start James as a normal
application. This script is located in path/to/james/trunk/bin/james*
*
*
*Hope it will help you.*

2010/5/5 Ekaterina Davydenko <ed...@lanl.gov>

> Hi Norman,
>
> We are starting James server from the command line for logging and
> debugging purposes. How could I gracefully exit the process? It seems to be
> hanging for a long time when I do Ctrl+C.
>
> Thanks,
> Ekaterina.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>