I have this error when I try to start a new ionic project.
Note:I may have mucked around with proxies at work at some point (behind a proxy), and now it is showing this error at home (direct connection). I'm not sure if this is an issue with proxies for sure though.
The Error:
Creating Ionic app in folder C:\Users\sam\hiya based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error Initializing app: Error: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80
Error: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80
at ClientRequest.onError (C:\Users\sam\AppData\Roaming\npm\node_modules\ionic\node_modules\request\node_modules\tunnel-agent\index.js:176:17)
at ClientRequest.g (events.js:260:16)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:267:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:80 (CLI v1.7.16)
Your system information:
Cordova CLI: 6.3.0
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS:
Node Version: v4.4.5
Your help would be greatly appreciated. Sam
Maybe you can change your default ionicServeAddress on ionic.config file.
On Mac this file is at ~/.ionic. On a PC it can be found at C:/users/username/.ionic. Inside you'll see something like
"ionicServeAddress": "localhost"
Perhaps changing to your proxies ip or localhost might help.
Related
I've installed a squid-deb-proxy proxy in my local build environment. to build a package with yarn, I'm executing:
yarn install --https-proxy=http://192.168.100.40:8000 --proxy=http://192.168.100.40:8000 --verbose
I've also configured the proxy in ~/.npmrc
proxy=http://192.168.100.40:8000
https-proxy=http://192.168.100.40:8000
https_proxy=http://192.168.100.40:8000
Here the failure:
[4/4] Building fresh packages...
...
[4/5] ⠠ optipng-bin
verbose 23.465307382 ⚠ tunneling socket could not be established, cause=connect ENETUNREACH 0.0.31.64:80 - Local (0.0.0.0:0)
⚠ jpegtran pre-build test failed
ℹ compiling from source
✖ RequestError: tunneling socket could not be established, cause=connect ENETUNREACH 0.0.31.64:80 - Local (0.0.0.0:0)
at ClientRequest.<anonymous> (/opt/jenkinsagent/workspace/line_tmp-v34-jenkins-test-agent2/product/browser-phone/node_modules/got/index.js:111:21)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at ClientRequest.onError (/opt/jenkinsagent/workspace/line_tmp-v34-jenkins-test-agent2/product/browser-phone/node_modules/tunnel-agent/index.js:179:21)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
The build finally fails when building the optipng-bin package. It looks like this package is not using the proxy. In the proxy-logs I can see that download from other packages use the proxy, only the optipng-bin not.
Any idea what else I can do to force to use the proxy?
I was unable to use yarn install and was getting this same error.
brew install automake fixed it for me
For more help read this link
I am using Elasticsearch6.8.3 docker on an AWS ec2 machine for the production environment. For this purpose, I have installed Elasticsearch via docker-compose. In a microservice architecture many of the other services using different languages like PHP and Python, are just working fine. But When it comes to the Node.js client it starts throwing this error:
Connect EADDRNOTAVAIL IP_ADDRESS:9200 - Local (IP_ADDRESS:0)
at onResponse (/var/app/current/node_modules/#elastic/elasticsearch/lib/Transport.js:228:13)
at ClientRequest.<anonymous>
(/var/app/current/node_modules/#elastic/elasticsearch/lib/Connection.js:113:9)
at ClientRequest.emit (events.js:314:20)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at Socket.socketErrorListener (_http_client.js:427:9)
at Socket.emit (events.js:314:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
I have also verified the docker container is up and running at that time, as it was accessible through the web browser. I am not sure about the problem that is it a Node client issue or there is something wrong with docker networking? Also right after restarting the docker container, everything started working
I attempted to follow the guide here https://cloud.google.com/appengine/docs/flexible/nodejs/using-cloud-sql-postgres
to integrate my app with the Cloud SQL postgres instance. However I keep getting an error:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Application startup
error:
testpostgres#1.0.0 start /app node app.js
Unhandled rejection SequelizeConnectionError: connect ENOENT
/cloudsql/test-postgress:us-central1:testpostgress/.s.PGSQL.5432 at
connection.connect.err
(/app/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:128:24) at Connection.connectingErrorHandler
(/app/node_modules/pg/lib/client.js:123:14) at emitOne
(events.js:116:13) at Connection.emit (events.js:211:7) at
Socket.reportStreamError
(/app/node_modules/pg/lib/connection.js:71:10) at emitOne
(events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT
(internal/streams/destroy.js:64:8) at _combinedTickCallback
(internal/process/next_tick.js:138:11) at process._tickCallback
(internal/process/next_tick.js:180:9)
It must be a problem with my configuration, but I have tried everything I can think of. You can see or clone my project here:
https://github.com/fractalfrenzy/GCS_postgres_test
I know nothing of Node.js, but have a long experience with Java/Python/Go runtime.
Have you opened your CloudSQL instance for connection?
Try this: Configuring IP Connectivity
I am trying to bind my local port to remote mongo port as remote server is not directly accessible from local. Im trying SSH port binding like this.
ssh -L 27017:localhost:27017 <remote server>
when i try to open mongo shell locally using mongo mongodb://localhost:27017. mongo is connected to remote server but when i do the same from node app using mongoose. i am getting connection error. Can someone suggest system level solution to this problem.
Something broke!!! - MongoError: failed to connect to server [server1:27017] on first connect [MongoError: getaddrinfo ENOTFOUND server1 server1:27017]
at null.<anonymous> (/home/user1/src/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:77:13)
at emit (events.js:169:7)
at null.<anonymous> (/home/user1/src/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at g (events.js:260:16)
at emitTwo (events.js:87:13)
at emit (events.js:172:7)
at Socket.<anonymous> (/home/user1/src/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:187:49)
at Socket.g (events.js:260:16)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at connectErrorNT (net.js:1016:8)
at nextTickCallbackWith2Args (node.js:511:9)
at process._tickCallback (node.js:425:17)
Getting error while updating Webdriver in Protractor.
Tried with proxy setting:
npm config set proxy http:Proxy:port
npm config set http_proxy http:Proxy:port
npm config set https_proxy https:Proxy:port
System info:
Protractor version:5.2.0
npm version:3.10.10
mvn version: 3.5.2
Error:
tunneling socket could not be established, cause=read ECONNRESET
C:\Windows\System32>webdriver-manager update
events.js:160
throw er; // Unhandled 'error' event
^
Error: tunneling socket could not be established, cause=read ECONNRESET
at ClientRequest.onError (C:\Users\a655086\AppData\Roaming\npm\node_modules\
protractor\node_modules\tunnel-agent\index.js:177:17)
at ClientRequest.g (events.js:292:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
C:\Windows\System32>
Looks like duplicate of this. In your attempts mentioned in the OP, I don't see :// after http. Also note that even for https-proxy the protocol is http and not https. If you are not behind any proxy, you need to unset them as mentioned in the linked answer
npm config set proxy http://proxyhost:proxyport
npm config set https-proxy http://proxyhost:proxyport
The issue got resolved by running cmd as administrator using below command
npm config set proxy false
npm cache clean
then restarting cntlm services
Webdriver-manager update