B
B
Bjornie2018-02-11 14:30:15
PostgreSQL
Bjornie, 2018-02-11 14:30:15

Why did "something" (like psql) crash on Ubuntu (DigitalOcean)?

In the morning the client calls and says that the system is not working. I go in and see 500. I turn on the debug directly and see that the system (Django) cannot connect to Postgresql (Cannot connect to postgresql on port 5432). I start googling for error codes, trying all sorts of seemingly painless checks and solutions.
In general, what solved the problem was setting the following values ​​\u200b\u200b(which were missing) through the commands:

locale-gen "en_US.UTF-8"
dpkg-reconfigure locales

Now I want to understand how psql is related to the above values ​​and how it even happened on its own.
When I updated packages (apt upgrade) (already during the debug, and not before the problem arose), for many of them the following was observed:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = "en_US.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Those. the problem was created because of these locales. Help me to understand.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2018-02-11
@AVKor

Here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question