WebService - [Debug] java.net.BindException: Can't assign requested address

Connected to the target VM, address: ‘127.0.0.1:57803‘, transport: ‘socket‘
Exception in thread "main" com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Can‘t assign requested address
    at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:130)
    at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:64)
    at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:232)
    at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:126)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
    at webservice.WebServicePublish.main(WebServicePublish.java:9)
Caused by: java.net.BindException: Can‘t assign requested address
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:100)
    at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
    at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
    at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
    at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:98)
    ... 5 more
Disconnected from the target VM, address: ‘127.0.0.1:57803‘, transport: ‘socket‘

Process finished with exit code 1

两种情况:

1.端口号被占用,导致地址无法绑定

windows查看端口pid
netstat -aon|findstr 8080(端口号)

linux查看端口占用
netstat -anp|grep 8080

2.ip地址与本机地址不匹配,导致地址无法绑定

windows查看ip
ipconfig

linux查看ip
ifconfig

WebService - [Debug] java.net.BindException: Can't assign requested address

原文地址:https://www.cnblogs.com/frankcui/p/10503146.html

时间: 2024-11-06 12:35:22

WebService - [Debug] java.net.BindException: Can't assign requested address的相关文章

使用Java进行udp-demo编程时碰到的consumer和producter无法连接并报出“java.net.SocketException: Can&#39;t assign requested address”问题

在用Java编写了一个udp生产者和消费者的demo时,在生产者启动的时候会抛出异常 java.net.SocketException: Can't assign requested address at java.net.PlainDatagramSocketImpl.join(Native Method) at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:178) at

java.net.BindException: Cannot assign requested address

tomcat启动后报错 2017-6-7 17:23:49 org.apache.catalina.core.StandardServer await 严重: StandardServer.await: create[localhost:8005]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.Pl

Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind问题

Caused by: java.net.BindException: Cannot assign requested address: JVM_Bind更改这个问题可以从两方面着手:一:查看ip和端口是否正确(大多数都是这个问题引起的)二:查看端口是否被占用了

Tomcat启动时报StandardServer.await: create[8005]: java.net.BindException: Cannot assign requested address: JVM_Bind

问题描述: 今天一早,所有淡定下来后准备启动本地Tomcat,突然出现一堆错误: 严重: StandardServer.await: create[8005]: java.net.BindException: Cannot assign requested address: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.

Tomcat启动报错:严重: StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

org.apache.catalina.core.StandardServer await        SEVERE: StandardServer.await: create[8005]:        java.net.BindException: Cannot assign requested address java.net.BindException: Cannot assign requested address        at java.net.PlainSocketImpl

tomcat java.net.BindException: Cannot assign requested address 解决方法

今天线上TOMCAT启动时遇到了下比较麻烦的问题,错误如下: 21-Apr-2016 15:14:19.077 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8015]: java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.sock

Tomcat启动异常 java.net.BindException: Cannot assign requested address: JVM_Bind

从Apache官网下载的tomcat7,在MyEclipse中启动时抛出如下异常: 严重: StandardServer.await: create[localhost:8005]: java.net.BindException: Cannot assign requested address: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Plain

Problem binding to [yarn.com:8031] java.net.BindException: Cannot assign requested address

at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1467)Caused by: java.net.BindException: Problem binding to [yarn.com:8031] java.net.BindException: Cannot assign requested address; For more details see: 是由于虚拟

在linux上用jmeter压测时出现很多异常java.net.NoRouteToHostException: Cannot assign requested address.

今天压力测试时, 刚开始出现了很多异常, 都是 java.net.NoRouteToHostException: Cannot assign requested address. 经网上查资料, 是由于linux分配的客户端连接端口用尽, 无法建立socket连接所致,虽然socket正常关闭,但是端口不是立即释放, 而是处于TIME_WAIT状态, 默认等待60s后才释放. 查看linux支持的客户端连接端口范围, 也就是28232个端口: cat /proc/sys/net/ipv4/ip_