[BUG] Fresh install, "Error occured" Docker windows
nulledone opened this issue · 7 comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I'm on a fresh install, tried with different compose ymls from solidnerd and lsrc. Always same result. At my first try I've encountered Error 500 on localhost:6875, however I've even tried with my custom domain still same issue. Searching through web yielded unhelpful results that did not aid my issue.
Error on the page is:
An Error Occurred
An unknown error occurred
Expected Behavior
No response
Steps To Reproduce
- compose up -d with yml
Environment
- OS:Windows
- How docker service was installed: WSL2CPU architecture
x86-64
Docker creation
YML, exactly as following:
services:
bookstack:
image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- APP_URL=http://localhost:6875
- APP_KEY= **REMOVED**
- DB_HOST=db
- DB_PORT=3306
- DB_USERNAME=bookstackuser
- DB_PASSWORD=yourpassword
- DB_DATABASE=bookstack
- QUEUE_CONNECTION= #optional
volumes:
- ./bs_config:/config
ports:
- 6875:80
restart: unless-stopped
db:
image: mariadb:latest
container_name: bookstack_db
environment:
MYSQL_ROOT_PASSWORD: yourpassword
MYSQL_DATABASE: bookstack
MYSQL_USER: bookstackuser
MYSQL_PASSWORD: yourpassword
volumes:
- ./db_data:/var/lib/mysql
restart: unless-stopped
volumes:
db_data:Container logs
bootstack log on first setup:
2024-12-31 16:08:57 2023_01_24_104625_refactor_joint_permissions_storage .............. 3ms FAIL
2024-12-31 16:08:57
2024-12-31 16:08:57 Illuminate\Database\QueryException
2024-12-31 16:08:57
2024-12-31 16:08:57 SQLSTATE[HY000]: General error: 1030 Got error 194 "Tablespace is missing for a table" from storage engine InnoDB (Connection: mysql, SQL: truncate table `joint_permissions`)
2024-12-31 16:08:57
2024-12-31 16:08:57 at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
2024-12-31 16:08:57 825▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
2024-12-31 16:08:57 826▕ );
2024-12-31 16:08:57 827▕ }
2024-12-31 16:08:57 828▕
2024-12-31 16:08:57 ➜ 829▕ throw new QueryException(
2024-12-31 16:08:57 830▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
2024-12-31 16:08:57 831▕ );
2024-12-31 16:08:57 832▕ }
2024-12-31 16:08:57 833▕ }
2024-12-31 16:08:57
2024-12-31 16:08:57 +6 vendor frames
2024-12-31 16:08:57
2024-12-31 16:08:57 7 /app/www/database/migrations/2023_01_24_104625_refactor_joint_permissions_storage.php:18
2024-12-31 16:08:57 Illuminate\Database\Query\Builder::truncate()
2024-12-31 16:08:57 +24 vendor frames
2024-12-31 16:08:57
2024-12-31 16:08:57 32 /app/www/artisan:35
2024-12-31 16:08:57 Illuminate\Foundation\Console\Kernel::handle()
2024-12-31 16:08:57
db log:
2024-12-31 16:08:47 2024-12-31 13:08:47 0 [Note] mariadbd: ready for connections.
2024-12-31 16:08:47 Version: '11.6.2-MariaDB-ubu2404' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
2024-12-31 16:08:48 2024-12-31 13:08:48 3 [Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.21.0.3' (This connection closed normally without authentication)
2024-12-31 16:08:57 2024-12-31 13:08:57 4 [ERROR] InnoDB: Cannot rename './bookstack/joint_permissions.ibd' to './bookstack/#sql-ib69.ibd' because the source file does not exist.
2024-12-31 16:08:43 2024-12-31 13:08:43+00:00 [Note] [Entrypoint]: Temporary server stopped
2024-12-31 16:08:43
2024-12-31 16:08:43 2024-12-31 13:08:43+00:00 [Note] [Entrypoint]: MariaDB init process done. Ready for start up.Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
The issue here is using windows as a host, Assuming you're just using Docker Desktop, you should try install Ubuntu for WSL2 then installing docker-engine within that to see if you get the same issue.
I have just over 20 containers on Docker and none of them have such issue. I would rather have more viable solution than your suggestion.
There is a specific known issue with WSL and the SQL migrations. See #125 for examples.
In some cases it can be resolved by using internal WSL paths and not Windows-mounted ones, but it doesn't seem to be a silver bullet.
I would rather have more viable solution than your suggestion.
to be clear here, as stated in our support policy, we do not support docker desktop or docker on windows, but we will endeavor to assist. Our suggestion is use ubuntu on wsl2 and docker run or docker compose, ensuring you use internal wsl paths. We do not run or test docker on windows, we do not use docker desktop; we HAVE tested ubuntu on wsl2 using internal paths and have had success this way, though there are still known issues, as indicated by spad above with #125
It sucks to hear that support is limited for Docker Desktop, however I believe I've found another workaround. That may aid other people in future. As this issue is rather a WSL limitation than bookstack, I'm closing it.
I am a Docker Desktop junkie, I refuse to use or migrate to anything else.
- Used mysql:8.0.32 as database, since the workaround on #125 stated so.
- Had an issue with uploading images (error, check server writable) therefore mounted directories as volumes, yml below.
bookstack:
volumes:
- bookstackdata_1:/config
db:
volumes:
- bookstackdb:/var/lib/mysql
volumes:
bookstackdata_1:
driver: local
driver_opts:
type: none
device: A:\Bookstack\data
o: bind
bookstackdb:
driver: local
driver_opts:
type: none
device: A:\Bookstack\db
o: bind
MySQL 8.0 is EOL in a little over a year, I would not recommend setting up anything new using it.