Focalboard Docker - database is locked

For troubleshooting questions, please post in the following format:

Summary
Focalboard (Docker container on Synology NAS) refreshes and errors constantly.

Steps to reproduce
How can we reproduce the issue (what version are you using?)
Installed v7.5.2 via terminal and ssh, and again via Task Scheduler running command via web gui.

16:12:07

Expected behavior
Focalboard runs without errors

Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.
web interface shows “Sorry, something went wrong. Not a valid Team”, Logs report error [2022-12-14 22:12:07.524 Z] unable to get the session for the token: database is locked caller="api/api.go:181" stdout

Hi jborn and welcome to the Mattermost forums!

Can you please share the installation instructions you used? The focalbard database in the docker deployments usually is included in the container itself and needs to go outside if the files in the container are put to read only mode.

Hi @jborn ,

just trying to follow up here - were you able to resolve your issue?

Hi there, i have the same issue. I can access the GUI however doing any action on the screen causes the screen to refresh and this error to paste into the console;

debug [2023-01-31 13:55:49.962 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:55:49.968 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:50.699 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:51.048 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:51.384 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:55:51.389 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:51.762 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:52.612 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:52.896 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:52.905 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:53.226 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:53.559 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:55:53.565 Z] attachSession                            caller="api/auth.go:333" single_user=false
error [2023-01-31 13:55:53.679 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
error [2023-01-31 13:55:53.680 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
error [2023-01-31 13:55:53.680 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
error [2023-01-31 13:55:53.680 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
debug [2023-01-31 13:55:53.684 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:53.684 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:53.684 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:53.684 Z] attachSession                            caller="api/auth.go:333" single_user=false
error [2023-01-31 13:55:54.114 Z] Rejected unauthenticated message         caller="ws/server.go:201" client="192.168.0.22:65018" action=SUBSCRIBE_TEAM
error [2023-01-31 13:55:54.114 Z] ERROR WebSocket                          caller="ws/server.go:130" client="192.168.0.22:65018" error="read tcp 172.29.0.2:8000->192.168.0.22:65018: use of closed network connection"
debug [2023-01-31 13:55:54.114 Z] DISCONNECT WebSocket                     caller="ws/server.go:119" client="192.168.0.22:65018"
debug [2023-01-31 13:55:54.162 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:54.369 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:54.749 Z] GetBoards                                caller="api/boards.go:79" teamID=0 boardsCount=1
debug [2023-01-31 13:55:54.752 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:55.224 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:55.543 Z] GetBoards                                caller="api/boards.go:79" teamID=0 boardsCount=1
debug [2023-01-31 13:55:55.820 Z] GetBlocks                                caller="api/blocks.go:154" boardID=bpqd4nsey77d95m1i6tbohf8z9o parentID= blockType= blockID= block_count=35
debug [2023-01-31 13:55:55.889 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.603 Z] GetMembersForBoard                       caller="api/members.go:70" boardID=bpqd4nsey77d95m1i6tbohf8z9o membersCount=1
debug [2023-01-31 13:55:56.775 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.776 Z] Command: AUTH                            caller="ws/server.go:149" client="192.168.0.22:65019"
debug [2023-01-31 13:55:56.776 Z] authenticateListener                     caller="ws/server.go:436" token=kh3wnn5ofdid4tpbprd4ntszhza wsSession.userID=
debug [2023-01-31 13:55:56.782 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.782 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.788 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.789 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:56.789 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:57.486 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:57.801 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:55:57.806 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:58.176 Z] authenticateListener: Authenticated      caller="ws/server.go:459" userID=ugucmhomo3fyympnqjtymiep86y client="192.168.0.22:65019"
debug [2023-01-31 13:55:58.176 Z] Command: SUBSCRIBE_TEAM                  caller="ws/server.go:211" teamID=0 client="192.168.0.22:65019"
debug [2023-01-31 13:55:58.176 Z] Not single user mode                     caller="ws/server.go:226"
debug [2023-01-31 13:55:58.710 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:58.879 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:55:58.985 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:55:58.991 Z] attachSession                            caller="api/auth.go:333" single_user=false
error [2023-01-31 13:55:59.607 Z] access denied to board template          caller="api/api.go:181"
debug [2023-01-31 13:55:59.610 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:00.067 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:00.069 Z] Command: UNSUBSCRIBE_TEAM                caller="ws/server.go:235" teamID=0 client="192.168.0.22:65019"
debug [2023-01-31 13:56:00.069 Z] Command: SUBSCRIBE_TEAM                  caller="ws/server.go:211" teamID=0 client="192.168.0.22:65019"
debug [2023-01-31 13:56:00.069 Z] Not single user mode                     caller="ws/server.go:226"
debug [2023-01-31 13:56:00.414 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:00.697 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:00.894 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:56:00.900 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:00.988 Z] GetBlocks                                caller="api/blocks.go:154" boardID=bpqd4nsey77d95m1i6tbohf8z9o parentID= blockType= blockID= block_count=35
debug [2023-01-31 13:56:00.993 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.066 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.166 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.258 Z] GetMembersForBoard                       caller="api/members.go:70" boardID=bpqd4nsey77d95m1i6tbohf8z9o membersCount=1
debug [2023-01-31 13:56:01.261 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.420 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.499 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.646 Z] GetTemplates                             caller="api/templates.go:84" teamID=0 boardsCount=13
debug [2023-01-31 13:56:01.655 Z] attachSession                            caller="api/auth.go:333" single_user=false
error [2023-01-31 13:56:01.794 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
error [2023-01-31 13:56:01.796 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
error [2023-01-31 13:56:01.796 Z] unable to get the session for the token: database is locked caller="api/api.go:181"
debug [2023-01-31 13:56:01.800 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.800 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.801 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:01.950 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:02.816 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:02.887 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:03.114 Z] GetBlocks                                caller="api/blocks.go:154" boardID=bpqd4nsey77d95m1i6tbohf8z9o parentID= blockType= blockID= block_count=35
debug [2023-01-31 13:56:03.117 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:03.848 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:04.066 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:04.187 Z] GetMembersForBoard                       caller="api/members.go:70" boardID=bpqd4nsey77d95m1i6tbohf8z9o membersCount=1
debug [2023-01-31 13:56:04.190 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:04.546 Z] GetBlocks                                caller="api/blocks.go:154" boardID=bmj7iw675n3yu7pyudzq3kk1upc parentID= blockType= blockID= block_count=35
debug [2023-01-31 13:56:04.549 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:04.683 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:04.937 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:05.419 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:06.216 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:06.372 Z] GetBoards                                caller="api/boards.go:79" teamID=0 boardsCount=1
debug [2023-01-31 13:56:06.375 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:06.608 Z] GetBoards                                caller="api/boards.go:79" teamID=0 boardsCount=1
debug [2023-01-31 13:56:06.611 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:06.782 Z] GetBoards                                caller="api/boards.go:79" teamID=0 boardsCount=1
debug [2023-01-31 13:56:06.903 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:07.384 Z] attachSession                            caller="api/auth.go:333" single_user=false
debug [2023-01-31 13:56:07.752 Z] attachSession                            caller="api/auth.go:333" single_user=false

this is my yaml

version: '3.3'
services:
    focalboard:
        image: mattermost/focalboard
        ports:
            - 8092:8000
        volumes:
          - /docker/focalboard/fbdata:/opt/focalboard/data
        restart: always

Hi @thegreenwheel and welcome to the Mattermost forums!

I’m unfortunately unable to reproduce this issue here on my end. Do you see a focalboard.db file in your local directory /docker/focalboard/fbdata or is this directory empty?