[GH-ISSUE #1355] OperationalError : could not connect to server #1079

Closed
opened 2026-02-27 11:15:08 +03:00 by kerem · 10 comments
Owner

Originally created by @CooperBarrett on GitHub (Jan 13, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1355

Sorry, I'm French I'm using Deepl. com for translation...

Impacted versions

  • Modoboa: I don't have access to modoboa and I don't know where to find the information in the terminal. But I installed it two weeks ago.

  • installer used: Yes/

  • Webserver: Nginx

  • Installed on a dedicated Debian 9.3 server

Steps to reproduce

After reboot

Current behavior

"Error with : Error as occured" when I visit https://mail.mondomaine.fr

Hello,
I installed modoboa 2 weeks ago, everything worked perfectly but after a reboot, I no longer have access to webmail and I can no longer send or receive emails...

I have activated debug mode, here's what it returns to me:

OperationalError at /
could not connect to server: Connection refused
	Is the server running on host "127.0.0.1" and accepting
	TCP/IP connections on port 5432?
Request Method:
GET
Request URL: https://mail.seedbt.fr/
Django Version: 1.10.8
Exception Type: OperationalError
Exception Value:
could not connect to server: Connection refused
	Is the server running on host "127.0.0.1" and accepting
	TCP/IP connections on port 5432?
Exception Location: /srv/modoboa/env/local/lib/python2.7/site-packages/psycopg2/__init__.py in connect, line 130
Python Executable: /usr/bin/uwsgi-core
Python Version: 2.7.13
Python Path:
['.',
 '',
 '/srv/modoboa/env/lib/python2.7',
 '/srv/modoboa/env/lib/python2.7/plat-x86_64-linux-gnu',
 '/srv/modoboa/env/lib/python2.7/lib-tk',
 '/srv/modoboa/env/lib/python2.7/lib-old',
 '/srv/modoboa/env/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/srv/modoboa/env/local/lib/python2.7/site-packages',
 '/srv/modoboa/env/lib/python2.7/site-packages']
Server time: | Sat, 13 Jan 2018 11:04:32 +0100

I add the trace back :

Environment:


Request Method: GET
Request URL: https://mail.seedbt.fr/

Django Version: 1.10.8
Python Version: 2.7.13
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'reversion',
 'ckeditor',
 'ckeditor_uploader',
 'rest_framework',
 'rest_framework.authtoken',
 'modoboa',
 'modoboa.core',
 'modoboa.lib',
 'modoboa.admin',
 'modoboa.relaydomains',
 'modoboa.limits',
 'modoboa.parameters',
 'modoboa_amavis',
 'modoboa_pdfcredentials',
 'modoboa_postfix_autoreply',
 'modoboa_sievefilters',
 'modoboa_stats',
 'modoboa_webmail',
 'modoboa_contacts',
 'webpack_loader')
Installed Middleware:
('x_forwarded_for.middleware.XForwardedForMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'modoboa.core.middleware.LocalConfigMiddleware',
 'modoboa.lib.middleware.AjaxLoginRedirect',
 'modoboa.lib.middleware.CommonExceptionCatcher',
 'modoboa.lib.middleware.RequestCatcherMiddleware')



Traceback:

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  42.             response = get_response(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  244.             response = middleware_method(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/middleware/locale.py" in process_request
  25.         language = translation.get_language_from_request(request, check_path=i18n_patterns_used)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/translation/__init__.py" in get_language_from_request
  206.     return _trans.get_language_from_request(request, check_path)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py" in get_language_from_request
  516.         lang_code = request.session.get(LANGUAGE_SESSION_KEY)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in get
  68.         return self._session.get(key, default)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in _get_session
  207.                 self._session_cache = self.load()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py" in load
  35.                 expire_date__gt=timezone.now()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method
  85.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in get
  379.         num = len(clone)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__
  238.         self._fetch_all()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all
  1087.             self._result_cache = list(self.iterator())

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in __iter__
  54.         results = compiler.execute_sql()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  833.         cursor = self.connection.cursor()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in cursor
  231.             cursor = self.make_debug_cursor(self._cursor())

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in _cursor
  204.         self.ensure_connection()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection
  199.                 self.connect()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
  94.                 six.reraise(dj_exc_type, dj_exc_value, traceback)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection
  199.                 self.connect()

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in connect
  171.         self.connection = self.get_new_connection(conn_params)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py" in get_new_connection
  176.         connection = Database.connect(**conn_params)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/psycopg2/__init__.py" in connect
  130.     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

Exception Type: OperationalError at /
Exception Value: could not connect to server: Connection refused
	Is the server running on host "127.0.0.1" and accepting
	TCP/IP connections on port 5432?

Do you need the other logs displayed?

Thank you in advance for your help, I'm really annoyed...

Originally created by @CooperBarrett on GitHub (Jan 13, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1355 Sorry, I'm French I'm using Deepl. com for translation... --- # Impacted versions * Modoboa: I don't have access to modoboa and I don't know where to find the information in the terminal. But I installed it two weeks ago. * installer used: Yes/ * Webserver: Nginx * Installed on a dedicated Debian 9.3 server # Steps to reproduce After reboot # Current behavior "Error with : Error as occured" when I visit https://mail.mondomaine.fr Hello, I installed modoboa 2 weeks ago, everything worked perfectly but after a reboot, I no longer have access to webmail and I can no longer send or receive emails... I have activated debug mode, here's what it returns to me: ``` OperationalError at / could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432? Request Method: GET Request URL: https://mail.seedbt.fr/ Django Version: 1.10.8 Exception Type: OperationalError Exception Value: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432? Exception Location: /srv/modoboa/env/local/lib/python2.7/site-packages/psycopg2/__init__.py in connect, line 130 Python Executable: /usr/bin/uwsgi-core Python Version: 2.7.13 Python Path: ['.', '', '/srv/modoboa/env/lib/python2.7', '/srv/modoboa/env/lib/python2.7/plat-x86_64-linux-gnu', '/srv/modoboa/env/lib/python2.7/lib-tk', '/srv/modoboa/env/lib/python2.7/lib-old', '/srv/modoboa/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/modoboa/env/local/lib/python2.7/site-packages', '/srv/modoboa/env/lib/python2.7/site-packages'] Server time: | Sat, 13 Jan 2018 11:04:32 +0100 ``` I add the trace back : ``` Environment: Request Method: GET Request URL: https://mail.seedbt.fr/ Django Version: 1.10.8 Python Version: 2.7.13 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.sites', 'django.contrib.staticfiles', 'reversion', 'ckeditor', 'ckeditor_uploader', 'rest_framework', 'rest_framework.authtoken', 'modoboa', 'modoboa.core', 'modoboa.lib', 'modoboa.admin', 'modoboa.relaydomains', 'modoboa.limits', 'modoboa.parameters', 'modoboa_amavis', 'modoboa_pdfcredentials', 'modoboa_postfix_autoreply', 'modoboa_sievefilters', 'modoboa_stats', 'modoboa_webmail', 'modoboa_contacts', 'webpack_loader') Installed Middleware: ('x_forwarded_for.middleware.XForwardedForMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'modoboa.core.middleware.LocalConfigMiddleware', 'modoboa.lib.middleware.AjaxLoginRedirect', 'modoboa.lib.middleware.CommonExceptionCatcher', 'modoboa.lib.middleware.RequestCatcherMiddleware') Traceback: File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner 42. response = get_response(request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response 244. response = middleware_method(request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/middleware/locale.py" in process_request 25. language = translation.get_language_from_request(request, check_path=i18n_patterns_used) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/translation/__init__.py" in get_language_from_request 206. return _trans.get_language_from_request(request, check_path) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py" in get_language_from_request 516. lang_code = request.session.get(LANGUAGE_SESSION_KEY) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in get 68. return self._session.get(key, default) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py" in _get_session 207. self._session_cache = self.load() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py" in load 35. expire_date__gt=timezone.now() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/manager.py" in manager_method 85. return getattr(self.get_queryset(), name)(*args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in get 379. num = len(clone) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__ 238. self._fetch_all() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all 1087. self._result_cache = list(self.iterator()) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/query.py" in __iter__ 54. results = compiler.execute_sql() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 833. cursor = self.connection.cursor() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in cursor 231. cursor = self.make_debug_cursor(self._cursor()) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in _cursor 204. self.ensure_connection() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection 199. self.connect() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__ 94. six.reraise(dj_exc_type, dj_exc_value, traceback) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in ensure_connection 199. self.connect() File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/base/base.py" in connect 171. self.connection = self.get_new_connection(conn_params) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py" in get_new_connection 176. connection = Database.connect(**conn_params) File "/srv/modoboa/env/local/lib/python2.7/site-packages/psycopg2/__init__.py" in connect 130. conn = _connect(dsn, connection_factory=connection_factory, **kwasync) Exception Type: OperationalError at / Exception Value: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432? ``` Do you need the other logs displayed? Thank you in advance for your help, I'm really annoyed...
kerem 2026-02-27 11:15:08 +03:00
Author
Owner

@tonioo commented on GitHub (Jan 13, 2018):

As the log says, you're postgresql server is unreachable. Make sure it is running on the same machine than your modoboa instance.

<!-- gh-comment-id:357425439 --> @tonioo commented on GitHub (Jan 13, 2018): As the log says, you're postgresql server is unreachable. Make sure it is running on the same machine than your modoboa instance.
Author
Owner

@CooperBarrett commented on GitHub (Jan 13, 2018):

Thank you for your answer,
then postgresql and well on the same machine (installed with the script), and if I do service postgresql status, all is ok and it's running well.
Maybe a problem with the port?
This command netstat -laputen | grep 5432 doesn't return anything to me... I really don't understand !

info :

systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2018-01-13 14:02:26 CET; 8min ago
  Process: 3367 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 3367 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/postgresql.service

janv. 13 14:02:26 monserveur systemd[1]: Starting PostgreSQL RDBMS...
janv. 13 14:02:26 monserveur systemd[1]: Started PostgreSQL RDBMS.

log posgresql :

2018-01-12 13:14:10.051 CET [703] LOG:  received fast shutdown request
2018-01-12 13:14:10.051 CET [703] LOG:  aborting any active transactions
2018-01-12 13:14:10.051 CET [10721] modoboa@modoboa FATAL:  terminating connection due to administrator command
2018-01-12 13:14:10.051 CET [10720] modoboa@modoboa FATAL:  terminating connection due to administrator command
2018-01-12 13:14:10.051 CET [2837] amavis@amavis FATAL:  terminating connection due to administrator command
2018-01-12 13:14:10.076 CET [749] LOG:  autovacuum launcher shutting down
2018-01-12 13:14:10.240 CET [746] LOG:  shutting down
2018-01-12 13:14:10.934 CET [703] LOG:  database system is shut down
2018-01-12 13:14:58.090 CET [702] LOG:  invalid value for parameter "lc_messages": "en_US.UTF-8"
2018-01-12 13:14:58.208 CET [702] LOG:  invalid value for parameter "lc_monetary": "en_US.UTF-8"
2018-01-12 13:14:58.208 CET [702] LOG:  invalid value for parameter "lc_numeric": "en_US.UTF-8"
2018-01-12 13:14:58.208 CET [702] LOG:  invalid value for parameter "lc_time": "en_US.UTF-8"
2018-01-12 13:14:58.208 CET [702] FATAL:  configuration file "/etc/postgresql/9.6/main/postgresql.conf" contains errors
2018-01-12 13:41:52.326 CET [705] LOG:  invalid value for parameter "lc_messages": "en_US.UTF-8"
2018-01-12 13:41:52.369 CET [705] LOG:  invalid value for parameter "lc_monetary": "en_US.UTF-8"
2018-01-12 13:41:52.369 CET [705] LOG:  invalid value for parameter "lc_numeric": "en_US.UTF-8"
2018-01-12 13:41:52.369 CET [705] LOG:  invalid value for parameter "lc_time": "en_US.UTF-8"

My server is configured with "fr_FR.UTF-8" is it related ?

<!-- gh-comment-id:357427463 --> @CooperBarrett commented on GitHub (Jan 13, 2018): Thank you for your answer, then postgresql and well on the same machine (installed with the script), and if I do `service postgresql status`, all is ok and it's running well. Maybe a problem with the port? This command `netstat -laputen | grep 5432` doesn't return anything to me... I really don't understand ! info : ``` systemctl status postgresql ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: active (exited) since Sat 2018-01-13 14:02:26 CET; 8min ago Process: 3367 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 3367 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4915) CGroup: /system.slice/postgresql.service janv. 13 14:02:26 monserveur systemd[1]: Starting PostgreSQL RDBMS... janv. 13 14:02:26 monserveur systemd[1]: Started PostgreSQL RDBMS. ``` log posgresql : ``` 2018-01-12 13:14:10.051 CET [703] LOG: received fast shutdown request 2018-01-12 13:14:10.051 CET [703] LOG: aborting any active transactions 2018-01-12 13:14:10.051 CET [10721] modoboa@modoboa FATAL: terminating connection due to administrator command 2018-01-12 13:14:10.051 CET [10720] modoboa@modoboa FATAL: terminating connection due to administrator command 2018-01-12 13:14:10.051 CET [2837] amavis@amavis FATAL: terminating connection due to administrator command 2018-01-12 13:14:10.076 CET [749] LOG: autovacuum launcher shutting down 2018-01-12 13:14:10.240 CET [746] LOG: shutting down 2018-01-12 13:14:10.934 CET [703] LOG: database system is shut down 2018-01-12 13:14:58.090 CET [702] LOG: invalid value for parameter "lc_messages": "en_US.UTF-8" 2018-01-12 13:14:58.208 CET [702] LOG: invalid value for parameter "lc_monetary": "en_US.UTF-8" 2018-01-12 13:14:58.208 CET [702] LOG: invalid value for parameter "lc_numeric": "en_US.UTF-8" 2018-01-12 13:14:58.208 CET [702] LOG: invalid value for parameter "lc_time": "en_US.UTF-8" 2018-01-12 13:14:58.208 CET [702] FATAL: configuration file "/etc/postgresql/9.6/main/postgresql.conf" contains errors 2018-01-12 13:41:52.326 CET [705] LOG: invalid value for parameter "lc_messages": "en_US.UTF-8" 2018-01-12 13:41:52.369 CET [705] LOG: invalid value for parameter "lc_monetary": "en_US.UTF-8" 2018-01-12 13:41:52.369 CET [705] LOG: invalid value for parameter "lc_numeric": "en_US.UTF-8" 2018-01-12 13:41:52.369 CET [705] LOG: invalid value for parameter "lc_time": "en_US.UTF-8" ``` My server is configured with "fr_FR.UTF-8" is it related ?
Author
Owner

@tonioo commented on GitHub (Jan 13, 2018):

Maybe you could try to run the following command:

dpkg-reconfigure locales

and select fr_FR.UTF-8 and en_US.UTF-8 locales.

<!-- gh-comment-id:357449802 --> @tonioo commented on GitHub (Jan 13, 2018): Maybe you could try to run the following command: ```bash dpkg-reconfigure locales ``` and select fr_FR.UTF-8 and en_US.UTF-8 locales.
Author
Owner

@CooperBarrett commented on GitHub (Jan 15, 2018):

Here's what I have now...

2018-01-13 14:22:28.203 CET [4156] modoboa@modoboa ASTUCE :  Recréez la base de données avec une autre locale ou installez la locale
        manquante.
2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa FATAL:  la locale de la base de données est incompatible avec le système d'exploitation
2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa DÉTAIL:  La base de données a été initialisée avec un LC_COLLATE à « en_US.UTF-8 »,
        qui n'est pas reconnu par setlocale().
2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa ASTUCE :  Recréez la base de données avec une autre locale ou installez la locale
        manquante.
2018-01-13 14:22:30.376 CET [4160] FATAL:  la locale de la base de données est incompatible avec le système d'exploitation
2018-01-13 14:22:30.376 CET [4160] DÉTAIL:  La base de données a été initialisée avec un LC_COLLATE à « en_US.UTF-8 »,
        qui n'est pas reconnu par setlocale().
2018-01-13 14:22:30.376 CET [4160] ASTUCE :  Recréez la base de données avec une autre locale ou installez la locale
        manquante.

I finally think that the locals are not involved...

<!-- gh-comment-id:357684914 --> @CooperBarrett commented on GitHub (Jan 15, 2018): Here's what I have now... ``` 2018-01-13 14:22:28.203 CET [4156] modoboa@modoboa ASTUCE : Recréez la base de données avec une autre locale ou installez la locale manquante. 2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa FATAL: la locale de la base de données est incompatible avec le système d'exploitation 2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa DÉTAIL: La base de données a été initialisée avec un LC_COLLATE à « en_US.UTF-8 », qui n'est pas reconnu par setlocale(). 2018-01-13 14:22:28.203 CET [4157] modoboa@modoboa ASTUCE : Recréez la base de données avec une autre locale ou installez la locale manquante. 2018-01-13 14:22:30.376 CET [4160] FATAL: la locale de la base de données est incompatible avec le système d'exploitation 2018-01-13 14:22:30.376 CET [4160] DÉTAIL: La base de données a été initialisée avec un LC_COLLATE à « en_US.UTF-8 », qui n'est pas reconnu par setlocale(). 2018-01-13 14:22:30.376 CET [4160] ASTUCE : Recréez la base de données avec une autre locale ou installez la locale manquante. ``` I finally think that the locals are not involved...
Author
Owner

@tonioo commented on GitHub (Jan 15, 2018):

Yes it is, the message says the en_US.UTF-8 locale is missing. You need to install it.

[FR]
Il faut lancer la commande dpkg-reconfigure locales comme indiqué plus haut afin de générer cette locale. Il faut bien sélectionner les deux versions lors du processus.

<!-- gh-comment-id:357722418 --> @tonioo commented on GitHub (Jan 15, 2018): Yes it is, the message says the en_US.UTF-8 locale is missing. You need to install it. [FR] Il faut lancer la commande dpkg-reconfigure locales comme indiqué plus haut afin de générer cette locale. Il faut bien sélectionner les deux versions lors du processus.
Author
Owner

@CooperBarrett commented on GitHub (Jan 15, 2018):

I finally found my problem!
Actually, it wasn't from the locales.
I didn't have to do service postgresql start but use this command: service postgresql@9.6-main start
I'm really struggling to find it.
So I'll have two questions:

  • Why service postgresql start does not work?
  • Why postgresql does not launch or encounter an error during reboot.
<!-- gh-comment-id:357790506 --> @CooperBarrett commented on GitHub (Jan 15, 2018): I finally found my problem! Actually, it wasn't from the locales. I didn't have to do `service postgresql start` but use this command: `service postgresql@9.6-main start` I'm really struggling to find it. So I'll have two questions: - Why `service postgresql start` does not work? - Why `postgresql` does not launch or encounter an error during reboot.
Author
Owner

@ghost commented on GitHub (Mar 1, 2018):

service postgresql start starts the default version which I think is 9.2 or 9.3 on debian. Debian uses the @version-name scheme to support multiple versions of the same software.

To start PostgreSQL 9.6 at boot up run sudo systemctl enable postgresql@9.6-main.service

This should work, I don't use debian and I didn't have much luck finding any documentation about this.

<!-- gh-comment-id:369746251 --> @ghost commented on GitHub (Mar 1, 2018): `service postgresql start` starts the default version which I think is 9.2 or 9.3 on debian. Debian uses the `@version-name` scheme to support multiple versions of the same software. To start PostgreSQL 9.6 at boot up run `sudo systemctl enable postgresql@9.6-main.service` This should work, I don't use debian and I didn't have much luck finding any documentation about this.
Author
Owner

@tonioo commented on GitHub (Mar 2, 2018):

I do use Debian and it's the first time I see this... Maybe an ubuntu issue?

<!-- gh-comment-id:369845101 --> @tonioo commented on GitHub (Mar 2, 2018): I do use Debian and it's the first time I see this... Maybe an ubuntu issue?
Author
Owner

@CooperBarrett commented on GitHub (Mar 4, 2018):

I use debian stretch.
I manually restart postgresql with each reboot. For the moment, that's enough...

<!-- gh-comment-id:370214663 --> @CooperBarrett commented on GitHub (Mar 4, 2018): I use debian stretch. I manually restart postgresql with each reboot. For the moment, that's enough...
Author
Owner

@pubmania commented on GitHub (May 27, 2019):

This is an year old issue which is closed but impacted my installation just today. Like @CooperBarrett mine is running on Debian Stretch so I tried restarting postgresql and sure enough it worked but am not sure what caused it to begin with and how to avoid it. Any suggestions will be hugely appreciated.

<!-- gh-comment-id:496157279 --> @pubmania commented on GitHub (May 27, 2019): This is an year old issue which is closed but impacted my installation just today. Like @CooperBarrett mine is running on Debian Stretch so I tried restarting postgresql and sure enough it worked but am not sure what caused it to begin with and how to avoid it. Any suggestions will be hugely appreciated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1079
No description provided.