0
Under review

Filerun auto logout silently while scrolling through photos

Rudhra 2 weeks ago updated by Vlad R 2 weeks ago 11

Open a folder with 500-600 photos.

Set view mode to photos.

Scroll through the nice thumbnail overview and notice at some point the thumbnails stop loading and a notification on the bottom is shown " you are no longer logged in". This happens constantly now, making it impossible to make my way through folders with lots of photos. I haven't even reached the bottom of page 1 of a folder yet.

I did not change my configuration, did not do a reinstall (using docker). I don't know why I never had this issue before. 

I was waiting for the new update before using Filerun this much but now I can't wait. This issue combined with the webdav issues are really blocking me in going through my personal photos. 

Activity log shows nothing interesting but SQL error log does: 

Log: https://pastebin.com/uzKSgaJn


The permission denied error makes no sense, because the user in my docker compose is also full owner of all data of all user folders, including hidden filerun folders like .filerun.trash and .filerun.thumbnails.

Under review

The MySQL database might be corrupt. I would recommend running "REPAIR TABLE df_users_sessions" on the MySQL database. Let me know if you need more details on how to do that with a Docker-based FileRun install.

Thanks soo much for your quick reply!
I am not sure why I still get permission denied, using the username and password in my docker-compose for the filerun-db service:

$ docker exec -it filerun-db "bash"
root@74e1299ebd0a:/# mysql -u DBUSERNAME -pDBPASSWORD
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 82758
Server version: 10.1.48-MariaDB-1~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use filerundb;
Database changed
MariaDB [filerundb]> show tables;
ERROR 1018 (HY000): Can't read dir of './filerundb/' (errno: 13 "Permission denied")
MariaDB [filerundb]> REPAIR TABLE df_users_sessions;
+-----------------------------+--------+----------+----------------------------------------------------------------+
| Table                       | Op     | Msg_type | Msg_text                                                       |
+-----------------------------+--------+----------+----------------------------------------------------------------+
| filerundb.df_users_sessions | repair | error    | Can't create new tempfile: './filerundb/df_users_sessions.TMD' |
| filerundb.df_users_sessions | repair | status   | Operation failed                                               |
+-----------------------------+--------+----------+----------------------------------------------------------------+
2 rows in set (0.01 sec)

MariaDB [filerundb]>

The relevant section in my compose: 

  filerun-db:
    container_name: filerun-db
    image: mariadb:10.1
    restart: always
    networks:
      - filerun
    environment:
      MYSQL_ROOT_PASSWORD: DBPASSWORD
      MYSQL_USER: DBUSERNAME
      MYSQL_PASSWORD: DBPASSWORD
      MYSQL_DATABASE: filerundb
    volumes:
      - $DOCKERDIR/filerun/db:/var/lib/mysql

I see a "filerundb" and a "filerun/db". Perhaps a path is wrong somewhere.

I would also check for available disk space.

I found this in the logfile: 

2023-01-07 12:47:44 139796245661440 [Warning] Checking table:   './filerundb/df_users_sessions'

2023-01-07 12:47:44 139796245661440 [ERROR] mysqld: Table './filerundb/df_users' is marked as crashed and should be repaired

So indeed, this needs to be repaired!

Also: 

filerundb = name of the SQL database

filerun/db = the path of the mapped volume ($DOCKERDIR/filerun/db:/var/lib/mysql) 

I also see the files in the expected location: 

root@74e1299ebd0a:/var/lib/mysql/filerundb# find -name "df_users_sessions*"
./df_users_sessions.frm
./df_users_sessions.MYI
./df_users_sessions.MYD

So all is fine. I do not understand why it says permission denied. The files are owned by the same user that runs docker commands, same user configured for filerun service etc.

78% free space on the drive (59GB used of 512GB).

EDIT: 
/filerun/db/mysql has octal permission 700

files inside it have octal permission 660.

I will just change everything to 755 see what happens.

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| filerundb          |
| information_schema |
+--------------------+
2 rows in set (0.00 sec)


But I cannot even SHOW TABLES; I always get permission denied. Makes no sense, because I can login fine using the user/pw in my Docker Compose: 


root@74e1299ebd0a:/# mysql -u DBUSERNAME -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 82972
Server version: 10.1.48-MariaDB-1~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use filerundb;
Database changed
MariaDB [filerundb]> SHOW TABLES;
ERROR 1018 (HY000): Can't read dir of './filerundb/' (errno: 13 "Permission denied")

