You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting a Siddhi app with an invalid URL in a websocket sink is not aborted, after upgrading to org.wso2.transport.http:org.wso2.transport.http.netty-6.3.24#28
Open
senthuran16 opened this issue
Mar 14, 2022
· 0 comments
Description:
When there is a websocket sink having an invalid URL in a Siddhi app, it is expected that, the Siddhi app should not successfully start, with an exception. This is being asserted in the following test case:
When upgrading to org.wso2.transport.http:org.wso2.transport.http.netty-6.3.24 (from 6.0.272), even though a SiddhiAppRuntimeException is thrown, it's not propagated. Instead, it's being caught and logged by io.netty.util.concurrent.DefaultPromise as follows:
[nioEventLoopGroup-58-1] WARN io.netty.util.concurrent.DefaultPromise - An exception was thrown by org.wso2.transport.http.netty.contractimpl.sender.websocket.WebSocketClient$$Lambda$43/876915855.operationComplete()
io.siddhi.core.exception.SiddhiAppRuntimeException: Error while connecting with the websocket server defined in 'io.siddhi.extension.map.xml.sourcemapper.XmlSourceMapper@671f7188'.
at io.siddhi.extension.io.websocket.source.WebSocketSourceHandshakeListener.onError(WebSocketSourceHandshakeListener.java:50)
at org.wso2.transport.http.netty.contractimpl.websocket.DefaultClientHandshakeFuture.notifyError(DefaultClientHandshakeFuture.java:64)
at org.wso2.transport.http.netty.contractimpl.sender.websocket.WebSocketClient.lambda$handshake$0(WebSocketClient.java:112)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:6060
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
It seems that, io.netty.util.concurrent.DefaultPromise is being engaged due to the addition of addListener, which was introduced in wso2/transport-http#364.
The text was updated successfully, but these errors were encountered:
senthuran16
changed the title
Starting a Siddhi app with an invalid URL in a websocket sink is not aborted, after upgrading toorg.wso2.transport.http:org.wso2.transport.http.netty-6.3.24
Starting a Siddhi app with an invalid URL in a websocket sink is not aborted, after upgrading to org.wso2.transport.http:org.wso2.transport.http.netty-6.3.24Mar 14, 2022
Description:
When there is a websocket sink having an invalid URL in a Siddhi app, it is expected that, the Siddhi app should not successfully start, with an exception. This is being asserted in the following test case:
siddhi-io-websocket/component/src/test/java/io/siddhi/extension/io/websocket/sink/WebSocketSinkTest.java
Line 93 in 37eb983
When upgrading to
org.wso2.transport.http:org.wso2.transport.http.netty-6.3.24
(from6.0.272
), even though aSiddhiAppRuntimeException
is thrown, it's not propagated. Instead, it's being caught and logged byio.netty.util.concurrent.DefaultPromise
as follows:It seems that,
io.netty.util.concurrent.DefaultPromise
is being engaged due to the addition ofaddListener
, which was introduced in wso2/transport-http#364.The text was updated successfully, but these errors were encountered: