Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres-based murmur crashes trying to migrate to 1.3.1 #4292

Closed
JuniorJPDJ opened this issue Jun 14, 2020 · 32 comments
Closed

Postgres-based murmur crashes trying to migrate to 1.3.1 #4292

JuniorJPDJ opened this issue Jun 14, 2020 · 32 comments
Labels
bug A bug (error) in the software help wanted Good community contribution opportunities server

Comments

@JuniorJPDJ
Copy link
Contributor

JuniorJPDJ commented Jun 14, 2020

Describe the bug
My server deny to start after upgrade. I forgot to backup it C:

Steps to Reproduce
May be not that easy, but I haven't tried..
It was sqlite 1.2.X server migrated to postgres with pgloader, but it worked after this :X
Now after upgrade 1.3.0 to 1.3.1 it refuses to start.
It may be as easy as just trying to start 1.3.1 murmur on 1.3.0 data.

Expected behavior
Work?

Screenshots

mumble_1      | <W>2020-06-14 03:32:01.499 SSL: OpenSSL version is 'OpenSSL 1.1.1g  21 Apr 2020'
mumble_1      | <W>2020-06-14 03:32:01.499 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)
mumble_1      | <C>2020-06-14 03:32:01.500 MetaParams: Adding 1 intermediate certificates from certificate file.
mumble_1      | <W>2020-06-14 03:32:01.940 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"
mumble_1      | NOTICE:  relation "meta" already exists, skipping
mumble_1      | <W>2020-06-14 03:32:01.968 Renaming old tables...
mumble_1      | <W>2020-06-14 03:32:01.971 Generating new tables...
mumble_1      | NOTICE:  index "slog_time" does not exist, skipping
mumble_1      | NOTICE:  index "config_key" does not exist, skipping
mumble_1      | NOTICE:  index "channel_id" does not exist, skipping
mumble_1      | NOTICE:  index "channel_info_id" does not exist, skipping
mumble_1      | NOTICE:  index "players_name" does not exist, skipping
mumble_1      | NOTICE:  index "players_id" does not exist, skipping
mumble_1      | NOTICE:  index "users_channel" does not exist, skipping
mumble_1      | NOTICE:  index "users_name" does not exist, skipping
mumble_1      | NOTICE:  index "users_id" does not exist, skipping
mumble_1      | NOTICE:  index "user_info_id" does not exist, skipping
mumble_1      | NOTICE:  index "groups_name_channels" does not exist, skipping
mumble_1      | NOTICE:  index "group_members_users" does not exist, skipping
mumble_1      | NOTICE:  index "acl_channel_pri" does not exist, skipping
mumble_1      | NOTICE:  index "acl_user" does not exist, skipping
mumble_1      | <W>2020-06-14 03:32:02.092 Importing old data...
mumble_1      | <F>2020-06-14 03:32:02.145 SQL Error [INSERT INTO "groups" ("group_id", "server_id", "name", "channel_id", "inherit", "inheritable") SELECT "group_id", "server_id", "name", "channel_id", "inherit", "inheritable" FROM "groups_old_1592105521"]: ERROR:  insert or update on table "groups" violates foreign key constraint "groups_del_channel"
mumble_1      | DETAIL:  Key (server_id, channel_id)=(1, 17) is not present in table "channels".
mumble_1      | (23503) QPSQL: Unable to create query
mumble_mumble_1 exited with code 1
@Krzmbrzl
Copy link
Member

Could you show which tables do exist after you have run 1.3.1 and it crashed?

@Krzmbrzl Krzmbrzl added bug A bug (error) in the software client needs-more-input labels Jun 14, 2020
@JuniorJPDJ
Copy link
Contributor Author

postgres=# \c mumble
You are now connected to database "mumble" as user "postgres".
mumble=# \dt
             List of relations
 Schema |     Name      | Type  |  Owner   
--------+---------------+-------+----------
 public | acl           | table | postgres
 public | bans          | table | postgres
 public | channel_info  | table | postgres
 public | channel_links | table | postgres
 public | channels      | table | postgres
 public | config        | table | postgres
 public | group_members | table | postgres
 public | groups        | table | postgres
 public | meta          | table | postgres
 public | servers       | table | postgres
 public | slog          | table | postgres
 public | user_info     | table | postgres
 public | users         | table | postgres
(13 rows)