I don't understand why I keep getting permission denied. 

Try:

mysqlcheck -u root -p --auto-repair --check --all-databases

The output was again permission denied at and then OK for a lot of files.

If I deliberately entered wrong password, the error message was different.

I rebooted the docker service of filerun-db and  while service was running, log only showed errors and "aborts" . I have daily/weekly/monthly backups going back 6 months but decided its easier to simply delete $DOCKERDIR/filerun/ contents, starting fresh. Instead of restoring and hoping I found one version without any corruption. I believe this corruption existed a while. Only now exposed itself.

Will start fresh and hopefully all works well. 

Starting fresh, with containers and non-persistent volumes removed via Portainer, contents of $DOCKERDIR/filerun/ emptied, then running docker-compose up -d, Filerun is stuck on "Setting up database" for over 12min.

The log shows: 

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Compressed tables use zlib 1.2.11

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Using Linux native AIO

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Using SSE crc32 instructions

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Initializing buffer pool, size = 256.0M

2023-03-14 13:18:25 139872890062848 [Note] InnoDB: Completed initialization of buffer pool

2023-03-14 13:18:26 139872890062848 [Note] InnoDB: Highest supported file format is Barracuda.

2023-03-14 13:18:26 139872890062848 [Note] InnoDB: 128 rollback segment(s) are active.

2023-03-14 13:18:26 139872890062848 [Note] InnoDB: Waiting for purge to start

2023-03-14 13:18:26 139872890062848 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 1616703

2023-03-14 13:18:26 139871930808064 [Note] InnoDB: Dumping buffer pool(s) not yet started

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !

To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'

'/usr/bin/mysqladmin' -u root -h  password 'new-password'

Alternatively you can run:

'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

See the MariaDB Knowledgebase at <a href="http://mariadb.com/kb" class="redactor-autoparser-object">http://mariadb.com/kb</a> or the

MySQL manual for more instructions.

Please report any problems at <a href="http://mariadb.org/jira" class="redactor-autoparser-object">http://mariadb.org/jira</a>

The latest information about MariaDB is available at http://mariadb.org/.

You can find additional information about the MySQL part at:

<a href="http://dev.mysql.com" class="redactor-autoparser-object">http://dev.mysql.com</a>

Consider joining MariaDB's strong and vibrant community:

<a href="https://mariadb.org/get-involved/" class="redactor-autoparser-object">https://mariadb.org/get-involved/</a>

2023-03-14 13:18:28+00:00 [Note] [Entrypoint]: Database files initialized

2023-03-14 13:18:28+00:00 [Note] [Entrypoint]: Starting temporary server

2023-03-14 13:18:28+00:00 [Note] [Entrypoint]: Waiting for server startup

2023-03-14 13:18:28 140082098092032 [Note] mysqld (mysqld 10.1.48-MariaDB-1~bionic) starting as process 169 ...

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Using mutexes to ref count buffer pool pages

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: The InnoDB memory heap is disabled

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Compressed tables use zlib 1.2.11

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Using Linux native AIO

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Using SSE crc32 instructions

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Initializing buffer pool, size = 256.0M

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Completed initialization of buffer pool

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Highest supported file format is Barracuda.

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: 128 rollback segment(s) are active.

2023-03-14 13:18:29 140082098092032 [Note] InnoDB: Waiting for purge to start

2023-03-14 13:18:29 140082098092032 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 1616713

2023-03-14 13:18:29 140082098092032 [Note] Plugin 'FEEDBACK' is disabled.

2023-03-14 13:18:29 140081142691584 [Note] InnoDB: Dumping buffer pool(s) not yet started

2023-03-14 13:18:29 140082098092032 [Warning] 'user' entry 'root@b39d7bc78527' ignored in --skip-name-resolve mode.

2023-03-14 13:18:29 140082098092032 [Warning] 'proxies_priv' entry '@% root@b39d7bc78527' ignored in --skip-name-resolve mode.

2023-03-14 13:18:29 140082098092032 [Note] mysqld: ready for connections.

Version: '10.1.48-MariaDB-1~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution

2023-03-14 13:18:29+00:00 [Note] [Entrypoint]: Temporary server started.

Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.

