Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301862 - media-sound/teamspeak-server-bin-3.0.0_beta16 : db_exec failed attempt to write a readonly database
Summary: media-sound/teamspeak-server-bin-3.0.0_beta16 : db_exec failed attempt to wri...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Christian Parpart (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 19:59 UTC by Jarry
Modified: 2010-01-26 19:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarry 2010-01-22 19:59:38 UTC
Teamspeak3-server does not start as it should, although the start-up script does not reveal any problem:

/etc/init.d/teamspeak3-server start
 * Starting TeamSpeak 3 Server ...                         [ ok ]

But teamspeak-server is not running, and in /var/log/teamspeak3-server/ts3server_<date>__<time>.<serial>.log there are these messages:

2010-01-22 19:49:22.255262|INFO    |ServerLibPriv |   | Server Version: 3.0.0-beta16 [Build: 9929]
2010-01-22 19:49:22.255566|INFO    |DatabaseQuery |   | dbPlugin name:    SQLite3 plugin, (c)TeamSpeak Systems GmbH
2010-01-22 19:49:22.255594|INFO    |DatabaseQuery |   | dbPlugin version: 3.6.21
2010-01-22 19:49:22.256294|INFO    |DatabaseQuery |   | checking database integrity
2010-01-22 19:49:22.268179|ERROR   |DatabaseQuery |   | db_exec failed attempt to write a readonly database
2010-01-22 19:49:22.268222|ERROR   |DatabaseQuery |   | db_exec() CREATE TABLE custom_fields (  server_id integer unsigned,  client_id i error: attempt to wri
te a readonly database
2010-01-22 19:49:22.268245|ERROR   |SQL           |   | database update to revision: 12 failed!



Reproducible: Always




I use baselayout2/openrc, so my /etc/portage/package.keywords is:

sys-apps/makedev ~amd64
sys-apps/openrc ~amd64
sys-apps/baselayout ~amd64
sys-apps/sysvinit ~amd64
media-sound/teamspeak-server-bin ~amd64

Everything else is stable AMD64...
Comment 1 Christian Parpart (RETIRED) gentoo-dev 2010-01-25 13:03:00 UTC
this looks like a permission issue in either /opt/teamspeak-server/ or /var/log/teamspeak-server/

please check whether the process has read/WRITE access as the user you configured (or as teamspeak3/teamspeak3)

and tell me what file/directory exactly it was for you.

regards,
Christian Parpart.
Comment 2 Jarry 2010-01-25 20:56:57 UTC
(In reply to comment #1)
# ls -l /var/log | grep teamspeak
drwx------ 2 teamspeak3 root      4096 Jan 25 20:24 teamspeak3-server
ls -l /opt | grep teamspeak
drwxr-xr-x 6 teamspeak3 root     4096 Jan 22 19:25 teamspeak3-server

This seems to me ok. Every log-file in /var/log/teamspeak3-server (whenever I try to start TS) looks like:

 # more ts3server_2010-01-25__20_24_24.238878.log
2010-01-25 20:24:24.249801|INFO    |ServerLibPriv |   | Server Version: 3.0.0-be
ta16 [Build: 9929]
2010-01-25 20:24:24.277328|INFO    |DatabaseQuery |   | dbPlugin name:    SQLite
3 plugin, (c)TeamSpeak Systems GmbH
2010-01-25 20:24:24.277857|INFO    |DatabaseQuery |   | dbPlugin version: 3.6.21
2010-01-25 20:24:24.297023|INFO    |DatabaseQuery |   | checking database integr
ity
2010-01-25 20:24:24.394850|ERROR   |DatabaseQuery |   | db_exec failed attempt t
o write a readonly database
2010-01-25 20:24:24.394906|ERROR   |DatabaseQuery |   | db_exec() CREATE TABLE c
ustom_fields (  server_id integer unsigned,  client_id i error: attempt to write
 a readonly database
2010-01-25 20:24:24.394929|ERROR   |SQL           |   | database update to revis
ion: 12 failed!

But I have info which might be relevant:

Before I updated my system I had sysvinit-2.86-r12, openrc-0.5.3, baselayout-2.0.0 (all ~amd64) and unknown teamspeak-server-bin version (probably beta12 I think). And I'm pretty sure ts3 worked.

After the last update, I have sysvinit-2.87-r3, openrc-0.6.0-r1, baselayout-2.0.1 (all ~amd64) and teamspeak-server-bin-3.0.0_beta16. 

Unfortunatelly, those older packages have been removed from portage, so I can not downgrade and test it...

regards,
Jarry
Comment 3 Jarry 2010-01-26 19:45:43 UTC
> this looks like a permission issue in either /opt/teamspeak-server/ or
> /var/log/teamspeak-server/

You were right Christian, I found the problem:

talk teamspeak3-server # ls -al
total 5360
drwxr-xr-x 6 teamspeak3 root    4096 Jan 22 19:25 .
drwxr-xr-x 4 root       root    4096 Jan 16 18:53 ..
-rw-r--r-- 1 root       root   12271 Jan 22 19:25 CHANGELOG
-rw-r--r-- 1 root       root   23747 Jan 22 19:25 LICENSE
drwxr-xr-x 2 root       root    4096 Jan 22 19:25 doc
drwx------ 3 root       root    4096 Jan  7 16:23 files
-rwxr-xr-x 1 root       root  212443 Jan 22 19:25 libts3db_mysql.so
-rwxr-xr-x 1 root       root  961617 Jan 22 19:25 libts3db_sqlite3.so
-rw-r--r-- 1 root       root      10 Jan 22 19:25 query_ip_whitelist.txt
drwxr-xr-x 2 root       root    4096 Jan 22 19:25 serverquerydocs
drwxr-xr-x 4 root       root    4096 Jan 22 19:25 sql
-rwxr-xr-x 1 root       root 4053104 Jan 22 19:25 ts3server-bin
-rw-r--r-- 1 root       root  174080 Jan 20 18:22 ts3server.sqlitedb

Then I uninstalled TS, removed /opt/teamspeak3-server, installed TS again, started, and it looks now:

talk teamspeak3-server # ls -al
total 5356
drwxr-xr-x 6 teamspeak3 root          4096 Jan 26 19:31 .
drwxr-xr-x 4 root       root          4096 Jan 26 19:30 ..
-rw-r--r-- 1 root       root         12271 Jan 26 19:30 CHANGELOG
-rw-r--r-- 1 root       root         23747 Jan 26 19:30 LICENSE
drwxr-xr-x 2 root       root          4096 Jan 26 19:30 doc
drwx------ 3 teamspeak3 teamspeak3    4096 Jan 26 19:31 files
-rwxr-xr-x 1 root       root        212443 Jan 26 19:30 libts3db_mysql.so
-rwxr-xr-x 1 root       root        961617 Jan 26 19:30 libts3db_sqlite3.so
-rw-r--r-- 1 root       root            10 Jan 26 19:30 query_ip_whitelist.txt
drwxr-xr-x 2 root       root          4096 Jan 26 19:30 serverquerydocs
drwxr-xr-x 4 root       root          4096 Jan 26 19:30 sql
-rwxr-xr-x 1 root       root       4053104 Jan 26 19:30 ts3server-bin
-rw-r--r-- 1 teamspeak3 teamspeak3  168960 Jan 26 19:31 ts3server.sqlitedb

TS3 is now running, no error in log is reported. But I do not know how this happened because I'm pretty sure I did *not* change any permissions manually. You see, that "files" directory and "ts3server.sqlitedb" file had older time-stamp, so they were installed with some previous TS-version (I assume beta12 or beta15, based on the time/date)...

Regards,
Jarry