[jenkins@hzNgJenkins ~]$ java -jar jenkins.war --httpPort=80
Running from: /home/jenkins/jenkins.war
webroot: $user.home/.jenkins
Apr 05, 2016 6:24:52 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Apr 05, 2016 6:24:52 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.8
Apr 05, 2016 6:24:55 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /home/jenkins/.jenkins found at: $user.home/.jenkins
Apr 05, 2016 6:24:57 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: FAILED SelectChannelConnector@0.0.0.0:80: java.net.SocketException: Permission denied
java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:444)
        at sun.nio.ch.Net.bind(Net.java:436)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at org.eclipse.jetty.server.Server.doStart(Server.java:293)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at winstone.Launcher.<init>(Launcher.java:154)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at Main._main(Main.java:293)

        at Main.main(Main.java:98)


解决办法:因为上述命令是 从Running from: /home/jenkins/jenkins.war 是以jenkins 用户start 所以小号端口80 被拒绝

移动到 root home目录下启动 jenkins,问题解决:


[root@hzNgJenkins jenkins]# cd /root/

[root@hzNgJenkins ~]# cp /home/jenkins/jenkins.war ./

root@hzNgJenkins ~]# java -jar jenkins.war --httpPort=80
Running from: /root/jenkins.war   #from root 主目录

webroot: $user.home/.jenkins
Apr 05, 2016 6:15:41 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Apr 05, 2016 6:15:44 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-winstone-2.8
Apr 05, 2016 6:15:48 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: /root/.jenkins found at: $user.home/.jenkins
Apr 05, 2016 6:15:51 PM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:80   #没有报错了
Apr 05, 2016 6:15:51 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
Apr 05, 2016 6:15:51 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 05, 2016 6:16:10 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 05, 2016 6:16:10 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Apr 05, 2016 6:16:10 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Apr 05, 2016 6:16:16 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Apr 05, 2016 6:16:18 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Apr 05, 2016 6:16:18 PM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 47630
Apr 05, 2016 6:16:18 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Apr 05, 2016 6:16:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 05, 2016 6:16:19 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running



Logo

更多推荐