UNIX domain SOCK_DGRAM Client - Connection refused - sockets

Unix domain SOCK_DGRAM returns connection refused error. As we know, Datagram sockets are connection-less. I expect client, not to return any error on sendto() if server is not started yet. But how client returns connection refused error ?

Related

Can receive but can not send email ubuntu 20.04

I'm using Postfix, Roundcube 1.4.3 and devcot to receive and send emails on my vps server.
I'm able to receive emails but the errors are occurring when sending the email, the mail never reaches the destination.
Port 587 is what roundcube is using.
Roundcube error.log
[25-Dec-2021 07:18:35 +0000]: <669e8q7l> PHP Error: Connection refused (POST /?_task=mail&_unlock=loading1640416601599&_framed=1&_action=send)
[25-Dec-2021 07:18:35 +0000]: <669e8q7l> PHP Error: Failed to connect socket: Connection refused (POST /?_task=mail&_unlock=loading1640416601599&_framed=1&_action=send)
[25-Dec-2021 07:18:35 +0000]: <669e8q7l> SMTP Error: Connection failed: Failed to connect socket: Connection refused in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1702 (POST /?_task=mail&_unlock=loading1640416601599&_framed=1&_action=send)
[25-Dec-2021 07:31:29 +0000]: <eb91q6is> PHP Error: Connection refused (POST /?_task=mail&_unlock=loading1640417491382&_framed=1&_action=send)
[25-Dec-2021 07:31:29 +0000]: <eb91q6is> PHP Error: Failed to connect socket: Connection refused (POST /?_task=mail&_unlock=loading1640417491382&_framed=1&_action=send)
Error I'm getting in Roundcube ui
SMTP Error (-1): Connection to server failed.
You don't have anything listening on the port you are trying to send mail through. You need to configure your postfix to listen and accept mails on port 587.

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

Connection refused to PostgreSQL server (I have two port but it always goes to default)

I am currently setting up a postreSQL server on my Windows computer.(i have 32 bit and 64 bit postgresql)
when I use the (32bits,port is 5433) python to add some data to the database, it gets the following error:
File "C:\Python27\lib\site-packages\psycopg2\__init__.py", line 164, in connection
conn = _connect(dsn, connection_factory=connection_factory, async=async)
perationalError: could not connect to server: Connection refused (0x0000274D/10
61)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
ould not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
I do write this before adding data to the database
conn=psycopg2.connect("dbname='your_database',user='user', password='password','host'='127.0.0.1','port'='5433')
but it doesn't work~~
thanks!!
You are mixing up your connect() arguments. The "dbname" signals you are using a libpq url, so a single string argument.
http://initd.org/psycopg/docs/module.html
Try fixing that and see if it does the job.

The socket connection to localhost failed..ErrorCode: 10061

When I type localhost on my browser , I am unable to successfully connect..I am getting
The socket connection to localhost failed.
ErrorCode: 10061.
No connection could be made because the target machine actively refused it 127.0.0.1:80
How can I fix it?
You start a web server on your localhost listening on port 80. At present there isn't one.

WHM Email Stuck in Manager Queue after Cloudflare Setup

My WHM server seems to be storing all its email in the queue manager, I get the following errors from EXIM
LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1ZHBnT-0003rU-0v
delivering 1ZHBnT-0003rU-0v
LOG: MAIN
SMTP connection identification H=localhost A=::1 P=60184 M=1ZHBnT-0003rU-0v U=root ID=0 S=root B=authenticated_local_user
Connecting to gmail-smtp-in.l.google.com [74.125.70.27]:25 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
H=gmail-smtp-in.l.google.com [74.125.70.27] Connection timed out
Connecting to alt1.gmail-smtp-in.l.google.com [173.194.204.27]:25 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
H=alt1.gmail-smtp-in.l.google.com [173.194.204.27] Connection timed out
Connecting to alt2.gmail-smtp-in.l.google.com [74.125.141.27]:25 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
H=alt2.gmail-smtp-in.l.google.com [74.125.141.27] Connection timed out
Connecting to alt3.gmail-smtp-in.l.google.com [64.233.190.27]:25 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
H=alt3.gmail-smtp-in.l.google.com [64.233.190.27] Connection timed out
Port 25 is open.
I think your server mail IP is blocked on gmail server and due to that you are getting this issues. May be your one of the user is sending spam mails from your server and that is the reason your server IP is blocked. You can check your mail server IP status through http://mxtoolbox.com/blacklists.aspx URL.