[Akonadi] [Bug 386173] akonadictl stop does not shut down database
Martin Steigerwald
bugzilla_noreply at kde.org
Mon Jun 17 09:18:06 BST 2019
https://bugs.kde.org/show_bug.cgi?id=386173
--- Comment #18 from Martin Steigerwald <Martin at Lichtvoll.de> ---
Created attachment 120932
--> https://bugs.kde.org/attachment.cgi?id=120932&action=edit
akonadiserver.error with english locale, PostgreSQL properly shut down
(In reply to Daniel Vrátil from comment #17)
> Thanks for the logs, both of you. Indeed it appears that Akonadi mistakenly
> thinks, that Postgres is no longer running.
>
> Do you guys use non-english locale by default?
Yes:
% locale
LANG=de_DE.UTF-8
LANGUAGE=de
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
> Could you please run the following command both when Postgres IS running and
> when it is NOT running, and paste its output here?
>
> pg_ctl status --pgdata=$HOME/.local/share/akonadi/db_data
Running:
LANG=en /usr/lib/postgresql/11/bin/pg_ctl status
--pgdata=$HOME/.local/share/akonadi/db_data
pg_ctl: server is running (PID: 25164)
/usr/lib/postgresql/11/bin/postgres "-D"
"/home/martin/.local/share/akonadi/db_data" "-k/tmp/akonadi-martin.wTqoXj" "-h"
""
with my locale:
% /usr/lib/postgresql/11/bin/pg_ctl status
--pgdata=$HOME/.local/share/akonadi/db_data
pg_ctl: Server läuft (PID: 25164)
/usr/lib/postgresql/11/bin/postgres "-D"
"/home/martin/.local/share/akonadi/db_data" "-k/tmp/akonadi-martin.wTqoXj" "-h"
""
After akonadictl stop:
% LANG=en /usr/lib/postgresql/11/bin/pg_ctl status
--pgdata=$HOME/.local/share/akonadi/db_data
pg_ctl: server is running (PID: 25164)
/usr/lib/postgresql/11/bin/postgres "-D"
"/home/martin/.local/share/akonadi/db_data" "-k/tmp/akonadi-martin.wTqoXj" "-h"
""
with my locale same as above.
Stopped PostgreSQL process manually:
% LANG=en /usr/lib/postgresql/11/bin/pg_ctl status
--pgdata=$HOME/.local/share/akonadi/db_data
pg_ctl: no server running
% /usr/lib/postgresql/11/bin/pg_ctl status
--pgdata=$HOME/.local/share/akonadi/db_data
pg_ctl: kein Server läuft
Test with US english locale:
% locale
LANG=en
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
% akonadictl --verbose start
% akonadictl stop
Works. Stops database process just fine. akonadiserver.error attached.
Well Daniel, fix would be easy I bet: Just start external commend with English
locale if you need to parse strings in the output.
Is there no better way than than parsing output? pg_ctl returns 3 as exit code
if server is not running (see pg_ctl (1)):
status mode checks whether a server is running in the specified
data directory. If it is, the server's PID and the command line
options that were used to invoke it are displayed. If the
server is not running, pg_ctl returns an exit status of 3. If
an accessible data directory is not specified, pg_ctl returns
an exit status of 4.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list