Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
akonadiserver doesn't start after postgresql update to -9.5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 318

PostPosted: Sat Mar 05, 2016 3:22 pm    Post subject: akonadiserver doesn't start after postgresql update to -9.5 Reply with quote

Hello,

when I executed emerge -vuUND @world postgres got updated from version 9.4 to 9.5. I followed the steps shown here: https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL to migrate the data after that.
The following commands did not report an error:
Code:
root #> emerge --config dev-db/postgresql:9.5
postgres $>  pg_upgrade -U postgres -d /var/lib/postgresql/9.4/data -D /var/lib/postgresql/9.5/data -b /usr/lib/postgresql-9.4/bin -B /usr/lib/postgresql-9.5/bin

I'm not a 100% sure but do I need to migrate the <users> data manually?
Code:
stdout: "waiting for server to start....FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.1. stopped waiting

The problem is that akonadiserver doesn't start anymore and shows the following on the console output:
Code:
$> kontact
kontact(1831)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: AgentManager failed to get a valid AgentManager DBus interface. Error is: 1 "org.freedesktop.DBus.Error.NameHasNoOwner" "Could not get owner of name 'org.freedesktop.Akonadi.Control': no such name"
kontact(1831)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name"
kontact(1831)/libakonadi Akonadi::SessionPrivate::socketError: Socket error occurred: "QLocalSocket::connectToServer: Invalid name"
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
search paths:  ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin", "/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3", "/usr/bin", "/usr/sbin", "/usr/local/sbin", "/usr/lib/postgresql/8.4/bin", "/usr/lib/postgresql/9.0/bin", "/usr/lib/postgresql/9.1/bin", "/usr/lib/postgresql/9.2/bin", "/usr/lib/postgresql/9.3/bin")
0 ✓ xxx@magic /home/xxx $> Database process exited unexpectedly during initial connection!
executable: "/usr/bin/pg_ctl"
arguments: ("start", "-w", "--timeout=10", "--pgdata=/home/xxx/.local/share/akonadi/db_data", "-o "-k/tmp/akonadi-xxx.VhazQx" -h ''")
stdout: "waiting for server to start....FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.1. stopped waiting
"
stderr: "pg_ctl: could not start server
Examine the log output.
"
exit code: 1
process error: "Process operation timed out"
"[
0: akonadiserver(_Z11akBacktracev+0x4a) [0x462bda]
1: akonadiserver() [0x462e54]
2: /lib64/libc.so.6(+0x33290) [0x7f1930d80290]
3: /lib64/libc.so.6(gsignal+0x37) [0x7f1930d80217]
4: /lib64/libc.so.6(abort+0x16a) [0x7f1930d8166a]
5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x84) [0x7f19325818f4]
6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xad) [0x464c5d]
7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x8a) [0x7f193261fcca]
8: /usr/lib64/qt4/libQtCore.so.4(+0x11fad5) [0x7f193262fad5]
9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x31) [0x7f1932638441]
10: akonadiserver(_ZN7Akonadi6Server18DbConfigPostgresql19startInternalServerEv+0x11ad) [0x4d33ed]
11: akonadiserver(_ZN7Akonadi6Server13AkonadiServer20startDatabaseProcessEv+0xff) [0x46585f]
12: akonadiserver(_ZN7Akonadi6Server13AkonadiServer4initEv+0xb8) [0x467f48]
13: akonadiserver() [0x52ce69]
14: /usr/lib64/qt4/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x1e1) [0x7f19326aeb01]
15: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8d) [0x7f193269597d]
16: /usr/lib64/qt4/libQtCore.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x231) [0x7f1932698d21]
17: /usr/lib64/qt4/libQtCore.so.4(+0x1b48ee) [0x7f19326c48ee]
18: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x24d) [0x7f1930427c6d]
19: /usr/lib64/libglib-2.0.so.0(+0x49f50) [0x7f1930427f50]
20: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f1930427ffc]
21: /usr/lib64/qt4/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x7e) [0x7f19326c4a5e]
22: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x41) [0x7f19326944d1]
23: /usr/lib64/qt4/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x1a5) [0x7f1932694835]
24: /usr/lib64/qt4/libQtCore.so.4(_ZN16QCoreApplication4execEv+0x99) [0x7f1932699db9]
25: akonadiserver(main+0x1ed) [0x45d2fd]
26: /lib64/libc.so.6(__libc_start_main+0xf0) [0x7f1930d6d620]
27: akonadiserver(_start+0x29) [0x45db29]
]"
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
search paths:  ("/usr/local/bin", "/usr/bin", "/bin", "/opt/bin", "/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.3", "/usr/bin", "/usr/sbin", "/usr/local/sbin", "/usr/lib/postgresql/8.4/bin", "/usr/lib/postgresql/9.0/bin", "/usr/lib/postgresql/9.1/bin", "/usr/lib/postgresql/9.2/bin", "/usr/lib/postgresql/9.3/bin")
Database process exited unexpectedly during initial connection!
executable: "/usr/bin/pg_ctl"
arguments: ("start", "-w", "--timeout=10", "--pgdata=/home/xxx/.local/share/akonadi/db_data", "-o "-k/tmp/akonadi-xxx.VhazQx" -h ''")


Thanks in advance!
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 318

PostPosted: Tue Mar 15, 2016 6:45 pm    Post subject: Reply with quote

*bump*

I am quite sure that I did not have to convert the databases of the normal users e.g. in ~/.local/share/akonadi/ but I might just have been lucky that earlier databases was compatible and 9.4 -> 9.5 is not.
Was I?

The problem can be reverted like this:
Code:
sudo eselect postgresql set 9.4   # the number needs to be the pre-updated version number, of course that still needs to be available

To prevent further problems I masked updates
Code:
sudo sh -c 'echo -e ">=dev-db/postgresql-9.5\n" >> /etc/portage/package.mask/postgresql && chmod a+r /etc/portage/package.mask/postgresql'

Depending on your umask the '&&' and the chmod command above might not be needed. I do, emerge -p <package>|<set> won't work without it.
However - that's no solution. Is there a script that can convert PGSQL databases system-wide if that's needed?

Is there anything I might have done wrong?
Can I set the DB version on a per-user basis? eselect seems to set it for all users.
Back to top
View user's profile Send private message
titanofold
Developer
Developer


Joined: 30 Dec 2003
Posts: 235
Location: Bryson City, NC USA

PostPosted: Tue Jun 28, 2016 6:12 pm    Post subject: Reply with quote

Sorry to be so late. Did you figure out the issue?

The problem may have been cause by not using the 9.5 version of pg_upgrade (pg_upgrade95).

I haven't run into this issue though, so I'm just guessing.
_________________
The best things in life are free.
Guy-1: Surely, you will fold with me...
Guy-2: Alright, but don't call me Shirley
Back to top
View user's profile Send private message
as.gentoo
Guru
Guru


Joined: 07 Aug 2004
Posts: 318

PostPosted: Tue Jun 28, 2016 8:48 pm    Post subject: Reply with quote

titanofold wrote:
Sorry to be so late. Did you figure out the issue?
The problem may have been cause by not using the 9.5 version of pg_upgrade (pg_upgrade95).

I haven't run into this issue though, so I'm just guessing.
Better late than never. ;)

No, I just reverted back to 9.4 and masked all updates. Everything works fine since that.
It is not mentioned that you need to use the script having the update-version number in it's name here https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Post-9.0_Migration . Shouldn't
Code:
eselect postgresql set <new_version>
do that atuomatically? Anyhow, I will try that next time as well.

IIRC I disabled akonadi too.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum