Suddenly Stopped Being Able to Connect to Previously Working BookStack Instance #4370

Closed
opened 2026-02-05 08:41:58 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @petartzdravkov on GitHub (Dec 19, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

For a couple of days now I suddenly stopped being able to connect to my BookStack instance, although I haven't done any changes to the configuration. When I try to connect the connection times out after some time. So far I tried changing folder permissions with sudo chown -R www-data:www-data bootstrap/cache storage public/uploads however it didn't change the result. I don't have a laravel.log file. I will enter the contents of my apache and mysql error log files in the log content.

Exact BookStack Version

v23.10.4

Log Content

Apache

[Tue Dec 19 15:59:04.365419 2023] [mpm_prefork:notice] [pid 1257] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Dec 19 15:59:04.365437 2023] [core:notice] [pid 1257] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 19 16:08:04.528491 2023] [mpm_prefork:notice] [pid 1257] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Dec 19 16:08:04.581593 2023] [mpm_prefork:notice] [pid 11032] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Dec 19 16:08:04.581621 2023] [core:notice] [pid 11032] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 19 16:34:08.950399 2023] [mpm_prefork:notice] [pid 11032] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Dec 19 16:34:09.004674 2023] [mpm_prefork:notice] [pid 14240] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Dec 19 16:34:09.004703 2023] [core:notice] [pid 14240] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 19 16:38:52.630395 2023] [mpm_prefork:notice] [pid 14240] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Dec 19 16:39:16.631988 2023] [mpm_prefork:notice] [pid 1346] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Dec 19 16:39:16.632082 2023] [core:notice] [pid 1346] AH00094: Command line: '/usr/sbin/apache2'

Mysql:

2023-12-19T14:20:56.256846Z 12 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2023-12-19T14:33:58.457426Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.35-0ubuntu0.22.04.1).
2023-12-19T14:34:00.459785Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 12  user: 'bookstack'.
2023-12-19T14:34:01.789871Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-0ubuntu0.22.04.1)  (Ubuntu).
2023-12-19T14:34:02.087790Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-0ubuntu0.22.04.1) starting as process 14172
2023-12-19T14:34:02.100717Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-12-19T14:34:02.284903Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-12-19T14:34:02.491182Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-12-19T14:34:02.491218Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-12-19T14:34:02.512028Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.35-0ubuntu0.22.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2023-12-19T14:34:02.512037Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-12-19T14:34:38.274937Z 8 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2023-12-19T14:38:23.376864Z 9 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2023-12-19T14:38:52.615480Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.35-0ubuntu0.22.04.1).
2023-12-19T14:38:54.047567Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-0ubuntu0.22.04.1)  (Ubuntu).
2023-12-19T14:39:16.380561Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-0ubuntu0.22.04.1) starting as process 1248
2023-12-19T14:39:16.391708Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-12-19T14:39:16.594980Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-12-19T14:39:16.865565Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-12-19T14:39:16.865599Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-12-19T14:39:16.905824Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-12-19T14:39:16.905847Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.35-0ubuntu0.22.04.1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).

Hosting Environment

