尝试通过websocket连接到Openshift上的服务器时出错

时间:2015-12-16 08:07:30

标签: java websocket openshift wildfly

我的Web套接字服务器和客户端是用Java编写的。当我使用JavaScript Web套接字客户端进行连接时,没有问题。当我切换到Java web-socket客户端时,我收到以下错误:

java.net.SocketException: Permission denied
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.SocketChannelImpl.bind(SocketChannelImpl.java:585)
at sun.nio.ch.SocketAdaptor.bind(SocketAdaptor.java:135)
at org.xnio.nio.WorkerThread.openTcpStreamConnection(WorkerThread.java:262)
at org.xnio.XnioIoThread.openStreamConnection(XnioIoThread.java:237)
at org.xnio.XnioWorker.openStreamConnection(XnioWorker.java:342)
at org.xnio.http.HttpUpgrade$HttpUpgradeState.doUpgrade(HttpUpgrade.java:247)
at org.xnio.http.HttpUpgrade$HttpUpgradeState.access$100(HttpUpgrade.java:165)
at org.xnio.http.HttpUpgrade.performUpgrade(HttpUpgrade.java:129)
at io.undertow.websockets.client.WebSocketClient$ConnectionBuilder.connect(WebSocketClient.java:313)
at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:305)
at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServerInternal(ServerWebSocketContainer.java:299)
at io.undertow.websockets.jsr.ServerWebSocketContainer.connectToServer(ServerWebSocketContainer.java:203)

代码在本地主机上完美运行。

0 个答案:

没有答案