Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket support for cli protonj2 #291

Open
lenosi opened this issue Sep 8, 2021 · 0 comments
Open

WebSocket support for cli protonj2 #291

lenosi opened this issue Sep 8, 2021 · 0 comments

Comments

@lenosi
Copy link
Member

lenosi commented Sep 8, 2021

Feature request: Add WebsSocket support for protonj2

This issue was created based on:

// does it support opening listening sockets? listening websocket?

Status for ws://

➜  test_loadbalancer git:(master) ✗ podman run --rm quay.io/rhmessagingqe/cli-java:ubi8-openjdk11 cli-protonj2-sender -b ws://artemis-broker-A:61616 -a 'q' --msg-content 'ABC' --count 1
org.apache.qpid.protonj2.client.exceptions.ClientOperationTimedOutException: Sender open timed out waiting for remote to respond
        at org.apache.qpid.protonj2.client.impl.ClientSender.lambda$handleLocalOpen$4(ClientSender.java:420)
        at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
        at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Thread.java:829) 

Status for valid amqp://

 ➜  test_loadbalancer git:(master) ✗ podman run  --rm quay.io/rhmessagingqe/cli-java:ubi8-openjdk11 cli-protonj2-sender -b amqp://artemis-broker-A:61616 -a 'q' --msg-content 'ABC' --count 1
{'address': 'q', 'group-id': None, 'subject': None, 'user-id': None, 'correlation-id': None, 'content-encoding': None, 'priority': 4, 'type': 'string', 'ttl': 0, 'absolute-expiry-time': 0, 'content': 'ABC', 'redelivered': False, 'reply-to-group-id': None, 'durable': False, 'group-sequence': 0, 'creation-time': 0, 'content-type': 'string', 'id': None, 'reply-to': None, 'properties': {}}

Status for invalid 2s://

➜  test_loadbalancer git:(master) ✗ podman run --rm quay.io/rhmessagingqe/cli-java:ubi8-openjdk11 cli-protonj2-sender -b 2s://artemis-broker-A:61616 -a 'q' --msg-content 'ABC' --count 1 
org.apache.qpid.protonj2.client.exceptions.ClientConnectionRemotelyClosedException: 2s: Name or service not known
        at org.apache.qpid.protonj2.client.impl.ClientExceptionSupport.convertToConnectionClosedException(ClientExceptionSupport.java:157)
        at org.apache.qpid.protonj2.client.impl.ClientTransportListener.transportError(ClientTransportListener.java:69)
        at org.apache.qpid.protonj2.client.transport.TcpTransport.handleTransportFailure(TcpTransport.java:342)
        at org.apache.qpid.protonj2.client.transport.TcpTransport$NettyDefaultHandler.exceptionCaught(TcpTransport.java:460)
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:302)
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:281)
        at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:273)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1377)
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:302)
        at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:281)
        at io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:907)
        at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:69)
        at io.netty.channel.ChannelFutureListener$3.operationComplete(ChannelFutureListener.java:65)
        at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
        at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
        at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
        at io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:184)
        at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
        at io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:30)
        at org.apache.qpid.protonj2.client.transport.TcpTransport.connect(TcpTransport.java:149)
        at org.apache.qpid.protonj2.client.transport.TcpTransport.connect(TcpTransport.java:56)
        at org.apache.qpid.protonj2.client.impl.ClientConnection.attemptConnection(ClientConnection.java:966)
        at org.apache.qpid.protonj2.client.impl.ClientConnection.lambda$scheduleReconnect$18(ClientConnection.java:985)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:387)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.net.UnknownHostException: 2s: Name or service not known
        at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
        at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
        at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
        at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
        at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1368)
        at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1302)
        at java.base/java.net.InetAddress.getByName(InetAddress.java:1252)
        at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:156)
        at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:153)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153)
        at io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41)
        at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61)
        at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:53)
        at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:55)
        at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:31)
        at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:106)
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect0(Bootstrap.java:206)
        at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:162)
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:139)
        at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:123)
        ... 10 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant