码头启动失败-使用中的地址 [英] Jetty Startup Fails - Address in Use

查看:113
本文介绍了码头启动失败-使用中的地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Amazon Ec2上尝试过码头;当我尝试开始时我收到地址已在使用中"错误.

I recently tried jetty on Amazon Ec2; when I try to start; I get 'Address already in use' error.

我确定此系统上没有其他服务器在运行.

I am certain that no other servers are running on the this system.

我什至尝试将端口更改为8080至8090之外的其他端口

I even try changing the ports to something other than 8080 to 8090

还是一样.

这是堆栈跟踪.有什么解决方法的想法吗?

Here is the stacktrace. Any ideas how to solve?

2011-08-16 17:22:14.722:WARN::FAILED SelectChannelConnector@10.122.219.58:8081 FAILED:       
java.net.BindException: Address already in use

2011-08-16 17:22:14.722:WARN::FAILED org.eclipse.jetty.server.Server@7dc05ffd:     
    java.net.BindException: Address already in use    
    java.lang.reflect.InvocationTargetException
    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:616)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
    at org.eclipse.jetty.start.Main.start(Main.java:612)
    at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
    at org.eclipse.jetty.start.Main.main(Main.java:79)

Caused by: java.net.BindException: Address already in use

这是netstat的输出

Here is the output of netstat

Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      15507/nginx         
tcp        0      0 0.0.0.0:4369                0.0.0.0:*                   LISTEN      24836/epmd          
tcp        0      0 0.0.0.0:28017               0.0.0.0:*                   LISTEN      964/mongod          
tcp        0      0 0.0.0.0:45204               0.0.0.0:*                   LISTEN      25006/beam          
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      847/sshd            
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      874/sendmail: accep 
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      15507/nginx         
tcp        0      0 0.0.0.0:27017               0.0.0.0:*                   LISTEN      964/mongod          
tcp        0      0 127.0.0.1:59795             127.0.0.1:4369              ESTABLISHED 25006/beam          
tcp        0      0 127.0.0.1:4369              127.0.0.1:59795             ESTABLISHED 24836/epmd          
tcp        0     48 10.122.219.58:22            69.117.34.101:51887         ESTABLISHED 14431/sshd: ec2-use 
tcp        0      0 :::80                       :::*                        LISTEN      15507/nginx         
tcp        0      0 :::22                       :::*                        LISTEN      847/sshd            
tcp        0      0 :::443                      :::*                        LISTEN      15507/nginx         
tcp        0      0 :::5672                     :::*                        LISTEN      25006/beam          
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               740/dhclient        
udp        0      0 10.122.219.58:123           0.0.0.0:*                               858/ntpd            
udp        0      0 127.0.0.1:123               0.0.0.0:*                               858/ntpd            
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               858/ntpd            
udp        0      0 fe80::1031:38ff:fe0:123     :::*                                    858/ntpd            
udp        0      0 ::1:123                     :::*                                    858/ntpd  

推荐答案

您可能需要终止该进程.运行ps -ef|grep jetty以获取进程号,然后将其杀死.确保您杀死正在运行应用服务器的进程(859是我计算机上的进程号).

You probably need to kill the process. Run ps -ef|grep jetty to get the process number, then kill it. Make sure you kill the process that is running the app server (859 was the process number on my machine).

$ ps -ef|grep jetty
  501   859   852   0 11:42AM ??         0:07.53 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -DSTOP.PORT=0 -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DOPTIONS=jmx -Didea.launcher.port=7532 -Didea.launcher.bin.path=/Applications/IntelliJ IDEA 10.app/bin -Dfile.encoding=MacRoman -classpath start.jar:/Applications/IntelliJ IDEA 10.app/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.eclipse.jetty.start.Main /private/var/folders/sm/y7_k5z7x0cj3qtdyds8x82jr0000gn/T/context4237974524894469000config/contexts-config.xml
  501   861   176   0 11:42AM ttys000    0:00.00 grep jetty
$ kill 859

这篇关于码头启动失败-使用中的地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