Docker: skygear server not starting, connection refused - postgresql

I followed the Docker manual on https://docs.skygear.io/server/guide/getting-started-docker.
I used Kitematic to download Skygear Server from SkygearIO.
When the server tries to start it can't connect to a database.
ERRO[0001] Unable to begin transaction for schema migration: dial tcp
[::1]:5432: getsockopt: connection refused logger=skydb
ERRO[0001] Failed to start skygear: failed to open connection: skydb/pq:
unable to connect to database because of a network error = dial tcp
[::1]:5432: getsockopt: connection refused
I can't seem to find the problem.

Please follow the Setup Skygear Development Server Locally.

Related

Connection refused when deploying in cloud on kubernetes

I am deploying kubernetes in Cloud and I'm trying to call another container inside the same pod through an API.
I am using localhost but also I treid with 127.0.0.1. Also, I tried with the container's name.
2022/11/04 15:50:47 dial tcp [::1]:4245: connect: connection refused
2022/11/04 15:50:47 Successfully processed file.json file
2022/11/04 15:50:47 Get "http://localhost:4245/api/admin/projects/default": dial tcp [::1]:4245: connect: connection refused
panic: Get "http://localhost:4245/api/admin/projects/default": dial tcp [::1]:4245: connect: connection refused
goroutine 1 [running]:
log.Panic({0xc000119dc8?, 0xc000166000?, 0x6aaaea?})
/opt/app-root/src/sdk/go1.19.2/src/log/log.go:388 +0x65
main.StatusServer({0xc000020570?, 0x30?}, {0x0, 0x0})
/build/script.go:197 +0x1ee
main.ProcessData({0xc000020041, 0x15}, {0x0, 0x0}, {0xc00002000f?, 0x43ce05?})
/build/script.go:291 +0xa6
main.main()
/build/script.go:443 +0xc5
Any idea if I can call the container like that?
You get a connection refused means you reached localhost and it decided to refuse the connection.
This is most likly because nothing is listening on the port.
If it was a firewall issue the request would timeout.
You can check listening ports with command like:
netstat -an
If not installed maybe you can try it from the workernode where the pod is running.
Another method of testing is to use
curl http://127.0.0.1:4245
This will probably result in same connection refused.
Are you really sure the container is running in same pod?
Please check your deployment and service.
If you cant find the failure please come back with more information so it can be analysed.

Mysql monitoring using Prometheus and Grafana

I need to monitor Mysql using Prometheus and Grafana;
Added mysqld exporter in the client server
while starting the mysqld in the client server it reports as :
time="2017-09-05T11:42:53Z" level=info msg="Error scraping slave state: dial tcp [::1]:3306: getsockopt: connection refused" file="mysqld_exporter.go" line=824
time="2017-09-05T11:42:53Z" level=info msg="Error scraping table schema: dial tcp [::1]:3306: getsockopt: connection refused" file="mysqld_exporter.go" line=836
In client server :
I have downloaded the mysqld exporter
Extracted it
Created .my.cnf file
[client]
user=prom
password=abc123
Given permission to that user by using this command
mysql> GRANT REPLICATION CLIENT, PROCESS ON . TO 'prom'#'localhost' identified by 'abc123';
mysql> GRANT SELECT ON performance_schema.* TO 'prom'#'localhost';
Executed this command
./mysqld_exporter -config.my-cnf=".my.cnf"
Prometheus status page shows as UP condition for this.
In Grafana no data is loaded for MySQL

kafka installation failed with Connection failed: [Errno 111] Connection refused to 6667

I am installing kafka using ambari.
While installation i got an error:
Connection failed: [Errno 111] Connection refused to localhost:6667.
Can someone help in this.
The error message seems to be related to the Kafka listener port, which is by default 6667. There might be another port configured, the port is blocked within the network or the service is not running.

Bluemix WebsocketListener.Start: Error connecting to a doppler server

Has anyone faced this issue with Bluemix? One of my Bluemix instances crashes repeatedly and the log file shows the following error. Seems to be an internal error within Bluemix environment, and I could not understand the reason for it.
......
2016-08-04T12:02:07.617+0530[DEA/75]OUTStopped app instance (index 0) with guid 9b4ebc26-e5f9-4c61-a54e-f8c7437185a7
2016-08-04T12:02:17.783+0530[LGR/null]ERRWebsocketListener.Start: Error connecting to a doppler server
2016-08-04T12:02:17.799+0530[LGR/null]ERRproxy: error connecting to 158.85.134.172:8081: dial tcp 158.85.134.172:8081: getsockopt: connection refused
2016-08-04T12:02:17.899+0530[LGR/null]ERRproxy: error connecting to 158.85.134.172:8081: dial tcp 158.85.134.172:8081: getsockopt: connection refused

hack for "mongo db connection refused due to blocked port errno 10061"

I m trying connect to my db in Mongolab:
>> mongo ds123456.mongolab.com
MongoDB shell version: 2.6.1
connecting to: ds123456.mongolab.com/test
2014-12-16T14:13:41.738+0100 warning: Failed to connect to 54.74.247.101:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2014-12-16T14:13:41.741+0100 Error: couldn't connect to server ds123456.mongolab.com:27017 (54.74.247.101), connection attempt failed at src/mongo/shell/mongo.js:148
exception: connect failed
I assume this question answers the first problem of access being blocked on this port.
The obvious solution is to contact the network admin. But I wonder if there is an alternative?
Thanks in advance.