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 "paul.degt" <pa...@gmail.com> on 2008/04/29 04:19:24 UTC

Running James as service under non-root user under Linux

I tried to use the short how-to which I found here for version 2.2, 
(using commons-daemon), but I keep getting the exception below (Centos 
5.1) starting James via "james-server.sh". Any help would be much 
appreciated.

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at 
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:156)
Caused by: java.lang.IllegalAccessError: tried to access method 
org.apache.avalon.phoenix.launcher.Main.startup([Ljava/lang/String;Ljava/util/Map;Z)I 
from class org.apache.avalon.phoenix.launcher.CommonsDaemonLauncher
    at 
org.apache.avalon.phoenix.launcher.CommonsDaemonLauncher.init(CommonsDaemonLauncher.java:55)
    ... 5 more
28/04/2008 21:42:27 19631 jsvc.exec error: Cannot load daemon
28/04/2008 21:42:27 19630 jsvc.exec error: Service exit with a return 
value of 3



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


Re: Running James as service under non-root user under Linux

Posted by "paul.degt" <pa...@gmail.com>.
But I invoke the script as root user. As I understand commons-daemon 
supposed to switch to non-root after binding to port 25, but the problem 
is that I am getting this exception at startup, which I don't fully 
understand.
I thought  there is a policy file missing from 
phoenix-daemon-loader-0.1.jar, but after adding one copied from 
phoenix-loader.jar  - same story.


Ian Wilson wrote:
> On Mon, Apr 28, 2008 at 10:19 PM, paul.degt <pa...@gmail.com> wrote:
>   
>> I tried to use the short how-to which I found here for version 2.2, (using
>> commons-daemon), but I keep getting the exception below (Centos 5.1)
>> starting James via "james-server.sh". Any help would be much appreciated.
>>     
>
> What port are you using to listen for incoming connections on?  If
> you're trying to open port 25, you'll need to be the root user in
> Linux.
>
> Ian
>   


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


Re: Running James as service under non-root user under Linux

Posted by Ian Wilson <ia...@gmail.com>.
On Mon, Apr 28, 2008 at 10:19 PM, paul.degt <pa...@gmail.com> wrote:
> I tried to use the short how-to which I found here for version 2.2, (using
> commons-daemon), but I keep getting the exception below (Centos 5.1)
> starting James via "james-server.sh". Any help would be much appreciated.

What port are you using to listen for incoming connections on?  If
you're trying to open port 25, you'll need to be the root user in
Linux.

Ian
-- 
Ian Wilson
ian.m.wilson@gmail.com
http://ianwilson.org || http://www.ians-blog.com

Solving site load issues with database replication is a lot like
solving your own personal problems with heroin -- at first, it sorta
works, but after a while things just get out of hand.

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


Re: Running James as service under non-root user under Linux

Posted by Danny Angus <da...@apache.org>.
On Tue, Apr 29, 2008 at 3:49 AM, Al Stu <Al...@simonslick.com> wrote:

>  Or better yet use a native mail application such as Postfix (SMTP) + Dovecot
>  (POP3).

Huh? This is the JAMES users mailing list.
If he wasn't using James he wouldn't be a James user. Get with the programme.

>  Java takes about 35 meg of memory.  If your email system is the
>  only thing on the server utilizing the Java VM then it is not very memory
>  efficient.

That is a very sweeping generalisation to make, and factually incorrect.
1/ Java is loaded for every java application, the size of java used
for any application isn't a reason why you shouldn't use James.
2/ If email is the only use of the server, perhaps because it is an
email server, then why wouldn't the email system be the only thing on
it?

James is an email server written in java, highly configurable and
flexible and extensible using java.
If that's not what you need, feel free to look elsewhere, however for
some people it *is* what they need.

d.

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


Re: Running James as service under non-root user under Linux

Posted by Al Stu <Al...@SimonSlick.com>.
Make sure to disable other mail servers such as the default sendmail so port 
25 is not in use.

Or better yet use a native mail application such as Postfix (SMTP) + Dovecot 
(POP3).  Java takes about 35 meg of memory.  If your email system is the 
only thing on the server utilizing the Java VM then it is not very memory 
efficient.

http://www.Postfix.org/
http://www.Dovecot.org/

http://SimonSlick.com/VEAF/


----- Original Message ----- 
From: "paul.degt" <pa...@gmail.com>
To: <se...@james.apache.org>
Sent: Monday, April 28, 2008 7:19 PM
Subject: Running James as service under non-root user under Linux


I tried to use the short how-to which I found here for version 2.2,
(using commons-daemon), but I keep getting the exception below (Centos
5.1) starting James via "james-server.sh". Any help would be much
appreciated.

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:156)
Caused by: java.lang.IllegalAccessError: tried to access method
org.apache.avalon.phoenix.launcher.Main.startup([Ljava/lang/String;Ljava/util/Map;Z)I
from class org.apache.avalon.phoenix.launcher.CommonsDaemonLauncher
    at
org.apache.avalon.phoenix.launcher.CommonsDaemonLauncher.init(CommonsDaemonLauncher.java:55)
    ... 5 more
28/04/2008 21:42:27 19631 jsvc.exec error: Cannot load daemon
28/04/2008 21:42:27 19630 jsvc.exec error: Service exit with a return
value of 3



---------------------------------------------------------------------
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