@JuniorJPDJ
Copy link
Contributor Author

PS. server, not client (label is wrong)

@Krzmbrzl Krzmbrzl added server and removed client labels Jun 14, 2020
@Krzmbrzl
Copy link
Member

Okay so by looking at the code I think all the NOTICE... messages are not bad. It is a bit curious that they show up, since the code explicitly deletes these triggers IF EXIST, but maybe that's just a very verbose log 🤷

The actual crash coming from the foreign key constraint, seems to be triggered by this line:

SQLDO("INSERT INTO `%1groups` (`group_id`, `server_id`, `name`, `channel_id`, `inherit`, `inheritable`) SELECT `group_id`, `server_id`, `name`, `channel_id`, `inherit`, `inheritable` FROM `%1groups%2`");

Interestingly though this line hasn't changed in 6 years...

Was this the first time you performed a Mumble update? Or did you use older versions (with Postgres!) before and they upgraded just fine?

@JuniorJPDJ
Copy link
Contributor Author

As far as I remember I was using 1.2.something with postgres already, or I may be wrong.
My Dockerfile is using murmur package from Alpine repo.
Whole Dockerfile looks like this:

FROM alpine:latest
RUN set -ex; apk add --no-cache murmur qt5-qtbase-postgresql
RUN adduser -DHs /sbin/nologin mumble
EXPOSE 64738 64738/udp
USER mumble
VOLUME /etc/mumble
CMD ["/usr/bin/murmurd", "-fg", "-ini", "/etc/mumble/config.ini"]

The file was created on Feb 23, so I'll look up version of murmur package from this date in a while.
That was also a day when I migrated to postgres.

This time I just rebuilt the containers (as I do few times a week), package was updated so my bet was error in 1.3.1.

@JuniorJPDJ
Copy link
Contributor Author

It seems that's my first upgrade with postgres, my initial Dockerfile was already 1.3.0 based.
Server db is old, start point was like 1.2.14 sqlite on some old debian, I had to migrate to other db because of timeout problems caused by IO waits in sqlite.
The worse is that I literally deleted backup of sqlite like 3 days ago..

What else can I provide to help?

@JuniorJPDJ
Copy link
Contributor Author

I built 1.3.0-r6 from alpine aports, plugged it to the same DB and.. It worked ;o
At least I have working mumble server at the moment.

@Krzmbrzl
Copy link
Member

It could very well be that the issue was introduced in 1.3.1. I tinkered with the DB code in order to fix the encoding, so maybe I broke something.

Could you create a SQL dump of your database before upgrading that you could send to me, so that I can test this out myself? (see https://www.postgresql.org/docs/9.1/backup-dump.html)
Passwords, etc. should only be stored as hashes anyways. If you have sensible information you can of course remove/replace them.

Furthermore it might also be a great help if you could experiment with removing parts of the content and check whether the crash still happens. If yes, leave the content out, if no: put it back in and delete something else. That way we should be able to narrow down what could be the root of the problem.
I guess the first step in that would be to let murmur 1.3.0 create an empty database and try upgrading this. If that already crashes, you don't have to do any of the above (though this scenario should be working as this is what I used to test my changes).

You can put the dump into a file and send it to me via

mumble/.mailmap

Lines 122 to 123 in 9f5aab4

Robert Adam <dev@robert-adam.de> <krzmbrzl@gmail.com>
Robert Adam <dev@robert-adam.de> <krzmbrzl@users.noreply.github.com>

(I hope you don't have gigabytes of data in your DB? ^^)

@JuniorJPDJ
Copy link
Contributor Author

I will send you whole docker stack tared, it will be easier for both of us (probably ;x ).

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Jun 15, 2020

I sent you an email with attached dump and docker stack in tarball.
I'll also do some tests with migration of fresh mumble like you suggested ;)

EDIT: Mail was rejected by gmail, but it seems not to be needed - issue is reproducible without my db.

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Jun 15, 2020

Migration of clean 1.3.0 to 1.3.1 also fails.

Log of 1.3.0:

mumble_1    | <W>2020-06-15 18:33:09.644 SSL: OpenSSL version is 'OpenSSL 1.1.1g  21 Apr 2020'                                                                                                                                               
mumble_1    | <W>2020-06-15 18:33:09.644 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)                                                                                                                            
mumble_1    | <C>2020-06-15 18:33:09.645 MetaParams: Adding 1 intermediate certificates from certificate file.                                                                                                                               
mumble_1    | <W>2020-06-15 18:33:10.084 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SH
A256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"
mumble_1    | <W>2020-06-15 18:33:11.307 Performed initial PBKDF2 benchmark. Will use 16000 iterations as default
mumble_1    | <W>2020-06-15 18:33:11.308 Generating new tables...
mumble_1    | <W>2020-06-15 18:33:11.444 OSInfo: Failed to execute lsb_release
mumble_1    | <W>2020-06-15 18:33:11.445 Murmur 1.3.0 (1.3.0) running on X11: Linux 5.4.0-37-generic: Booting servers
mumble_1    | WARNING:  there is already a transaction in progress
postgres_1  | 2020-06-15 18:33:11.490 UTC [53] WARNING:  there is already a transaction in progress
mumble_1    | <W>2020-06-15 18:33:11.495 1 => Password for 'SuperUser' set to 'uxnUarW6a27E'
postgres_1  | 2020-06-15 18:33:11.514 UTC [53] WARNING:  there is no transaction in progress
mumble_1    | WARNING:  there is no transaction in progress
mumble_1    | <W>2020-06-15 18:33:11.514 1 => Server listening on 0.0.0.0:64738
mumble_1    | <W>2020-06-15 18:33:11.515 1 => Failed to set IPV6_RECVPKTINFO for 0.0.0.0:64738
mumble_1    | <W>2020-06-15 18:33:11.966 1 => Announcing server via bonjour
mumble_1    | <W>2020-06-15 18:33:11.967 1 => Registration needs nonempty 'registername', 'registerpassword' and 'registerurl', must have an empty 'password' and allowed pings.

Then 1.3.1:

mumble_1    | <W>2020-06-15 18:34:18.064 SSL: OpenSSL version is 'OpenSSL 1.1.1g  21 Apr 2020'
mumble_1    | <W>2020-06-15 18:34:18.065 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)
mumble_1    | <C>2020-06-15 18:34:18.065 MetaParams: Adding 1 intermediate certificates from certificate file.
mumble_1    | <W>2020-06-15 18:34:18.504 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"
mumble_1    | NOTICE:  relation "meta" already exists, skipping
mumble_1    | <W>2020-06-15 18:34:18.530 Renaming old tables...
mumble_1    | <W>2020-06-15 18:34:18.533 Generating new tables...
mumble_1    | NOTICE:  drop cascades to 5 other objects
mumble_1    | DETAIL:  drop cascades to constraint channels_parent_del on table channels_old_1592246058
mumble_1    | drop cascades to constraint channel_info_del_channel on table channel_info_old_1592246058
mumble_1    | drop cascades to constraint groups_del_channel on table groups_old_1592246058
mumble_1    | drop cascades to constraint acl_del_channel on table acl_old_1592246058
mumble_1    | drop cascades to constraint channel_links_del_channel on table channel_links_old_1592246058
mumble_1    | NOTICE:  index "players_name" does not exist, skipping
mumble_1    | NOTICE:  index "players_id" does not exist, skipping
mumble_1    | NOTICE:  drop cascades to 3 other objects
mumble_1    | DETAIL:  drop cascades to constraint user_info_del_user on table user_info_old_1592246058
mumble_1    | drop cascades to constraint group_members_del_user on table group_members_old_1592246058
mumble_1    | drop cascades to constraint acl_del_user on table acl_old_1592246058
mumble_1    | <W>2020-06-15 18:34:18.664 Importing old data...
mumble_1    | <W>2020-06-15 18:34:18.675 Removing old tables...
mumble_1    | NOTICE:  table "players_old_1592246058" does not exist, skipping
postgres_1  | 2020-06-15 18:34:18.678 UTC [55] ERROR:  cannot drop table groups_old_1592246058 because other objects depend on it
postgres_1  | 2020-06-15 18:34:18.678 UTC [55] DETAIL:  constraint group_members_del_group on table group_members_old_1592246058 depends on table groups_old_1592246058
postgres_1  | 2020-06-15 18:34:18.678 UTC [55] HINT:  Use DROP ... CASCADE to drop the dependent objects too.
postgres_1  | 2020-06-15 18:34:18.678 UTC [55] STATEMENT:  DROP TABLE IF EXISTS "groups_old_1592246058"
mumble_1    | <F>2020-06-15 18:34:18.680 SQL Error [DROP TABLE IF EXISTS "groups_old_1592246058"]: ERROR:  cannot drop table groups_old_1592246058 because other objects depend on it
mumble_1    | DETAIL:  constraint group_members_del_group on table group_members_old_1592246058 depends on table groups_old_1592246058
mumble_1    | HINT:  Use DROP ... CASCADE to drop the dependent objects too.
mumble_1    | (2BP01) QPSQL: Unable to create query
test-mumble_mumble_1 exited with code 1

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Jun 15, 2020

