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

Error during WebSocket server handshake java.io.IOException: Connection reset by peer #712

Open
BuddhiWathsala opened this issue Nov 19, 2019 · 2 comments

Comments

@BuddhiWathsala
Copy link
Contributor

Description:
Sometimes, when you deploy Siddhi tooling and runner in an OpenShift environment it will gives the following error.

[2019-11-19 12:42:48,760] ERROR {org.wso2.transport.http.netty.contractimpl.listener.WebSocketServerHandshakeHandler} - Error during WebSocket server handshake java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(Unknown Source)
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
	at sun.nio.ch.IOUtil.read(Unknown Source)
	at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Unknown Source)

Suggested Labels:
Bugfix

Affected Product Version:
5.1.1

Steps to reproduce:
Use the following YAMLs to deploy the Siddhi tooling editor.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: siddhi-tooling
spec:
  replicas: 1
  selector:
    matchLabels:
      name: siddhi-tooling
  template:
    metadata:
      labels:
        name: siddhi-tooling
    spec:
      containers:
        - name: siddhi-tooling
          image: siddhiio/siddhi-tooling:5.1.1
          command:
          - /home/siddhi_user/init.sh
          imagePullPolicy: Always
          ports:
          - containerPort: 9090
          - containerPort: 9443
          - containerPort: 9390
apiVersion: v1
kind: Service
metadata:
  labels:
    name: siddhi-tooling
  name: siddhi-tooling
spec:
  ports:
    - name: 9390-tcp
      port: 9390
      protocol: TCP
      targetPort: 9390
      nodePort: 32001
  type: NodePort
  selector:
    name: siddhi-tooling
status:
  loadBalancer: {}

Related Issues:

@mostafahussein
Copy link

@BuddhiWathsala, Have you solved this issue? I have seen similar issue with one of WSO2 products

@BuddhiWathsala
Copy link
Contributor Author

@mostafahussein the problem is, we couldn’t reproduce this issue yet. But according to our investigation, we think the following cases might cause this issue.

  • A firewall that enables in your K8s cluster
  • The slow network connection

Perhaps, you can consider the above cases to solve your issue.

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

2 participants