recherche

Maison  >  Questions et réponses  >  le corps du texte

IDEA启动jetty报错端口占用,换eclipse却可以正常启动(相同端口)

1.使用idea启动jetty,jetty使用的本地的jetty,使用jetty默认8080端口,启动没问题。但是业务需要80端口,所以修改了jetty的配置start.ini中的port为80.
2.再次启动,怎么也启动不了,报错信息如下:

"C:\Program Files\Java\jdk1.7.0_79\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60958,suspend=y,server=n -DSTOP.PORT=0 -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=80 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DOPTIONS=jmx -Dfile.encoding=GBK -classpath "D:\业务\17-五一联运\jetty-distribution-9.2.10.v20150310\jetty-distribution-9.2.10.v20150310\start.jar;C:\Program Files\Java\jdk1.7.0_79\lib\tools.jar;D:\IntelliJ IDEA 15.0.2\lib\idea_rt.jar" org.eclipse.jetty.start.Main --module=jmx C:\Users\yanrunni\AppData\Local\Temp\context8config\jetty-contexts.xml
[2017-04-05 07:40:37,658] Artifact aries-manage:war: Server is not connected. Deploy is not available.
Detected server http port: 80
Connected to the target VM, address: '127.0.0.1:60958', transport: 'socket'
2017-04-05 19:40:38.250:INFO::main: Logging initialized @471ms
2017-04-05 19:40:38.291:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended.  See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2017-04-05 19:40:38.421:INFO:oejs.Server:main: jetty-9.2.10.v20150310
STOP.PORT=60970
STOP.KEY=1jlckpm3t5eyo
2017-04-05 19:40:38.442:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/D:/%E4%B8%9A%E5%8A%A1/17-%E4%BA%94%E4%B8%80%E8%81%94%E8%BF%90/jetty-distribution-9.2.10.v20150310/jetty-distribution-9.2.10.v20150310/webapps/] at interval 1
2017-04-05 19:40:38.445:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/C:/Users/yanrunni/AppData/Local/Temp/context8deploy/] at interval 1
2017-04-05 19:40:38.447:WARN:oejuc.AbstractLifeCycle:main: FAILED ServerConnector@7f156f46{HTTP/1.1}{0.0.0.0:80}: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
    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.ServerConnector.open(ServerConnector.java:321)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
    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 org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
    at org.eclipse.jetty.start.Main.start(Main.java:817)
    at org.eclipse.jetty.start.Main.main(Main.java:112)
2017-04-05 19:40:38.447:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.Server@5efefc32: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
    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.ServerConnector.open(ServerConnector.java:321)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
    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 org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
    at org.eclipse.jetty.start.Main.start(Main.java:817)
    at org.eclipse.jetty.start.Main.main(Main.java:112)
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:606)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)
    at org.eclipse.jetty.start.Main.start(Main.java:817)
    at org.eclipse.jetty.start.Main.main(Main.java:112)
Caused by: java.net.BindException: Address already in use: bind
    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.ServerConnector.open(ServerConnector.java:321)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)
    ... 7 more

Usage: java -jar start.jar [options] [properties] [configs]
       java -jar start.jar --help  # for more information
Disconnected from the target VM, address: '127.0.0.1:60958', transport: 'socket'
Disconnected from server

Process finished with exit code -2


3.重启电脑,还是启动不了,不知道电脑为什么这个80端口使用idea启动不了
4.但是问题是,换eclipse,端口还是80,启动却成功,eclipse好像用的自带的jetty。但是,在别的电脑上,idea是可以启动的(80端口)。也就是说,只有这台电脑的80端口老是被占用,且找不到解决办法!
5.实在不知道为什么···············

淡淡烟草味淡淡烟草味2794 Il y a quelques jours1688

répondre à tous(0)je répondrai

Pas de réponse
  • Annulerrépondre