PHP 8.1.2 (at least that is what is says with php -v
Installed on Pop!_OS 22.04 LTS with installation script with excluded migration step. Restored from backup afterwards following the documentation.

I don't have almost any experience with this so sorry in advance if I am asking stupid questions or if I have missed something.

Originally created by @petartzdravkov on GitHub (Dec 19, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario For a couple of days now I suddenly stopped being able to connect to my BookStack instance, although I haven't done any changes to the configuration. When I try to connect the connection times out after some time. So far I tried changing folder permissions with `sudo chown -R www-data:www-data bootstrap/cache storage public/uploads` however it didn't change the result. I don't have a `laravel.log` file. I will enter the contents of my apache and mysql error log files in the log content. ### Exact BookStack Version v23.10.4 ### Log Content <details><summary>Apache</summary> <p> ``` [Tue Dec 19 15:59:04.365419 2023] [mpm_prefork:notice] [pid 1257] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Dec 19 15:59:04.365437 2023] [core:notice] [pid 1257] AH00094: Command line: '/usr/sbin/apache2' [Tue Dec 19 16:08:04.528491 2023] [mpm_prefork:notice] [pid 1257] AH00170: caught SIGWINCH, shutting down gracefully [Tue Dec 19 16:08:04.581593 2023] [mpm_prefork:notice] [pid 11032] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Dec 19 16:08:04.581621 2023] [core:notice] [pid 11032] AH00094: Command line: '/usr/sbin/apache2' [Tue Dec 19 16:34:08.950399 2023] [mpm_prefork:notice] [pid 11032] AH00170: caught SIGWINCH, shutting down gracefully [Tue Dec 19 16:34:09.004674 2023] [mpm_prefork:notice] [pid 14240] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Dec 19 16:34:09.004703 2023] [core:notice] [pid 14240] AH00094: Command line: '/usr/sbin/apache2' [Tue Dec 19 16:38:52.630395 2023] [mpm_prefork:notice] [pid 14240] AH00170: caught SIGWINCH, shutting down gracefully [Tue Dec 19 16:39:16.631988 2023] [mpm_prefork:notice] [pid 1346] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Dec 19 16:39:16.632082 2023] [core:notice] [pid 1346] AH00094: Command line: '/usr/sbin/apache2' ``` </p> </details> <details><summary>Mysql:</summary> <p> ``` 2023-12-19T14:20:56.256846Z 12 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2023-12-19T14:33:58.457426Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.35-0ubuntu0.22.04.1). 2023-12-19T14:34:00.459785Z 0 [Warning] [MY-010909] [Server] /usr/sbin/mysqld: Forcing close of thread 12 user: 'bookstack'. 2023-12-19T14:34:01.789871Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-0ubuntu0.22.04.1) (Ubuntu). 2023-12-19T14:34:02.087790Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-0ubuntu0.22.04.1) starting as process 14172 2023-12-19T14:34:02.100717Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-12-19T14:34:02.284903Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2023-12-19T14:34:02.491182Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2023-12-19T14:34:02.491218Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2023-12-19T14:34:02.512028Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.35-0ubuntu0.22.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu). 2023-12-19T14:34:02.512037Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2023-12-19T14:34:38.274937Z 8 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2023-12-19T14:38:23.376864Z 9 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2023-12-19T14:38:52.615480Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.35-0ubuntu0.22.04.1). 2023-12-19T14:38:54.047567Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.35-0ubuntu0.22.04.1) (Ubuntu). 2023-12-19T14:39:16.380561Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.35-0ubuntu0.22.04.1) starting as process 1248 2023-12-19T14:39:16.391708Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-12-19T14:39:16.594980Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2023-12-19T14:39:16.865565Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2023-12-19T14:39:16.865599Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2023-12-19T14:39:16.905824Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock 2023-12-19T14:39:16.905847Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.35-0ubuntu0.22.04.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu). ``` </p> </details> ### Hosting Environment PHP 8.1.2 (at least that is what is says with `php -v` Installed on Pop!_OS 22.04 LTS with installation script with excluded migration step. Restored from backup afterwards following the documentation. I don't have almost any experience with this so sorry in advance if I am asking stupid questions or if I have missed something.
OVERLORD added the 🐕 Support label 2026-02-05 08:41:58 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 19, 2023):

Hi @petartzdravkov,

Based upon what you detail, this sounds like it could be a networking/DNS/connection issue, since those can commonly appear as timeouts where as app/web-server level issues generally would quickly show an error.

To validate this, you could watch your apache access logs via:

sudo tail -f /var/log/apache2/access.log

Then attempt to access the site. If you see lots of lines added when accessing, that means you are connecting. If no lines appear, it's likely the requests are not reaching apache at all.
(Press q to exit the above command once done).

If no lines appear, let me know what access to the instance looks like. For example:

  • Are you using an IP address in the URL?
  • Are you using a domain name?
  • Are you accessing via a browser on the same machine as the webserver?
  • Do you have other web-based things running on this system?
  • Where is the system relative to where you're accessing it from? Same local network? Across the internet?
@ssddanbrown commented on GitHub (Dec 19, 2023): Hi @petartzdravkov, Based upon what you detail, this sounds like it could be a networking/DNS/connection issue, since those can commonly appear as timeouts where as app/web-server level issues generally would quickly show an error. To validate this, you could watch your apache access logs via: ``` sudo tail -f /var/log/apache2/access.log ``` Then attempt to access the site. If you see lots of lines added when accessing, that means you are connecting. If no lines appear, it's likely the requests are not reaching apache at all. (Press `q` to exit the above command once done). If no lines appear, let me know what access to the instance looks like. For example: - Are you using an IP address in the URL? - Are you using a domain name? - Are you accessing via a browser on the same machine as the webserver? - Do you have other web-based things running on this system? - Where is the system relative to where you're accessing it from? Same local network? Across the internet?
Author
Owner

@petartzdravkov commented on GitHub (Dec 21, 2023):

Hi @ssddanbrown,

Thanks for the quick response, I appreciate it! :)