Clean install of 1.3.1 works good with postgres, just migration from older version fails.

@Krzmbrzl
Copy link
Member

I will send you whole docker stack tared, it will be easier for both of us (probably ;x ).

You didn't send it yet though, did you? If so I haven't received it 👀

Migration of clean 1.3.0 to 1.3.1 also fails.

That means I'm not guilty :D

Okay I guess that means database migration with Postgres is broken in general. The question now is: What is the relevant entry in the database that makes the migration fail? I guess it has something to do with Postgres doing more checks in regards to inter-table-dependencies which we seem to not take into account during the migration...

@JuniorJPDJ
Copy link
Contributor Author

You didn't send it yet though, did you? If so I haven't received it eyes

EDIT: Mail was rejected by gmail, but it seems not to be needed - issue is reproducible without my db.

XD

That means I'm not guilty :D

Me neither! XD

Okay I guess that means database migration with Postgres is broken in general. The question now is: What is the relevant entry in the database that makes the migration fail? I guess it has something to do with Postgres doing more checks in regards to inter-table-dependencies which we seem to not take into account during the migration...

How can I help you then? Could I do something?

@Krzmbrzl
Copy link
Member

How can I help you then? Could I do something?

Did you already try upgrading an empty DB? Did that also crash?
If yes, then the next step would be to check the code (dunno if you can/want to do this?). If no, then you could try adding small pieces to the DB and check if that is enough to produce the crash (e.g. register a single user, create a second channel, set the ACL for one channel, etc.)

@JuniorJPDJ
Copy link
Contributor Author

Upgrading empty db doesn't mean clean install?
If it does I tried and it worked.

@Krzmbrzl
Copy link
Member

Upgrading empty db doesn't mean clean install?

No - in that case no upgrade is performed. You'd get this by performing a clean install of an older version (let's say 1.3.0), starting it up once and then upgrading to 1.3.1 without having interacted with the server. It'll create the database on startup but as long as you don't join the server and start creating channels, etc. the DB will remain (pretty much) empty...

@JuniorJPDJ
Copy link
Contributor Author

So that's the case I tried here and it failed to migrate: #4292 (comment)

@Krzmbrzl
Copy link
Member

Oh yeah - forgot about that. Sorry 🙈

Okay then I guess all that remains is actually debugging and fixing the code. I'm not sure yet when I'll get to it though. If you (or someone reading this) would be willing to take that on and submit a PR, we'd be very grateful :)

@Krzmbrzl Krzmbrzl added the help wanted Good community contribution opportunities label Jun 19, 2020
Krzmbrzl added a commit that referenced this issue Aug 2, 2020
…on constraints

This fixes the second case of PostgreSQL migration failure in #4292

Not tested with a players table, and tested only on PostgreSQL though the changes should make the drops work better on any database.

Additionally the changes were left minimal to not introduce new issues, rather than reordering the whole section to the most logical order.
Krzmbrzl pushed a commit to Krzmbrzl/mumble that referenced this issue Aug 4, 2020
This fixes the second case of PostgreSQL migration failure in mumble-voip#4292
@Your-New-SJW-Waifu
Copy link

I've been having the same issue. My server was initially setup on postgres (no migration). I'm currently on version 1.3.0 and haven't been able to upgrade to 1.3.1 or 1.3 2.
Here's the output when I try to upgrade and restart the service:

