Re: could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

2,695 views
Skip to first unread message
Message has been deleted

Rob W

unread,
May 16, 2019, 9:08:01 AM5/16/19
to django...@googlegroups.com
First, you should not share your password to your server to anyone….thats very dangerous.  Now anyone can log in to your server with nefarious intentions.  
Be more careful.

But it sounds like something on the server is blocking your connection.  

On May 16, 2019, at 8:57 AM, omar ahmed <omark...@gmail.com> wrote:

hii ..
i try to publish my first project on python anywhere but it still not working and this is my error :

could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

and this is my db settings  :

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'arena',
        'USER': 'arenadbuser',
        'PASSWORD': 'mlo9**@la',
        'HOST': 'localhost',
        'PORT': '',
    }
}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/93204eb8-f5e3-43bf-98ff-b79478bce544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Test Bot

unread,
May 16, 2019, 9:09:55 AM5/16/19
to django...@googlegroups.com
Did you check your firewall settings?

omar ahmed

unread,
May 16, 2019, 9:13:12 AM5/16/19
to Django users
ok you are right


On Thursday, May 16, 2019 at 3:08:01 PM UTC+2, Rob W wrote:
First, you should not share your password to your server to anyone….thats very dangerous.  Now anyone can log in to your server with nefarious intentions.  
Be more careful.

But it sounds like something on the server is blocking your connection.  
On May 16, 2019, at 8:57 AM, omar ahmed <omark...@gmail.com> wrote:

hii ..
i try to publish my first project on python anywhere but it still not working and this is my error :

could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

and this is my db settings  :

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'arena',
        'USER': 'arenadbuser',
        'PASSWORD': 'mlo9**@la',
        'HOST': 'localhost',
        'PORT': '',
    }
}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

omar ahmed

unread,
May 16, 2019, 9:15:10 AM5/16/19
to Django users
no but can it struggle it ?
how can i check it


On Thursday, May 16, 2019 at 3:09:55 PM UTC+2, OnlineJudge95 wrote:
Did you check your firewall settings?

On Thu, May 16, 2019, 6:37 PM Rob W <randmw...@gmail.com> wrote:
First, you should not share your password to your server to anyone….thats very dangerous.  Now anyone can log in to your server with nefarious intentions.  
Be more careful.

But it sounds like something on the server is blocking your connection.  
On May 16, 2019, at 8:57 AM, omar ahmed <omark...@gmail.com> wrote:

hii ..
i try to publish my first project on python anywhere but it still not working and this is my error :

could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

and this is my db settings  :

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'arena',
        'USER': 'arenadbuser',
        'PASSWORD': 'mlo9**@la',
        'HOST': 'localhost',
        'PORT': '',
    }
}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

Test Bot

unread,
May 16, 2019, 9:24:52 AM5/16/19
to django...@googlegroups.com
So one check would be to see all the connections that are allowed by your firewall.

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

omar ahmed

unread,
May 16, 2019, 9:29:47 AM5/16/19
to Django users
do you mean firewall stop all connections ??
thank you

CHANDNI SINGH

unread,
Dec 6, 2021, 9:36:19 AM12/6/21
to Django users
hey,
i am facing the same problem
can you please guide me on how to solve that issue ???

Ajeet Kumar

unread,
Dec 10, 2021, 5:56:53 PM12/10/21
to django...@googlegroups.com
is your postgres server is up and running? Try to connect with pgadmin

ram s

unread,
Dec 10, 2021, 11:55:06 PM12/10/21
to django...@googlegroups.com
when u getting this issue while deploying on pythonanywhere.com or in your localserver

Reply all
Reply to author
Forward
0 new messages