Aha, thanks for the explanation - it seems like no lines appear.

  • I am using an IP address in the URL (so no domain name).
  • I am accessing via a browser on the same machine as the webserver - everything is located on my laptop.
  • I do not have any other web-based things running on this system.
  • Both the system's location and where I am accessing it from are my laptop on the same local network.

I appreciate the help! Let me know if you need any further info.

Cheers,
Petar

@petartzdravkov commented on GitHub (Dec 21, 2023): Hi @ssddanbrown, Thanks for the quick response, I appreciate it! :) Aha, thanks for the explanation - it seems like no lines appear. - I am using an IP address in the URL (so no domain name). - I am accessing via a browser on the same machine as the webserver - everything is located on my laptop. - I do not have any other web-based things running on this system. - Both the system's location and where I am accessing it from are my laptop on the same local network. I appreciate the help! Let me know if you need any further info. Cheers, Petar
Author
Owner

@ssddanbrown commented on GitHub (Dec 23, 2023):

Okay, so via IP and on same machine.
So are you using a local IP address? What does that IP look like?

I'm wondering if you used a LAN IP address on setup, which has now changed since that point in time.

@ssddanbrown commented on GitHub (Dec 23, 2023): Okay, so via IP and on same machine. So are you using a local IP address? What does that IP look like? I'm wondering if you used a LAN IP address on setup, which has now changed since that point in time.
Author
Owner

@petartzdravkov commented on GitHub (Dec 25, 2023):

Hmm, not sure what type of IP address I am using. 192.168.178.17 is the one that was suggested when doing the initial setup so I went with it. From what I found 192.168.x.x addresses are LAN ones and can change when connecting to different routers for example?

If that is the case, I would appreciate any tips on how to work around that. Is there a stable id I could use for this scenario? And how do I proceed with its implementation? Change it in the .env file and update the database with the new URL?

I appreciate all the help! :)

@petartzdravkov commented on GitHub (Dec 25, 2023): Hmm, not sure what type of IP address I am using. 192.168.178.17 is the one that was suggested when doing the initial setup so I went with it. From what I found 192.168.x.x addresses are LAN ones and can change when connecting to different routers for example? If that is the case, I would appreciate any tips on how to work around that. Is there a stable id I could use for this scenario? And how do I proceed with its implementation? Change it in the .env file and update the database with the new URL? I appreciate all the help! :)
Author
Owner

@ssddanbrown commented on GitHub (Dec 26, 2023):

Yeah, 192.168.178.17 is a local address (although on a not-so-common subnet) so this might have changed unless a static IP (or the wrong IP could have been picked up and suggested during that install).

You could use a local address instead if you're only accessing from this one local machine. Most systems have localhost pointing back to itself.
You'd need to edit the /var/www/bookstack/.env file to update APP_URL to be http://localhost.
Also, within the /etc/apache2/sites-available/bookstack.conf you'd need yo update the ServerName value to be localhost, then restart apache after updating (sudo systemctl restart apache2).
If you have existing content, you'd also want to run the "Update System URL" command to update content in the database.

@ssddanbrown commented on GitHub (Dec 26, 2023): Yeah, 192.168.178.17 is a local address (although on a not-so-common subnet) so this might have changed unless a static IP (or the wrong IP could have been picked up and suggested during that install). You could use a local address instead if you're only accessing from this one local machine. Most systems have `localhost` pointing back to itself. You'd need to edit the `/var/www/bookstack/.env` file to update `APP_URL` to be `http://localhost`. Also, within the `/etc/apache2/sites-available/bookstack.conf` you'd need yo update the `ServerName` value to be `localhost`, then restart apache after updating (`sudo systemctl restart apache2`). If you have existing content, you'd also want to run the ["Update System URL" command](https://www.bookstackapp.com/docs/admin/commands/#update-system-url) to update content in the database.
Author
Owner

@petartzdravkov commented on GitHub (Dec 29, 2023):

Aaah, I get it, thanks so much! I appreciate the explanations, it is all working now! Cheers! :)

@petartzdravkov commented on GitHub (Dec 29, 2023): Aaah, I get it, thanks so much! I appreciate the explanations, it is all working now! Cheers! :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4370