2023-03-14 13:18:31 140082097243904 [Warning] 'proxies_priv' entry '@% root@b39d7bc78527' ignored in --skip-name-resolve mode.

2023-03-14 13:18:31+00:00 [Note] [Entrypoint]: Creating database filerun-db

2023-03-14 13:18:31+00:00 [Note] [Entrypoint]: Creating user asterix

2023-03-14 13:18:31+00:00 [Note] [Entrypoint]: Giving user asterix access to schema filerun-db

2023-03-14 13:18:31+00:00 [Note] [Entrypoint]: Stopping temporary server

2023-03-14 13:18:31 140082096936704 [Note] mysqld: Normal shutdown

2023-03-14 13:18:31 140082096936704 [Note] Event Scheduler: Purging the queue. 0 events

2023-03-14 13:18:31 140081201391360 [Note] InnoDB: FTS optimize thread exiting.

2023-03-14 13:18:31 140082096936704 [Note] InnoDB: Starting shutdown...

2023-03-14 13:18:32 140082096936704 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool

2023-03-14 13:18:33 140082096936704 [Note] InnoDB: Shutdown completed; log sequence number 1616723

2023-03-14 13:18:33 140082096936704 [Note] mysqld: Shutdown complete

2023-03-14 13:18:34+00:00 [Note] [Entrypoint]: Temporary server stopped

2023-03-14 13:18:34+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2023-03-14 13:18:34 140046143305728 [Note] mysqld (mysqld 10.1.48-MariaDB-1~bionic) starting as process 1 ...

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Using mutexes to ref count buffer pool pages

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: The InnoDB memory heap is disabled

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Compressed tables use zlib 1.2.11

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Using Linux native AIO

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Using SSE crc32 instructions

2023-03-14 13:18:34 140046143305728 [Note] InnoDB: Initializing buffer pool, size = 256.0M

2023-03-14 13:18:35 140046143305728 [Note] InnoDB: Completed initialization of buffer pool

2023-03-14 13:18:35 140046143305728 [Note] InnoDB: Highest supported file format is Barracuda.

2023-03-14 13:18:35 140046143305728 [Note] InnoDB: 128 rollback segment(s) are active.

2023-03-14 13:18:35 140046143305728 [Note] InnoDB: Waiting for purge to start

2023-03-14 13:18:35 140046143305728 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.49-89.0 started; log sequence number 1616723

2023-03-14 13:18:35 140046143305728 [Note] Plugin 'FEEDBACK' is disabled.

2023-03-14 13:18:35 140045184923392 [Note] InnoDB: Dumping buffer pool(s) not yet started

2023-03-14 13:18:35 140046143305728 [Note] Server socket created on IP: '::'.

2023-03-14 13:18:35 140046143305728 [Warning] 'proxies_priv' entry '@% root@b39d7bc78527' ignored in --skip-name-resolve mode.

2023-03-14 13:18:35 140046143305728 [Note] mysqld: ready for connections.

Version: '10.1.48-MariaDB-1~bionic'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

When I refresh the page, the install wizard just starts over. After the first screen > empty white screen > database setup screen > Setting up database... (forever).

I guess I always had a database for the past few years so I never had this issue before.. 

I had changed my subdomain for filerun in my Compose file from FILES.mydomain.cloud to DRIVE.mydomain.cloud.

Switching it back to FILES subdomain solved it. A little strange, because registering my existing license happens later..

I will take this opportunity to also generate higher quality thumbnails and previews. In the past I always had PNG Quant enabled, but I believe that focuses on smallest filesize, not quality? Better quality with pngquant disabled (since this is default, even though the library is included in the docker image)?

Same quality with PNG Quant, just lower size.

Again thanks for the quick replies, really appreciated. I did a comparison:

copied a folder of photos to another user, so both users have their own copy of this folder of photos.

Then I kept pngquant disabled (= default), and used command line to generate thumbs for the first user. Enabled pngquant and ran the command for the second user.

The difference is really big, quite noticeable. Quality with pngquant disabled is much, much better. The same as on my phone for example: high quality thumbs.

With pngquant disabled its like looking at an older bitmap, or a photo saved with less colors or something.

Perhaps this has to do with pngquant quality settings, I understand it is possible to configure a quality range. 


At least the default setting (disabled) is definitely the best for now.

My bad, I checked now, the program is ran with "--quality=65-80".