connection failed for: localhost (Errno::ECONNREFUSED: Connection refused - connect(2)) - ruby-on-rails

I am using capistrano 2.15.5 for my rails application deployment. I am using localhost for server and have also tried with 127.0.0.1 in place of localhost. After running *cap production deploy:setup* the error that i am getting is: **Errno::ECONNREFUSED: Connection refused - connect(2)**.
After searching for it i found out ECONNREFUSED means the client couldn't make a TCP connection to the server, either because it's down, or its DNS is not resolving..
how to fix this issue?
thanks.

You have to add your ssh key in server's ssh authorize keys

Related

Informix - Socket connection to server failed

I have installed the "Informix Developer Edition 14.10.FC9 Windows" database on my local windows 10 machine.
I like to connect with the sql client DBeaver (22.3) to the database 'test'.
I know the server, the username, the password and the database name. See the following screenshot:
If i test the connection i get the following error:
Socket connection to server (ol_informix1410#localhost:1526) failed. Check your server is reachable from this client on the host:port specified.
Connection refused: connect
Do I really have the wrong port and if so how do I find out the correct port?

rails db:migrate Failed to open TCP connection connection refused

I'm getting connection refused whenever I try to migrate on rails. Running rails db:migrate gives:
Failed to open TCP connection to 127.0.0.1:8126 (Connection refused - connect(2) for "127.0.0.1" port 8126)
I tried checking if something is already taking up this port using:
netstat -vanp tcp | grep 8126
but there is nothing.
For extra measure, I made sure that docker is not running. Nothing seems to fix the issue though. Not sure what other info to include or what other thing can I try.
Any hints would be greatly appreciated

ngrok and docker, failed to complete tunnel connection

i've changed nothing within my setup and ngrok seems to have stopped working for me.
Running ngrok http -host-header=rewrite launch.localhost:80 would usually work just fine.
This is my error:
The connection to http://d678207f86ae.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address launch.localhost:80.
Make sure that a web service is running on launch.localhost:80 and that it is a valid address.
The error encountered was: dial tcp: lookup launch.localhost: no such host
If I navigate to launch.localhost the docker server is running just fine.
Not too sure what kind of other information you'd need to help?
For me, it was never running before, but I was getting the same error for
ngrok http -host-header=rewrite launch.local:80
It helped when I changed it to
ngrok http -host-header=launch.local 80

guacamole not able to connect neither VNC nor RDP

I setup a guacamole server on ubuntu 16.04 Tried to setup a connection to a vnc server on the same machine and always got errors. I tried with RealVNC Xvnc11 TIghtVNC, and even with RDP. no luck. The error messages on log files were:
Creation of WebSocket tunnel to guacd failed: Non-numeric character in element length.
Creation of WebSocket tunnel to guacd failed: java.net.ConnectException:
Connection refused (Connection refused)
An internal error has occurred within the Guacamole server
not a valid RFB client
webSocketsHandshake: invalid client header
Any idea what could be?
The problem was that I was saving the VNC connections settings on the GUACAMOLE PROXY PARAMETERS (GUACD). I set port 5901. Which is not the correct guacd port.
I left this empty and everything worked!
for RDP use RDP encryption select option
it worked for me.

Using data flow with https on cloud foundry

I am trying to deploy a data flow server on Cloud foundry and create a simple app.
Only https end point could be exposed. I cannot enable https using this :
http://docs.spring.io/spring-cloud-dataflow/docs/current-SNAPSHOT/reference/htmlsingle/#configuration-security-enabling-https
As ssl is managed by cf. How do I make data flow server using https?
I have this error:
dataflow:>app list
Command failed org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://dataflow-server.run.aws-usw02-pr.ice.predix.io/apps": Connect to dataflow-server.run.aws-usw02-pr.ice.predix.io:80 [dataflow-server.run.aws-usw02-pr.ice.predix.io/54.201.89.124, dataflow-server.run.aws-usw02-pr.ice.predix.io/52.88.128.224] failed: Connection refused (Connection refused); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to dataflow-server.run.aws-usw02-pr.ice.predix.io:80 [dataflow-server.run.aws-usw02-pr.ice.predix.io/54.201.89.124, dataflow-server.run.aws-usw02-pr.ice.predix.io/52.88.128.224] failed: Connection refused (Connection refused)
Thanks in advance.
Best Regards
as you already mentioned, you can not enable https at the container level inside cloudfoundry today. The traffic between the router and diego cell is not encrypted (unless you are using IPSEC).
So your dataflow server would not be configured with https, just deploy the server as it is. You should rely on your cloudfoundry install to have an open port at 443 on it's loadbalancer that forwards traffic to the router. Later CF incarnations support certificate placement at the router level.
Now, at the client (dataflow-shell) if you are using a valid certificate you don't need to do anything, but if you have a selfsigned certificate, you need to tell it to accept self-signed certificates, or skip validation all together.

Resources