Aug 30 07:48:58 neckbeard.shittyurl.org systemd[1]: Started Mumble Daemon.
Aug 30 07:48:58 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:58.487 SSL: OpenSSL version is 'OpenSSL 1.1.1g  21 Apr 2020'
Aug 30 07:48:58 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:58.487 Initializing settings from /etc/murmur.ini (basepath /etc)
Aug 30 07:48:58 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:58.490 Binding to address 2605:6400:20:64d:526b:5930:66c8:fdc7
Aug 30 07:48:58 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:58.490 Binding to address 205.185.121.146
Aug 30 07:48:58 neckbeard.shittyurl.org murmurd[701211]: <C>2020-08-30 07:48:58.491 MetaParams: Adding 1 intermediate certificates from certificate file.
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:59.424 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <C>2020-08-30 07:48:59.430 Successfully switched to uid 122
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  relation "meta" already exists, skipping
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:59.514 Renaming old tables...
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:59.528 Generating new tables...
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  drop cascades to 5 other objects
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: DETAIL:  drop cascades to constraint channels_parent_del on table channels_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint channel_info_del_channel on table channel_info_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint groups_del_channel on table groups_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint acl_del_channel on table acl_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint channel_links_del_channel on table channel_links_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  index "players_name" does not exist, skipping
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  index "players_id" does not exist, skipping
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  drop cascades to 3 other objects
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: DETAIL:  drop cascades to constraint user_info_del_user on table user_info_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint group_members_del_user on table group_members_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: drop cascades to constraint acl_del_user on table acl_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:59.825 Importing old data...
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <W>2020-08-30 07:48:59.875 Removing old tables...
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: NOTICE:  table "players_old_1598798939" does not exist, skipping
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: <F>2020-08-30 07:48:59.896 SQL Error [DROP TABLE IF EXISTS "groups_old_1598798939"]: ERROR:  cannot drop table groups_old_1598798939 because other objects depend on it
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: DETAIL:  constraint group_members_del_group on table group_members_old_1598798939 depends on table groups_old_1598798939
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: HINT:  Use DROP ... CASCADE to drop the dependent objects too.
Aug 30 07:48:59 neckbeard.shittyurl.org murmurd[701211]: (2BP01) QPSQL: Unable to create query
Aug 30 07:48:59 neckbeard.shittyurl.org systemd[1]: murmur.service: Main process exited, code=exited, status=1/FAILURE
Aug 30 07:48:59 neckbeard.shittyurl.org systemd[1]: murmur.service: Failed with result 'exit-code'.

@JuniorJPDJ
Copy link
Contributor Author

1.3.3 didn't fix the issue:

mumble_1      | <W>2020-10-11 12:34:55.105 SSL: OpenSSL version is 'OpenSSL 1.1.1h  22 Sep 2020'                                                                                                                                            
mumble_1      | <W>2020-10-11 12:34:55.108 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)                                                                                                                         
mumble_1      | <C>2020-10-11 12:34:55.109 MetaParams: Adding 1 intermediate certificates from certificate file.                                                                                                                            
mumble_1      | <W>2020-10-11 12:34:55.554 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM
-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"                                                                                        
mumble_1      | NOTICE:  relation "meta" already exists, skipping                                                                                                                                                                           
mumble_1      | <W>2020-10-11 12:34:55.581 Renaming old tables...                                                                                                                                                                           
mumble_1      | <W>2020-10-11 12:34:55.593 Generating new tables...                                                                                                                                                                         
mumble_1      | NOTICE:  index "slog_time" does not exist, skipping                                                                                                                                                                         
mumble_1      | NOTICE:  index "config_key" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_info_id" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "players_name" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "players_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_channel" does not exist, skipping                                                                                                                                                                     
mumble_1      | NOTICE:  index "users_name" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_id" does not exist, skipping                                                                                                                                                                          
mumble_1      | NOTICE:  index "user_info_id" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "groups_name_channels" does not exist, skipping                                                                                                                                                              
mumble_1      | NOTICE:  index "group_members_users" does not exist, skipping                                                                                                                                                               
mumble_1      | NOTICE:  index "acl_channel_pri" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "acl_user" does not exist, skipping                                                                                                                                                                          
mumble_1      | <W>2020-10-11 12:34:56.185 Importing old data...                                                                                                                                                                            
mumble_1      | <F>2020-10-11 12:34:56.262 SQL Error [INSERT INTO "groups" ("group_id", "server_id", "name", "channel_id", "inherit", "inheritable") SELECT "group_id", "server_id", "name", "channel_id", "inherit", "inheritable" FROM "gr
oups_old_1602419695"]: ERROR:  insert or update on table "groups" violates foreign key constraint "groups_del_channel"                                                                                                                      
mumble_1      | DETAIL:  Key (server_id, channel_id)=(1, 17) is not present in table "channels".
mumble_1      | (23503) QPSQL: Unable to create query

This is the latest murmur from alpine:edge repository installed using this Dockerfile:

cat mumble/Dockerfile
FROM alpine:edge

RUN set -ex ; apk --no-cache update ; apk --no-cache upgrade ; apk add --no-cache murmur qt5-qtbase-postgresql 

RUN adduser -DHs /sbin/nologin mumble

EXPOSE 64738 64738/udp

USER mumble

VOLUME /etc/mumble

CMD ["/usr/bin/murmurd", "-fg", "-ini", "/etc/mumble/config.ini"]

@Krzmbrzl
Copy link
Member

Yes that is expected. The fix mentioned in the changelog was for another error that was encountered with PostgreSQL

@Your-New-SJW-Waifu
Copy link

Your-New-SJW-Waifu commented Oct 11, 2020

1.3.3 didn't fix the issue:

mumble_1      | <W>2020-10-11 12:34:55.105 SSL: OpenSSL version is 'OpenSSL 1.1.1h  22 Sep 2020'                                                                                                                                            
mumble_1      | <W>2020-10-11 12:34:55.108 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)                                                                                                                         
mumble_1      | <C>2020-10-11 12:34:55.109 MetaParams: Adding 1 intermediate certificates from certificate file.                                                                                                                            
mumble_1      | <W>2020-10-11 12:34:55.554 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM
-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"                                                                                        
mumble_1      | NOTICE:  relation "meta" already exists, skipping                                                                                                                                                                           
mumble_1      | <W>2020-10-11 12:34:55.581 Renaming old tables...                                                                                                                                                                           
mumble_1      | <W>2020-10-11 12:34:55.593 Generating new tables...                                                                                                                                                                         
mumble_1      | NOTICE:  index "slog_time" does not exist, skipping                                                                                                                                                                         
mumble_1      | NOTICE:  index "config_key" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_info_id" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "players_name" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "players_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_channel" does not exist, skipping                                                                                                                                                                     
mumble_1      | NOTICE:  index "users_name" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_id" does not exist, skipping                                                                                                                                                                          
mumble_1      | NOTICE:  index "user_info_id" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "groups_name_channels" does not exist, skipping                                                                                                                                                              
mumble_1      | NOTICE:  index "group_members_users" does not exist, skipping                                                                                                                                                               
mumble_1      | NOTICE:  index "acl_channel_pri" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "acl_user" does not exist, skipping                                                                                                                                                                          
mumble_1      | <W>2020-10-11 12:34:56.185 Importing old data...                                                                                                                                                                            
mumble_1      | <F>2020-10-11 12:34:56.262 SQL Error [INSERT INTO "groups" ("group_id", "server_id", "name", "channel_id", "inherit", "inheritable") SELECT "group_id", "server_id", "name", "channel_id", "inherit", "inheritable" FROM "gr
oups_old_1602419695"]: ERROR:  insert or update on table "groups" violates foreign key constraint "groups_del_channel"                                                                                                                      
mumble_1      | DETAIL:  Key (server_id, channel_id)=(1, 17) is not present in table "channels".
mumble_1      | (23503) QPSQL: Unable to create query

This is the latest murmur from alpine:edge repository installed using this Dockerfile:

cat mumble/Dockerfile
FROM alpine:edge

RUN set -ex ; apk --no-cache update ; apk --no-cache upgrade ; apk add --no-cache murmur qt5-qtbase-postgresql 

RUN adduser -DHs /sbin/nologin mumble

EXPOSE 64738 64738/udp

USER mumble

VOLUME /etc/mumble

CMD ["/usr/bin/murmurd", "-fg", "-ini", "/etc/mumble/config.ini"]

Odd it fixed the issue for me. I actually just upgraded to 1.3.3 yesterday without issue on Arch.
What version of postgres are you using?

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Oct 13, 2020

latest pgsql12 version from docker

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Feb 1, 2021

anything? I'm still stuck on 1.3.0

@Your-New-SJW-Waifu
Copy link

Your-New-SJW-Waifu commented Feb 1, 2021 via email

@WRMSRwasTaken
Copy link

Same for me. Jumping from 1.3.0 to 1.3.3 on Arch resolved this issue for me on PostgreSQL version 12.5. The Arch Linux murmur package is as close to upstream as it can get, no custom patches: https://github.com/archlinux/svntogit-community/tree/packages/mumble/trunk

@Krzmbrzl
Copy link
Member

Krzmbrzl commented Feb 1, 2021

Iirc there were no database related changes in 1.3.3 though. So this version fixing this issue is a bit odd 🤔

anything? I'm still stuck on 1.3.0

No. I simply did not find the time yet to work on this and afaik no one else has tried it either.

@Your-New-SJW-Waifu
Copy link

Your-New-SJW-Waifu commented Feb 1, 2021 via email

@JuniorJPDJ
Copy link
Contributor Author

I tried c:

mumble_1      | <W>2021-02-01 15:00:45.519 SSL: OpenSSL version is 'OpenSSL 1.1.1i  8 Dec 2020'                                                                                                                                             
mumble_1      | <W>2021-02-01 15:00:45.519 Initializing settings from /etc/mumble/config.ini (basepath /etc/mumble)                                                                                                                         
mumble_1      | <C>2021-02-01 15:00:45.520 MetaParams: Adding 1 intermediate certificates from certificate file.                                                                                                                            
mumble_1      | <W>2021-02-01 15:00:45.966 MetaParams: TLS cipher preference is "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM
-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"                                                                                        
mumble_1      | NOTICE:  relation "meta" already exists, skipping                                                                                                                                                                           
mumble_1      | <W>2021-02-01 15:00:45.993 Renaming old tables...                                                                                                                                                                           
mumble_1      | <W>2021-02-01 15:00:45.996 Generating new tables...                                                                                                                                                                         
mumble_1      | NOTICE:  index "slog_time" does not exist, skipping                                                                                                                                                                         
mumble_1      | NOTICE:  index "config_key" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "channel_info_id" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "players_name" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "players_id" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_channel" does not exist, skipping                                                                                                                                                                     
mumble_1      | NOTICE:  index "users_name" does not exist, skipping                                                                                                                                                                        
mumble_1      | NOTICE:  index "users_id" does not exist, skipping                                                                                                                                                                          
mumble_1      | NOTICE:  index "user_info_id" does not exist, skipping                                                                                                                                                                      
mumble_1      | NOTICE:  index "groups_name_channels" does not exist, skipping                                                                                                                                                              
mumble_1      | NOTICE:  index "group_members_users" does not exist, skipping                                                                                                                                                               
mumble_1      | NOTICE:  index "acl_channel_pri" does not exist, skipping                                                                                                                                                                   
mumble_1      | NOTICE:  index "acl_user" does not exist, skipping                                                                                                                                                                          
mumble_1      | <W>2021-02-01 15:00:46.444 Importing old data...                                                                                                                                                                            
mumble_1      | <F>2021-02-01 15:00:46.511 SQL Error [INSERT INTO "groups" ("group_id", "server_id", "name", "channel_id", "inherit", "inheritable") SELECT "group_id", "server_id", "name", "channel_id", "inherit", "inheritable" FROM "gr
oups_old_1612191645"]: ERROR:  insert or update on table "groups" violates foreign key constraint "groups_del_channel" 
mumble_1      | DETAIL:  Key (server_id, channel_id)=(1, 17) is not present in table "channels".
mumble_1      | (23503) QPSQL: Unable to create query

@JuniorJPDJ
Copy link
Contributor Author

JuniorJPDJ commented Mar 31, 2021

It probably can be closed.
Main problem was db scheme unexpected by murmur being effect of pgloader sqlite->pgsql migration.
I altered all tables to format similar to created by fresh murmur installation, then upgraded without bigger problems.
Anyway would be cool to see some migration (between dbs) system in mumble server. ATM migration is big pain.

@Krzmbrzl
Copy link
Member

Krzmbrzl commented Apr 1, 2021

Oh that's interesting. I didn't even know there was such a thing like a DB schema 👀

In terms of migration I could imagine that in the future (once the DB stuff has been rewritten) one coukd export/import the DB to/from JSON. That should allow for easy transitions 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug (error) in the software help wanted Good community contribution opportunities server
Projects
None yet
Development

No branches or pull requests

4 participants