When I use Wi-Fi to upload code through VS Code, it shows the following error. But if I use mobile network, it works.
[error] Error: Timeout while connecting to server
at Timeout._onTimeout (c:\Users\faraz\.vscode\extensions\liximomo.sftp-1.12.9\dist\extension.js:70:109790)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
Related
MongoDB shell version v4.4.6
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: NetworkTimeout: Error connecting to 127.0.0.1:27017 :: caused by :: Socket operation timed out :
connect#src/mongo/shell/mongo.js:374:17
#(connect):2:6
exception: connect failed
exiting with code 1
Everytime when I run mongo command , it says error connecting to 127.0.0.1:27017 caused by socket opeartion timed out.
Tried following many instructions given by peers , but it didn't work.
Hope I get rid of this by your instructions.
Thanks!
Reason: mongodb service is not running
Run mongodb service method:
Open the terminal and execute mongod -dbpath "D:\Program Files\MongoDB\data\db"
("D:\Program Files\MongoDB\data\db" is the directory you created to store data)
Open another terminal and execute mongo
I've been developing locally by connecting to Vagrant (vartualbox) with vscode remote-ssh.
But when I restarted vagrant and tried to connect remotely
I get "Time limit reached" and "Could not fetch remote environment" and I can't connect.
I can connect with "vagrant ssh" and "ssh command", but I can't.
error log
[2020-09-11 02:37:51.947] [renderer3] [error] [remote-connection] The time limit has been reached for a connection. Error:
[2020-09-11 02:37:51.947] [renderer3] [error] Error: Time limit reached
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1879:292
[2020-09-11 02:37:51.947] [renderer3] [error] [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
[2020-09-11 02:37:51.947] [renderer3] [error] Error: Time limit reached
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1879:292
[2020-09-11 02:37:52.061] [renderer3] [error] Time limit reached: Error: Time limit reached
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1879:292
[2020-09-11 02:37:52.221] [renderer3] [error] [remote-connection] The time limit has been reached for a connection. Error:
[2020-09-11 02:37:52.222] [renderer3] [error] Error: Time limit reached
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1879:292
[2020-09-11 02:37:52.222] [renderer3] [error] [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error:
[2020-09-11 02:37:52.222] [renderer3] [error] Error: Time limit reached
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1879:292
[2020-09-11 02:37:52.258] [renderer3] [error] Could not fetch remote environment: Error: Could not fetch remote environment
at d.start (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:5022:70)
at async k.createProcess (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:5039:827)
[02:37:21.902] Starting forwarding server. localPort 55555 -> socksPort 54444 -> remotePort 43333
[02:37:21.902] Forwarding server listening on 55555
[02:37:21.902] Waiting for ssh tunnel to be ready
[02:37:21.904] [Forwarding server 55555] Got connection 0
[02:37:21.905] Tunneled remote port 43333 to local port 55555
[02:37:21.905] Resolved "ssh-remote+ruby02" to "127.0.0.1:55555"
[02:37:21.921] ------
[02:37:21.948] [Forwarding server 55555] Got connection 1
[02:37:21.949] [Forwarding server 55555] Got connection 2
[02:38:55.872] Picking SSH host
Try to do this:
Login to your remote machine
Get the PID of all vscode-server proccess running in your remote machine
Kill them
Try to login to your remote machine again via vscode ssh extension
I am connecting a Nodejs app running on the GCP Kubernetes cluster. Before, it worked fine, when I enabled VPC Peering and I was using the connection string (Private). It is recommended on the Atlas dashboard:
mongodb+srv://(username):(password)#<cluster_name>-pri.m6tkv.gcp.mongodb.net/<database_name>?retryWrites=true&w=majority
I followed this tutorial to setup: https://docs.atlas.mongodb.com/security-vpc-peering/
I cannot understand since my app has been running for quite a while with this configuration. But one fine day, the app running on a pod in my GCP cluster is unable to connect.
Thats the error message:
Connected mongodb failed MongoNetworkError: failed to connect to server [<cluster_name>-00-00-pri.m6tkv.gcp.mongodb.net:27017] on first connect [MongoNetworkError: connection timed out
at connectionFailureError (/app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:406:14)
at TLSSocket.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:294:16)
at Object.onceWrapper (events.js:299:28)
at TLSSocket.emit (events.js:210:5)
at TLSSocket.Socket._onTimeout (net.js:469:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {name: 'MongoNetworkError' }] at Pool.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/core/topologies/server.js:438:11)
at Pool.emit (events.js:210:5)
at /app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/pool.js:562:14
at /app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/pool.js:1009:9
at /app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:31:7
at callback (/app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:264:5)
at TLSSocket.<anonymous> (/app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/connect.js:294:7)
at Object.onceWrapper (events.js:299:28)
at TLSSocket.emit (events.js:210:5)
at TLSSocket.Socket._onTimeout (net.js:469:8)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
I switched back to the old connection (Standard), my app works again. The connection string:
mongodb+srv://(username):(password)#<cluster_name>.m6tkv.gcp.mongodb.net/<database_name>?retryWrites=true&w=majority
So connection via VPC Peering is having some problem, I couldn't find any clue.
I am getting an error when i try to stop services
Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to http-remoting://localhost:9990. The connection failed: Connection refused
when i try to start services, i get below error and need to restart the server multiple times to resolve it. need a solution to avoid errors during start and stop services. we use keycloack sercurity as well
2020-02-11 19:21:01,191 WARNING [com.lgc.dsl.admin.security.controllers.DSSecurity] (default task-12) Connect to localhost:8880 [localhost/IP] failed: Connection refused (Connection refused)
2020-02-11 19:21:09,462 WARN [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http:localhost:port/dsbpm-console/rest/controller/server/dsbpm-kieserver error Error while sending PUT request to localhost:port/dsbpm-console/rest/controller/server/dsbpm-kieserver response code 405
Default kie server is not showing up in the server section
2020-02-11 19:21:01,191 WARNING [com.lgc.dsl.admin.security.controllers.DSSecurity] (default task-12) Connect to localhost:8880 [localhost/IP] failed: Connection refused (Connection refused)
2020-02-11 19:21:09,462 WARN [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http:localhost:port/dsbpm-console/rest/controller/server/dsbpm-kieserver error Error while sending PUT request to localhost:port/dsbpm-console/rest/controller/server/dsbpm-kieserver response code 405
Check if you have 'dsbpm-console' for 'org.kie.server.controller' property, like as:
I have a problems on my Macbook 15" Catalina to access Mongodb run in docker compute engine. If i use other laptop connection work well without error or with other os like ubuntu or windows that no problems. Cant connect just in my macbook 15" with os Catalina.
Error on mongo command :
▶mongo [PublicIP-VMInstance]:[PortMongo]/admin -u username -p password
MongoDB shell version v3.6.14
connecting to: mongodb://[PublicIP-VMInstance]:[PortMongo]/admin?gssapiServiceName=mongodb
2019-11-23T18:22:30.975+0700 I NETWORK [thread1] Socket recv() Connection reset by peer [PublicIP-VMInstance]:[PortMongo]
2019-11-23T18:22:30.975+0700 I NETWORK [thread1] SocketException: remote: (NONE):0 error: SocketException socket exception [RECV_ERROR] server [[PublicIP-VMInstance]:[PortMongo]]
2019-11-23T18:22:30.975+0700 E QUERY [thread1] Error: network error while attempting to run command 'isMaster' on host '[PublicIP-VMInstance]:[PortMongo]' :
connect#src/mongo/shell/mongo.js:263:13
#(connect):1:6
exception: connect failed
show error if i use --ssl flag :
▶mongo [PublicIP-VMInstance]:[PortMongo]/admin -u username -p password --ssl --verbose
MongoDB shell version v3.6.14
connecting to: mongodb://[PublicIP-VMInstance]:[PortMongo]/admin?gssapiServiceName=mongodb
2019-11-23T11:47:19.836+0700 D NETWORK [thread1] creating new connection to:[PublicIP-VMInstance]:[PortMongo]
2019-11-23T11:47:19.839+0700 I NETWORK [thread1] Socket recv() Connection reset by peer [PublicIP-VMInstance]:[PortMongo]
2019-11-23T11:47:19.839+0700 E QUERY [thread1] Error: socket exception [RECV_ERROR] for [PublicIP-VMInstance]:[PortMongo] :
connect#src/mongo/shell/mongo.js:263:13
#(connect):1:6
2019-11-23T11:47:19.839+0700 D - [thread1] User Assertion: 12513:connect failed src/mongo/shell/shell_utils.cpp 279
2019-11-23T11:47:19.839+0700 I QUERY [thread1] MozJS GC prologue heap stats - total: 3447601 limit: 0
2019-11-23T11:47:19.840+0700 I QUERY [thread1] MozJS GC epilogue heap stats - total: 1641 limit: 0
2019-11-23T11:47:19.840+0700 I QUERY [thread1] MozJS GC prologue heap stats - total: 3937 limit: 0
2019-11-23T11:47:19.841+0700 I QUERY [thread1] MozJS GC epilogue heap stats - total: 9 limit: 0
2019-11-23T11:47:19.841+0700 D - [main] User Assertion: 12513:connect failed src/mongo/scripting/mozjs/proxyscope.cpp 302
exception: connect failed
If use GUI Client like NoSQLBooster show error :
12:53:53.307 *** Starting MongoClient.connect ***
{"options":{"appname":"NoSQLBoosterV5.2.7_125336.468","autoReconnect":true,"keepAlive":60000,"poolSize":0,"promoteLongs":false,"promoteValues":false,"reconnectTries":172800,"socketTimeoutMS":0,"sslValidate":false,"useNewUrlParser":true},"uri":"mongodb://username:******#IPPublic-VMInstance:PORTMONGO?authSource=admin"}
12:53:53.311 *** Connect Error ***
{"errorLabels":["TransientTransactionError"],"message":"failed to connect to server [IPPublic-VMInstance:PORTMONGO] on first connect [MongoNetworkError: read ECONNRESET]","name":"MongoNetworkError","stack":"MongoNetworkError: failed to connect to server [IPPublic-VMInstance:PORTMONGO] on first connect [MongoNetworkError: read ECONNRESET]\n at Pool.<anonymous> (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/topologies/server.js:431:11)\n at Pool.emit (events.js:182:13)\n at connect (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/connection/pool.js:557:14)\n at callback (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/connection/connect.js:109:5)\n at runCommand (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/connection/connect.js:129:7)\n at Connection.errorHandler (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/connection/connect.js:321:5)\n at Object.onceWrapper (events.js:273:13)\n at Connection.emit (events.js:182:13)\n at Socket.<anonymous> (/Applications/NoSQLBooster for MongoDB.app/Contents/Resources/app.asar/node_modules/mongodb-core/lib/connection/connection.js:321:10)\n at Object.onceWrapper (events.js:273:13)\n at Socket.emit (events.js:182:13)\n at emitErrorNT (internal/streams/destroy.js:82:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)\n at process._tickCallback (internal/process/next_tick.js:63:19)"}
I have try with this tutorial :
openssl problems
https://community.exploratory.io/t/mongodb-ssl-connection-error-on-mac-os-x/832 [ still not working ]
use --ssl but in other laptop work well without this options
Apple has made TLS requirements stricter in Catalina. I have a similar case where the connection from Catalina fails using the mongo cli client. I couldn't find statements about changes in behavior of SSL specifically (which I am using). They may have changed something they didn't communicate.
About Catalina TLS changes: https://support.apple.com/en-us/HT210176
If I run a VM Ubuntu on Catalina, I'm able to connect from there. Also macs with Mojave can connect just fine using the same certificates, keys, and network.
Below is the error I'm seeing. It's slightly different to yours but also something that only happens on Catalina.
mongo --host myhost.com --ssl --sslCAFile ca.pem --sslPEMKeyFile client.pem -u myuser -p
W CONTROL [main] Option: ssl is deprecated. Please use tls instead.
W CONTROL [main] Option: sslPEMKeyFile is deprecated. Please use tlsCertificateKeyFile instead.
W CONTROL [main] Option: sslCAFile is deprecated. Please use tlsCAFile instead.
MongoDB shell version v4.2.1
Enter password:
connecting to: mongodb://myhost.com:27017/?compressors=disabled&gssapiServiceName=mongodb
E NETWORK [js] SSL peer certificate validation failed: Certificate trust failure: Host name mismatch; connection rejected
E QUERY [js] Error: couldn't connect to server myhost.com:27017, connection attempt failed: SSLHandshakeFailed:
SSL peer certificate validation failed: Certificate trust failure: Host name mismatch; connection rejected :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
F - [main] exception: connect failed
E - [main] exiting with code 1
I suggest you try generating new certificates that match Apple's new requirements if that's at all possible. Another thing you could try would be to run a Linux VM on your Mac and see if the connection works from there. If it does, I reckon it would narrow the issue down to the certificates themselves.
Update: Docker seems to be an alternative for the VM. Using a Docker container on a Mac with Catalina I can connect to mongo just fine.
Are you certain that PublicIP-VMInstance and PortMongo are resolving to IP addresses and a port by your mongo client? I'm running MacOS X 10.15.1 (Catalina) and Mongo client 4.2.1 and connections work perfectly for me using a connection string like this:
/opt/local/bin/mongo --ssl --sslAllowInvalidCertificates --host=mongo.mydomain.com:27017 -u mongoMatt -p dont*You*Wish