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

APP Key error on docker compose up #235

Closed
1 task done
rocioferreiro opened this issue Oct 15, 2024 · 3 comments
Closed
1 task done

APP Key error on docker compose up #235

rocioferreiro opened this issue Oct 15, 2024 · 3 comments

Comments

@rocioferreiro
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi! Y started using BookStack last week and every thing has been going great! thanks.

However, I tried to run the same docker compose today and got the following error:
An application key is missing, halting init!

I tried creating it as it is recommended and then got the following error:

Access denied for user 'database_username'@'172.18.0.2' (using password: YES) (Connection: mysql, SQL: select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'bookstack' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)
app-1 |
app-1 | at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
app-1 | 825▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
app-1 | 826▕ );
app-1 | 827▕ }
app-1 | 828▕
app-1 | ➜ 829▕ throw new QueryException(
app-1 | 830▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
app-1 | 831▕ );
app-1 | 832▕ }
app-1 | 833▕ }
app-1 |
app-1 | +36 vendor frames
app-1 |

Expected Behavior

Docker compose up should start without errors

Steps To Reproduce

services:
db:
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: bookstack
MYSQL_DATABASE: bookstack
MYSQL_USER: bookstack
MYSQL_PASSWORD: bookstack
volumes:
- db_data:/var/lib/mysql

app:
image: linuxserver/bookstack
restart: always
ports:
- '6875:80'
environment:
DB_HOST: db
DB_USER: bookstack
DB_PASS: bookstack
DB_DATABASE: bookstack
APP_URL: http://localhost:6875
volumes:
- bookstack_data:/var/www/BookStack/public/uploads

volumes:
db_data:
bookstack_data:

Environment

- OS: ubuntu
- How docker service was installed: Install using the apt repository instructions in docker docs

CPU architecture

x86-64

Docker creation

dokcer compose up

Container logs

✔ Container docs-app-1  Recreated                                                                                                                                                     0.3s 
 ✔ Container docs-db-1   Created                                                                                                                                                       0.0s 
Attaching to app-1, db-1
db-1   | 2024-10-15 18:28:59+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.5.2+maria~ubu2404 started.
app-1  | [migrations] started
app-1  | [migrations] 01-nginx-site-confs-default: skipped
app-1  | [migrations] 02-default-location: skipped
app-1  | [migrations] done
app-1  | usermod: no changes
app-1  | ───────────────────────────────────────
app-1  | 
app-1  |       ██╗     ███████╗██╗ ██████╗
app-1  |       ██║     ██╔════╝██║██╔═══██╗
app-1  |       ██║     ███████╗██║██║   ██║
app-1  |       ██║     ╚════██║██║██║   ██║
app-1  |       ███████╗███████║██║╚██████╔╝
app-1  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
app-1  | 
app-1  |    Brought to you by linuxserver.io
app-1  | ───────────────────────────────────────
app-1  | 
app-1  | To support LSIO projects visit:
app-1  | https://www.linuxserver.io/donate/
app-1  | 
app-1  | ───────────────────────────────────────
app-1  | GID/UID
app-1  | ───────────────────────────────────────
app-1  | 
app-1  | User UID:    911
app-1  | User GID:    911
app-1  | ───────────────────────────────────────
db-1   | 2024-10-15 18:28:59+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup///memory.pressure not writable, functionality unavailable to MariaDB
app-1  | Linuxserver.io version: v24.10-ls168
app-1  | Build-date: 2024-10-14T08:13:36+00:00
app-1  | ───────────────────────────────────────
app-1  |     
db-1   | 2024-10-15 18:28:59+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db-1   | 2024-10-15 18:28:59+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.5.2+maria~ubu2404 started.
app-1  | using keys found in /config/keys
app-1  | Waiting for DB to be available
db-1   | 2024-10-15 18:28:59+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
db-1   | 2024-10-15 18:28:59 0 [Note] Starting MariaDB 11.5.2-MariaDB-ubu2404 source revision ea75a0b6009b0251e83193cd38c3974e36b65e06 server_uid zzaGlFJj5zfmotX9uozp4Xgs9EI= as process 1
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Compressed tables use zlib 1.3
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Number of transaction pools: 1
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
db-1   | 2024-10-15 18:28:59 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
db-1   | 2024-10-15 18:28:59 0 [Warning] mariadbd: io_uring_queue_init() failed with errno 95
db-1   | 2024-10-15 18:28:59 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Completed initialization of buffer pool
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: End of log at LSN=47747
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Opened 3 undo tablespaces
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: 128 rollback segments in 3 undo tablespaces are active.
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: log sequence number 47747; transaction id 14
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db-1   | 2024-10-15 18:28:59 0 [Note] Plugin 'FEEDBACK' is disabled.
db-1   | 2024-10-15 18:28:59 0 [Note] Plugin 'wsrep-provider' is disabled.
db-1   | 2024-10-15 18:28:59 0 [Note] InnoDB: Buffer pool(s) load completed at 241015 18:28:59
db-1   | 2024-10-15 18:29:05 0 [Note] Server socket created on IP: '0.0.0.0'.
db-1   | 2024-10-15 18:29:05 0 [Note] Server socket created on IP: '::'.
db-1   | 2024-10-15 18:29:05 0 [Note] mariadbd: Event Scheduler: Loaded 0 events
db-1   | 2024-10-15 18:29:05 0 [Note] mariadbd: ready for connections.
db-1   | Version: '11.5.2-MariaDB-ubu2404'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
db-1   | 2024-10-15 18:29:06 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.2' (This connection closed normally without authentication)
db-1   | 2024-10-15 18:29:12 4 [Warning] Access denied for user 'database_username'@'172.18.0.2' (using password: YES)
app-1  | 
app-1  |    Illuminate\Database\QueryException 
app-1  | 
app-1  |   SQLSTATE[HY000] [1045] Access denied for user 'database_username'@'172.18.0.2' (using password: YES) (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'bookstack' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)
app-1  | 
app-1  |   at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
app-1  |     825▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e
app-1  |     826▕                 );
app-1  |     827▕             }
app-1  |     828▕ 
app-1  |   ➜ 829▕             throw new QueryException(
app-1  |     830▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
app-1  |     831▕             );
app-1  |     832▕         }
app-1  |     833▕     }
app-1  | 
app-1  |       +36 vendor frames 
app-1  | 
app-1  |   37  /app/www/artisan:35
app-1  |       Illuminate\Foundation\Console\Kernel::handle()
app-1  | 
app-1  | [custom-init] No custom files found, skipping...
app-1  | [ls.io-init] done.
^CGracefully stopping... (press Ctrl+C again to force)
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@thespad
Copy link
Member

thespad commented Oct 15, 2024

You are, for some reason, only mounting /var/www/BookStack/public/uploads and not /config as the readme suggests. As a result you've fallen into an unexpected edge case where you have an existing install, but no existing .env file with your database details.

You'll need to change DB_USER and DB_PASS to DB_USERNAME and DB_PASSWORD and I would strongly suggest mounting the correct path to your host as well.

@rocioferreiro
Copy link
Author

Hey! Thanks for the quick response! I can see there have been many changes since the release yesterday. I had to delete and start over and is now working fine. Thanks!

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants