NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I try to install umap on an alwaysdata server.

I follow this tutorial : https://umap-project.readthedocs.io/en/latest/install/

At the migrate step

umap migrate

i have this error:

File "/home/*******/umap/lib/python3.6/site-packages/django/db/backends/base/base.py", line 171, in connect                                                                                   
    self.connection = self.get_new_connection(conn_params)                                                                                                                                    
File "/home/*******/umap/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection                                                                  
    connection = Database.connect(**conn_params)                                                                                                                                              
File "/home/*******/umap/lib/python3.6/site-packages/psycopg2/__init__.py", line 164, in connect                                                                                              
    conn = _connect(dsn, connection_factory=connection_factory, async=async)                                                                                                                  
django.db.utils.OperationalError: could not connect to server: No such file or directory                                                                                                      
        Is the server running locally and accepting                                                                                                                                           
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

This is my local.py (i have try lot of things for the host:

SECRET_KEY = '********'                                                                                                                                                                    
INTERNAL_IPS = ('127.0.0.1', )                                                                                                                                                                
ALLOWED_HOSTS = ['*', 'postgresql-<accountname>.alwaysdata.net',]

DEBUG = True

ADMINS = (                                                                                                                                                                                    
    ('You', 'your@email'),                                                                                                                                                                    
)                                                                                                                                                                                             
MANAGERS = ADMINS

DATABASES = {                                                                                                                                                                                 
    'default': {                                                                                                                                                                              
        'ENGINE': 'django.contrib.gis.db.backends.postgis',                                                                                                                                   
        'NAME': '********_umap',                                                                                                                                                                 
        'USER': '********',                                                                                                                                                                      
        'PASSWORD': '********'                                                                                                                                                             
        'HOST': 'postgresql-<accountname>.alwaysdata.net',                                                                                                                                                  
        'PORT': '5432',                                                                                                                                                                       
        'DATABASE_HOST' = 'postgresql-<accountname>.alwaysdata.net',                                                                                                                                        
    }                                                                                                                                                                                         
}

The alwaysdata team haven't find a solution for my problem. https://forum.alwaysdata.com/viewtopic.php?id=4763

Have you any idea?

Thanks a lot.

asked 04 Apr '17, 10:37

Suryavarman's gravatar image

Suryavarman
11112
accept rate: 0%

edited 04 Apr '17, 23:39

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


The last three lines of the error message are pretty clear, aren' they? It's expecting to connect to Postgres via a named pipe at /var/run/postgresql/.s.PGSQL.5432, but that file doesn't exist. Does anything named similarly exist in /var/run/postgresql/? Can you see the server running when you type "ps aux | grep postgres"? It looks like umap (which I don't have a clue about, sorry) is actually supposed to use an IP socket to connect but somehow the database adapter is forced to only try the Unix socket. Maybe psycopg2 has some kind of config file?

permanent link

answered 05 Apr '17, 15:22

mbethke's gravatar image

mbethke
38171216
accept rate: 50%

Thanks a lot for your answer. I'm sorry for the delay.

The folder /var/run/postgresql/ doesn't exist. "ps aux | grep postgres" return nothing

I haven't find any psycopg2 config file. From psycopg2/__init_.py def connect(dsn=None,
database=None, user=None, password=None, host=None, port=None,
connection_factory=None, cursor_factory=None, async=False, **kwargs):

the inputs values are:

user : None password : None database : **** # not the good one host : None

I have force the values inside this init.py file:

The output error is : django.db.utils.OperationalError: could not translate host name "postgresql−****.alwaysdata.net" to address: Name or service not known

permanent link

answered 21 Apr '17, 15:14

Suryavarman's gravatar image

Suryavarman
11112
accept rate: 0%

edited 21 Apr '17, 15:17

1

meta: please login and then use the "add new comment" button below mbethke's answer if you are commenting on it. Afterwards please delete this "answer".

(22 Apr '17, 02:38) aseerel4c26 ♦

always data have solve my last bug: postgresql−*.alwaysdata.net has to be ( "−" -> "-" ) postgresql-*.alwaysdata.net

permanent link

answered 22 Apr '17, 10:21

Suryavarman's gravatar image

Suryavarman
11112
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×314
×165
×61
×1
×1

question asked: 04 Apr '17, 10:37

question was seen: 6,397 times

last updated: 22 Apr '17, 10:21

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum