Passport-azure-ad : authentication failed due to: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 3128 - node.js

I try to implement Passport-azure-ad OIDCStrategy on my node application.
It is working find in my personal computer but with my corporate laptop (without VPN or proxy configured) I cannot connect and I get that error :
authentication failed due to: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 3128
I don't understand why because I can access by a browser to https://login.microsoftonline.com/ without any issues.
I don't understand what endpoint node try to contact and why the tunnel socket cannot be established.
Any help ?
Thanks

Related

Fabic: Issue connection refused 7050

I am trying to create a network from the hyperledger fabic tutorial. I get the following error:
Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp [::1]:7050: connect: connection refused"
I opened up the port on the Centos 7 Virtual machine and still no luck. The docker container is exposing the port to the host.
I removed all docker containers, images and volumes. I even rebuilt the VM from scratch.
Any help would be great.
Thanks,
This situation is happened because you called a gRPC to orderer server but your call failed to hit the server. This situation may happen for many reasons, but for most of the cases the situation is happened due to server down(orderer server exit or down due to misconfiguration) or your call failed to hit the server due to misconfiguration.
I somehow encounter this problem before and the port was opened. Somehow it was a mistake where I forgot to put '-a' in command (launch cerificate authorities). Hope it help.
You might also refer this : https://hyperledger-fabric.readthedocs.io/en/release-2.0/build_network.html

Firebase Functions deploying Not Working, Rejected with [ Server Error. Client network socket disconnected ]

I am trying to deploy my firebase functions but it's giving me an error.
⚠ functions: Upload Error: Server Error. Client network socket disconnected before secure TLS connection was established
Error: Server Error. Client network socket disconnected before secure TLS connection was established
Firebase Debug Log
[warn] ⚠ functions: Upload Error: Server Error. Client network socket disconnected before secure TLS connection was established
[debug] [2020-04-04T17:59:21.405Z] Error: Client network socket disconnected before secure TLS connection was established
at connResetException (internal/errors.js:570:14)
at TLSSocket.onConnectEnd (_tls_wrap.js:1361:19)
at Object.onceWrapper (events.js:299:28)
at TLSSocket.emit (events.js:215:7)
at TLSSocket.EventEmitter.emit (domain.js:476:20)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[error]
[error] Error: Server Error. Client network socket disconnected before secure TLS connection was established
This problem often happens due to slow internet connection. Please check your Internet connection.

X11 connection rejected because of wrong authentication - Running an application as root user from server

I have ssh to a server machine and I want to run an application as a root user. I'm getting the below error,
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
Unable to init server: Could not connect: Connection refused
(eog:5473): Gtk-WARNING **: cannot open display: localhost:10.0
Note:
If I ran an application as a normal user I'm could see the GUI. The server running on Debian based distro.

I can't connect to mongo db in ubuntu

MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
2018-10-01T17:38:22.425+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-10-01T17:38:22.426+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:251:13
#(connect):1:6
exception: connect failed
I get an error when I try to run mongo on the terminal.
I tried to reinstall and removed lock file and restarted it, but It still doesn't work. I am using AWS, is it some problem about inbound, outbound of network setting in AWS, Or any other problem?
Like the comments above, if you are trying to connect to a mongodb instance on the same host, using 127.0.0.1 it is a mongodb configuration problem, so, that is not possible to be any AWS Security Rules.
So, considering it is a mongodb problem, first try to repair it inside the host with:
sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair
sudo service mongodb restart
sudo service mongod status
Refer: https://stackoverflow.com/a/29083477/8407784
After resolved the mongodb config problem, you need to test your connection from another host, setting /etc/mongod.conf - bind_ip = 0.0.0.0 (that means all interfaces), only for testing
Then you need to set your AWS Security Rules on the host instance allowing the external instance to access it on port 27017.

Getting "Error: failed to connect to tunnel VM" with intern/saucelabs

I'm just starting out with intern/saucelabs. Whenever I try a remote test, I'm getting Error: failed to connect to tunnel VM.
My intern.js has
environments: [
{ browserName: 'firefox', version: '28'},
],
tunnel: 'SauceLabsTunnel',
tunnelOptions: {
username: 'foo',
accessKey: 'xxxxxxxxxxxx-xxxx-xxxx-xxxx-xxxx'
},
Execution log
$ intern-runner config=theintern/intern-sauce.js
Listening on 0.0.0.0:9000
Starting tunnel...
Using no proxy for connecting to Sauce Labs REST API.
**********************************************************
A newer version of Sauce Connect (build 1283) is available!
Download it here:
https://saucelabs.com/downloads/sc-4.3-linux.tar.gz
**********************************************************
Started scproxy on port 44275.
Starting secure remote tunnel VM...
Secure remote tunnel VM provisioned.
Tunnel ID: 6586b9012ca2424b8ecd6bd6970e996c
Secure remote tunnel VM is now: booting
Secure remote tunnel VM is now: running
Remote tunnel host is: maki76026.miso.saucelabs.com
Using no proxy for connecting to tunnel VM.
Establishing secure TLS connection to tunnel...
Cleaning up.
Finished! Deleting tunnel.
Error: failed to connect to tunnel VM.
Error: failed to connect to tunnel VM.
at reject <../../../../../../../usr/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:353:17>
at readStartupMessage <../../../../../../../usr/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:381:12>
at <../../../../../../../usr/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:434:12>
at Array.some <native>
at Socket.<anonymous> <../../../../../../../usr/lib/node_modules/intern/node_modules/digdug/SauceLabsTunnel.js:428:21>
at Socket.EventEmitter.emit <events.js:117:20>
at Socket.<anonymous> <_stream_readable.js:746:14>
at Socket.EventEmitter.emit <events.js:92:17>
at emitReadable_ <_stream_readable.js:408:10>
at emitReadable <_stream_readable.js:404:5>
In case it's significant, I'm currently on the free tier.
Some of the most common issues folks run into with Sauce Connect are related to firewall and proxy settings. Please ensure that 443 is open between Sauce Connect and *.saucelabs.com. If a proxy server is used to route traffic on your network Sauce Connect supports proxy servers by passing the --pac or –p flag.
Please download the latest version of Sauce Connect from https://docs.saucelabs.com/reference/sauce-connect/ and start the client with all the necessary flags (a full list is available on the aforementioned page). If this version does not work please start Sauce Connect passing the -v flag, this will generate a verbose log file which will help Sauce Labs diagnose connectivity issues.

Resources