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 without auth will hang forever #925
Comments
@wenerme I will try to reproduce, but it would help a lot if you could show the configuration of the NATS Server and how you start it. Also, you mention using the Go client v1.3.0, but the "nats" tool uses go.mod and may have a different version. So would be good too to know "nats" specific version or git commit. Thanks! |
@kozlovic tried running in code using 1.3.0 and latest version, debug found the hang at processConnectInit/sendConnect/readProto .
Server is started by helm nats:
nats:
jetstream:
enabled: true
domain: xxx
memStorage:
enabled: false
fileStorage:
# bases on usecase
enabled: true
storageClassName: openebs-zfspv
size: 10Gi
exporter:
serviceMonitor:
enabled: true
mqtt:
enabled: true
websocket:
enabled: true
noTLS: true
allowedOrigins:
- "https://xxx"
appProtocol:
enabled: true
cluster:
enabled: false
auth:
enabled: true
resolver:
type: full
allowDelete: true
store:
dir: "/accounts/jwt"
size: 1Gi
operator: XXX
systemAccount: XXX
resolverPreload:
XXX: XXX dependencies:
- name: nats
version: 0.14.1
repository: https://nats-io.github.io/k8s/helm/charts |
@wenerme Thanks! Yes, I was able to reproduce and will work on a fix. Stay tuned. |
This was due to the fact that server sends a websocket CLOSE protocol, to which the library tried to respond to, but since it was done during the "connect" handshake under the connection lock, this caused a deadlock. Resolves #925 Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Defect
Make sure that these boxes are checked before submitting your issue -- thank you!
Versions of
nats.go
and thenats-server
if one was involved:OS/Container environment:
macos
Steps or code to reproduce the issue:
server log
Expected result:
report not authed
Actual result:
hang
The text was updated successfully, but these errors were encountered: