[ 
https://issues.apache.org/jira/browse/DAEMON-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668843#action_12668843
 ] 

Adrian Woodhead commented on DAEMON-12:
---------------------------------------

I am trying to run a daemon on port 80 using jsvc and I am getting this error. 
I see there has been some discussion about it here:

http://markmail.org/message/hal2o6gyhd4yjs5h?q=jsvc+java.net.BindException:+Permission+denied+list:org.apache.commons.user/#query:jsvc%20java.net.BindException%3A%20Permission%20denied%20list%3Aorg.apache.commons.user%2F+page:1+mid:tq7dndeolrdtzwk4+state:results

but it doesn't look like it's resolved to me. I try start jsvc as the root user 
and also passing in "-user root" and when my app starts up I see:

[2009-01-30 12:19:15] WARN (fm.last.streamer.Service:205) - Starting up server 
on 0.0.0.0:80...
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:597)
        at 
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.bind(ServerSocket.java:277)
        at fm.last.streamer.server.ThreadServer.<init>(ThreadServer.java:48)
        at fm.last.streamer.Service.startServer(Service.java:206)
        at fm.last.streamer.Service.init(Service.java:107)
        at 
fm.last.streamer.ServiceBootstrapDaemon.start(ServiceBootstrapDaemon.java:31)

I am using jsvc 1.0.1 on Linux (kernel 2.6.18-6-amd64) with Java HotSpot(TM) 
64-Bit Server VM (build 1.6.0-b105, mixed mode).


> [daemon] java fails to bind on port 80
> --------------------------------------
>
>                 Key: DAEMON-12
>                 URL: https://issues.apache.org/jira/browse/DAEMON-12
>             Project: Commons Daemon
>          Issue Type: Bug
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Ostap Bender
>            Priority: Blocker
>
> Platform is Ubuntu Linux, kernel 2.6.15 amd64 smp on a dual core processor.
> When I start Tomcat with jsvc and the Http connector on port 80 java fails to
> bind on port 80. I added an extra debug statement in set_caps to tell me when
> set_caps is called. In catalina.out I see before java even tries to bind, 
> three
> calls: the first with the value 1216, second with 1024 (CAP_NET_BIND_SERVICE)
> and the last with 0 (downgrade).
> After commenting out set_caps(0) from the jsvc-unix.c Tomcat starts ok.
> What is the reason for the downgrade happening so soon? Is it a race condition
> turned bad by the use of a multiprocessor?
> BTW, the Readme should mention that the module capabilities should be loaded.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to