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

{"externalError":"connection-closed","methodArray":[{"find":[{}]},...,"level":"error","message":"[connection-error]"} #555

Open
ashwatthb opened this issue Jan 24, 2021 · 8 comments

Comments

@ashwatthb
Copy link

ashwatthb commented Jan 24, 2021

we are running nosqlclient on kubernetes cluster and we have this error while trying to execute query again statefulset.

on console i have this error:
[1007] Please refresh collections or re-connect, connection has been closed

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

  1. Install nosqlclient on kubernetes
  2. Run external mognodb service
  3. connect to any statefulset and try to query

Context

Your Environment

  • Nosqlclient version used:
  • Environment name (e.g. chrome 39, portable, docker):
  • Operating System and version (e.g. windows 10, ubuntu 16, osx 10.12):
@rsercano
Copy link
Member

Hello @ashwatthb this means nosqlclient has lost the connection to MongoDB, did you encounter this again after refreshing collections?

@ashwatthb
Copy link
Author

Hi @rsercano Thanks for your swift reply. Yes, I tried multiple times and the behaviour is same. We are running nosqlclient for around a year and there was no issues.

I tried to reproduce by connecting to different databases, and the issue is same.

image

@rsercano
Copy link
Member

Did you update the nosqlclient version ?

@ashwatthb
Copy link
Author

ashwatthb commented Jan 24, 2021

I was running the version 4.0.0, after this issue tried upgrading to 4.0.1 both versions has the same behaviour.

@rsercano
Copy link
Member

Can you please share nosqlclient logs by not giving the sensitive part @ashwatthb ?

@ashwatthb
Copy link
Author

Please find the logs below

=> Starting app on port 3000...
{"level":"info","message":"[insert-default-settings]"}
{"level":"info","message":"[migrate-connections]"}
{"connection":{"url":"masked"},"level":"info","message":"[parse-url]"}
{"parsedUrl":{"auth":{"user":"masked","password":"masked"},"server_options":{"socketOptions":{}},"db_options":{"read_preference_tags":null,"authSource":"masked","read_preference":"primary"},"rs_options":{"socketOptions":{},"rs_name":"rs0"},"mongos_options":{},"dbName":"admin","servers":[{"host":"masked","port":27017}],"isSrvRecord":false},"level":"info","message":"[parsed-url]"}
{"connection":{"servers":[{"host":"masked","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017}],"connectionName":"product - ae","url":"","authenticationType":"scram_sha_1","databaseName":"admin","scram_sha_1":{"username":"","password":"","authSource":"masked-db"},"options":{"connectionTimeout":"","socketTimeout":"","readPreference":"primary","connectWithNoPrimary":false,"replicaSetName":"rs0"}},"level":"info","message":"[check-connection]"}
{"connection":{"servers":[{"host":"masked-db-0.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017}],"connectionName":"product - ae","url":"","authenticationType":"scram_sha_1","databaseName":"admin","scram_sha_1":{"username":"","password":"","authSource":"masked-db"},"options":{"connectionTimeout":"","socketTimeout":"","readPreference":"primary","connectWithNoPrimary":false,"replicaSetName":"rs0"}},"level":"info","message":"[save-connection]"}
{"connectionUrl":"mongodb://masked_user:masked_pass@masked-db-0.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017/?authSource=masked-db&readPreference=primary&connectTimeoutMS=3000&socketTimeoutMS=5000&replicaSet=rs0&authMechanism=SCRAM-SHA-1","options":{"useNewUrlParser":true,"useUnifiedTopology":true,"authSource":"masked-db"},"sessionId":"ZnWXsY2mRPv4Ydjpr","level":"debug","message":"[connect]"}
{"sessionLength":"1","level":"info","message":"[connect]"}
{"externalError":"not authorized on admin to execute command { listCollections: 1, filter: {}, cursor: {}, nameOnly: false, lsid: { id: UUID(\"cc4a66b0-976c-4490-a6c6-d4e1237fa6ac\") }, $clusterTime: { clusterTime: Timestamp(1611490794, 1), signature: { hash: BinData(0, EDE06742723A6AFBADC58D81DEB9780A5DD6A039), keyId: 6860441688142249985 } }, $db: \"admin\" }","sessionId":"ZnWXsY2mRPv4Ydjpr","connectionOptions":{"useNewUrlParser":true,"useUnifiedTopology":true,"authSource":"masked-db"},"level":"error","message":"[connection-error]"}
{"connection":{"servers":[{"host":"masked-db-0.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017}],"connectionName":"product - ae","url":"","authenticationType":"scram_sha_1","databaseName":"masked-db","scram_sha_1":{"username":"","password":"","authSource":"masked-db"},"options":{"connectionTimeout":"","socketTimeout":"","readPreference":"primary","connectWithNoPrimary":false,"replicaSetName":"rs0"},"_id":"7c5qw3XGFikJXtmqG"},"level":"info","message":"[check-connection]"}
{"connection":{"servers":[{"host":"masked-db-0.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017},{"host":"masked-host.mongodb-replicaset","port":27017}],"connectionName":"product - ae","url":"","authenticationType":"scram_sha_1","databaseName":"masked-db","scram_sha_1":{"username":"","password":"","authSource":"masked-db"},"options":{"connectionTimeout":"","socketTimeout":"","readPreference":"primary","connectWithNoPrimary":false,"replicaSetName":"rs0"},"_id":"7c5qw3XGFikJXtmqG"},"level":"info","message":"[save-connection]"}
{"connectionUrl":"mongodb://user_mask:masked_pass@masked-db-0.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017/?authSource=masked-db&readPreference=primary&connectTimeoutMS=3000&socketTimeoutMS=5000&replicaSet=rs0&authMechanism=SCRAM-SHA-1","options":{"useNewUrlParser":true,"useUnifiedTopology":true,"authSource":"masked-db"},"sessionId":"wLMM9LB9yZHJNsQJJ","level":"debug","message":"[connect]"}
{"sessionLength":"2","level":"info","message":"[connect]"}
{"methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { serverStatus: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { top: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { serverStatus: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { top: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"stats":[]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { serverStatus: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"info","message":"[admin-query-execution]"}
{"externalError":"not authorized on admin to execute command { top: 1, lsid: { id: UUID(\"baea7a65-2969-44fa-9c13-f28990b3d324\") }, $clusterTime: { clusterTime: Timestamp(1611490824, 1), signature: { hash: BinData(0, 793F4EE683C1775B1DF75EC6B71F2907F860D4B6), keyId: 6860441688142249985 } }, $db: \"admin\" }","methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"wLMM9LB9yZHJNsQJJ","level":"error","message":"[query-error]"}
{"methodArray":[{"stats":[]}],"sessionId":"8viE3MPh3f4J2Rcrm","level":"info","message":"[admin-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"stats":[]}],"sessionId":"8viE3MPh3f4J2Rcrm","level":"error","message":"[connection-error]"}
{"methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"8viE3MPh3f4J2Rcrm","level":"info","message":"[admin-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"serverStatus":[]}],"runOnAdminDB":true,"sessionId":"8viE3MPh3f4J2Rcrm","level":"error","message":"[connection-error]"}
{"methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"8viE3MPh3f4J2Rcrm","level":"info","message":"[admin-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"executeDbAdminCommand":[{"top":1},{}]}],"sessionId":"8viE3MPh3f4J2Rcrm","level":"error","message":"[connection-error]"}
{"dir":"/opt/mongodb/bin//","binary":"mongo","level":"info","message":"[mongo]"}
{"mongoPath":"/opt/mongodb/bin//mongo","connectionUrl":"mongodb://masked_ae:masked_pass@masked-db-0.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017/?authSource=masked-db&readPreference=primary&connectTimeoutMS=3000&socketTimeoutMS=5000&replicaSet=rs0&authMechanism=SCRAM-SHA-1&authSource=masked-db","sessionId":"8viE3MPh3f4J2Rcrm","level":"debug","message":"[shell]"}
{"connectionId":"7c5qw3XGFikJXtmqG","sessionId":"8viE3MPh3f4J2Rcrm","level":"info","message":"[shell-event-bind]"}
{"command":"use masked-db","sessionId":"8viE3MPh3f4J2Rcrm","level":"info","message":"[shell]"}
{"sessionId":"8viE3MPh3f4J2Rcrm","command":"show dbs;","connectionId":"7c5qw3XGFikJXtmqG","level":"info","message":"[shell-command-execution]"}
{"sessionId":"z5GbXFmb59XhwGt8Q","command":"show collections;","connectionId":"7c5qw3XGFikJXtmqG","level":"info","message":"[shell-command-execution]"}
{"dir":"/opt/mongodb/bin//","binary":"mongo","level":"info","message":"[mongo]"}
{"mongoPath":"/opt/mongodb/bin//mongo","connectionUrl":"mongodb://<masked>:<masked>@masked-db-0.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017,masked-host.mongodb-replicaset:27017/?authSource=masked-db&readPreference=primary&connectTimeoutMS=3000&socketTimeoutMS=5000&replicaSet=rs0&authMechanism=SCRAM-SHA-1&authSource=masked-db","sessionId":"z5GbXFmb59XhwGt8Q","level":"debug","message":"[shell]"}
{"connectionId":"7c5qw3XGFikJXtmqG","sessionId":"z5GbXFmb59XhwGt8Q","level":"info","message":"[shell-event-bind]"}
{"command":"use masked-db","sessionId":"z5GbXFmb59XhwGt8Q","level":"info","message":"[shell]"}
{"level":"info","message":"[check-version]"}
{"methodArray":[{"countDocuments":[{},{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"info","message":"[collection-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"countDocuments":[{},{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"error","message":"[connection-error]"}
{"methodArray":[{"stats":[{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"info","message":"[collection-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"stats":[{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"error","message":"[connection-error]"}
{"methodArray":[{"countDocuments":[{},{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"info","message":"[collection-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"countDocuments":[{},{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"error","message":"[connection-error]"}
{"methodArray":[{"stats":[{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"info","message":"[collection-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"stats":[{}]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"error","message":"[connection-error]"}
{"methodArray":[{"find":[{}]},{"sort":[{"_id":-1}]},{"limit":[50]},{"toArray":[]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"info","message":"[collection-query-execution]"}
{"level":"info","message":"[disconnect]"}
{"externalError":"connection-closed","methodArray":[{"find":[{}]},{"sort":[{"_id":-1}]},{"limit":[50]},{"toArray":[]}],"selectedCollection":"orders","sessionId":"Yaybf9XLN8e35buJC","level":"error","message":"[connection-error]"}

@rsercano
Copy link
Member

Interesting, I cant see a reason why it fails, I'll check this deeply thanks

@rsercano
Copy link
Member

rsercano commented Mar 2, 2021

Hi @ashwatthb I suspect this's related with your MongoDB setup and connection, since we literally changed nothing on our side, could you please recheck, I couldn't find a proper reason actually.

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