mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-08 03:09:39 +03:00
Upgrading Ubuntu 18.04 to 20.04 or 22.04 #3413
Closed
opened 2026-02-05 06:38:17 +03:00 by OVERLORD
·
12 comments
No Branch/Tag Specified
development
further_theme_development
l10n_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
pull-request
Mirrored from GitHub Pull Request
No Label
🐕 Support
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#3413
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @infotts-py on GitHub (Dec 26, 2022).
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
When upgrading from Ubuntu 18.04 to 20.04 or 22.04 Bookstack is unresponsive after. I have no issues upgrading Ubuntu on other VM's. Upgraded Bookstack to 22.11.1 and all updates to Ubuntu 18.04 have been done prior to the major release upgrade.
Has anybody done this on a VM running Bookstack ? What should I look for to troubleshoot this issue after upgrading?
I have reverted back to a previous checkpoint at 18.04 and everything works.
Exact BookStack Version
22.11.1
Log Content
No response
PHP Version
8.0.26
Hosting Environment
Ubuntu 20.04
@ssddanbrown commented on GitHub (Dec 26, 2022):
This should be doable (Something I've commonly done) but sometimes things need to be tweaked for new versions of packages.
Your webserver log would be a good start, it should show any errors assuming your webserver is running okay. Assuming apache is in use this is commonly found at
/var/log/apache2/error.log.My guess would be the issue is related to PHP package versions, and their usage with apache.
Sometimes you need to disable the old version of PHP then enable the new php in apache. For example, if going from PHP7.4 to 8.0:
The above is just a guess though.
@infotts-py commented on GitHub (Dec 27, 2022):
PHP 7.2 is disabled and PHP 8.0.26 installed and enabled.. Repeated this after Ubuntu release upgrade again this morning. Composer is also at the latest version.
This all I've got in the apache error log :
[Tue Dec 27 09:41:06.493268 2022] [mpm_prefork:notice] [pid 798] AH00169: caught SIGTERM, shutting down
[Tue Dec 27 09:41:06.560102 2022] [mpm_prefork:notice] [pid 23811] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Tue Dec 27 09:41:06.560145 2022] [core:notice] [pid 23811] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 27 09:41:38.354701 2022] [mpm_prefork:notice] [pid 23811] AH00171: Graceful restart requested, doing restart
[Tue Dec 27 09:41:38.378713 2022] [mpm_prefork:notice] [pid 23811] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Tue Dec 27 09:41:38.378723 2022] [core:notice] [pid 23811] AH00094: Command line: '/usr/sbin/apache2'
[Tue Dec 27 09:46:25.176330 2022] [mpm_prefork:notice] [pid 23811] AH00169: caught SIGTERM, shutting down
[Tue Dec 27 09:46:39.258250 2022] [mpm_prefork:notice] [pid 783] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Tue Dec 27 09:46:39.270320 2022] [core:notice] [pid 783] AH00094: Command line: '/usr/sbin/apache2'
I don't know where to go from here. Any ideas ?
@ssddanbrown commented on GitHub (Dec 28, 2022):
sudo systemctl status apache2.service).systemctl status mysql.service)./var/log/apache2/error.logfile do you see new entries appear when accessing the instance via the browser?/var/log/apache2/directory?storage/logs/laravel.logfile within BookStack folder).@infotts-py commented on GitHub (Dec 29, 2022):
Are you sure you were using apache before and not nginx (Or another webserver)? Yes
Is apache staying up/alive (sudo systemctl status apache2.service). active (running)
Is MySQL staying up/alive (systemctl status mysql.service).
I tried :
If you watch the /var/log/apache2/error.log file do you see new entries appear when accessing the instance via the browser? No
Are there other error log files in the /var/log/apache2/ directory? yes but all empty
What exactly are you actually seeing in the browser? HTTP Error 500
Are you seeing anything in the bookstack error log on attempted access (storage/logs/laravel.log file within BookStack folder). :
So it seems to be an issue with mysql not starting yet I can't fix it. I've tried a ton of solutions found on internet, none of them worked for me. Any idea where to go from here ?
@ssddanbrown commented on GitHub (Dec 29, 2022):
Ideally you'd need to identify exactly what is wrong with MySQL.
Check the MySQL error log for details (commonly at
/var/log/mysql/error.log).@infotts-py commented on GitHub (Dec 29, 2022):
Yes, I looked at that log and it's empty.
@ssddanbrown commented on GitHub (Dec 29, 2022):
Are there other log files in that folder with content?
What's the output of
ls -alh /var/log/mysql?@ssddanbrown commented on GitHub (Dec 29, 2022):
Also worth watching journalctl for mysql while attempting to restart in another terminal:
@infotts-py commented on GitHub (Dec 30, 2022):
/var/log/mysql$ ls -alh /var/log/mysql
total 36K
drwxr-x--- 2 mysql adm 4.0K Dec 30 09:11 .
drwxrwxr-x 13 root syslog 4.0K Dec 30 09:11 ..
-rw-r----- 1 mysql adm 0 Dec 30 09:11 error.log
-rw-r----- 1 mysql adm 2.5K Dec 27 09:31 error.log.1.gz
-rw-r----- 1 mysql adm 20 Dec 26 06:25 error.log.2.gz
-rw-r----- 1 mysql adm 20 Dec 25 06:25 error.log.3.gz
-rw-r----- 1 mysql adm 20 Dec 24 06:25 error.log.4.gz
-rw-r----- 1 mysql adm 20 Dec 23 06:25 error.log.5.gz
-rw-r----- 1 mysql adm 2.1K Dec 22 19:55 error.log.6.gz
-rw-r----- 1 mysql adm 20 Dec 21 06:25 error.log.7.gz
error.log.6.gz hasn't been modified. Upgrade done on the 27th only added to error.log.1.gz. (I've been going back and forth with checkpoints from before and after upgrade to 20.04). No new error logs when I unmask and try tpo start the mysql service.
docs@docs:/var/log/mysql$ vi error.log.1.gz
2022-12-27T14:15:11.320220Z 0 [Note] Giving 0 client threads a chance to die gracefully
2022-12-27T14:15:11.320256Z 0 [Note] Shutting down slave threads
2022-12-27T14:15:11.320261Z 0 [Note] Forcefully disconnecting 0 remaining clients
2022-12-27T14:15:11.320267Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-12-27T14:15:11.357191Z 0 [Note] Binlog end
2022-12-27T14:15:11.359627Z 0 [Note] Shutting down plugin 'auth_socket'
2022-12-27T14:15:11.363828Z 0 [Note] Shutting down plugin 'ngram'
2022-12-27T14:15:11.363837Z 0 [Note] Shutting down plugin 'partition'
2022-12-27T14:15:11.363841Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2022-12-27T14:15:11.363845Z 0 [Note] Shutting down plugin 'ARCHIVE'
2022-12-27T14:15:11.363848Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2022-12-27T14:15:11.363878Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2022-12-27T14:15:11.363881Z 0 [Note] Shutting down plugin 'MyISAM'
2022-12-27T14:15:11.363888Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2022-12-27T14:15:11.363891Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2022-12-27T14:15:11.363894Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2022-12-27T14:15:11.363896Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2022-12-27T14:15:11.363899Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2022-12-27T14:15:11.363901Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2022-12-27T14:15:11.363904Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2022-12-27T14:15:11.363906Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2022-12-27T14:15:11.363909Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2022-12-27T14:15:11.363911Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2022-12-27T14:15:11.363914Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2022-12-27T14:15:11.363916Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2022-12-27T14:15:11.363919Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2022-12-27T14:15:11.363921Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2022-12-27T14:15:11.363924Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2022-12-27T14:15:11.363927Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2022-12-27T14:15:11.363929Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2022-12-27T14:15:11.363932Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2022-12-27T14:15:11.363935Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2022-12-27T14:15:11.363938Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2022-12-27T14:15:11.363941Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2022-12-27T14:15:11.363943Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2022-12-27T14:15:11.363946Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2022-12-27T14:15:11.363948Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2022-12-27T14:15:11.363951Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2022-12-27T14:15:11.363954Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2022-12-27T14:15:11.363956Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2022-12-27T14:15:11.363959Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2022-12-27T14:15:11.363961Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2022-12-27T14:15:11.363964Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2022-12-27T14:15:11.363967Z 0 [Note] Shutting down plugin 'InnoDB'
2022-12-27T14:15:11.364007Z 0 [Note] InnoDB: FTS optimize thread exiting.
2022-12-27T14:15:11.364061Z 0 [Note] InnoDB: Starting shutdown...
2022-12-27T14:15:11.464228Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-12-27T14:15:11.464959Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 221227 9:15:11
2022-12-27T14:15:12.773219Z 0 [Note] InnoDB: Shutdown completed; log sequence number 4996157105
2022-12-27T14:15:12.774230Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-12-27T14:15:12.774242Z 0 [Note] Shutting down plugin 'MEMORY'
2022-12-27T14:15:12.774246Z 0 [Note] Shutting down plugin 'CSV'
2022-12-27T14:15:12.774250Z 0 [Note] Shutting down plugin 'sha256_password'
2022-12-27T14:15:12.774259Z 0 [Note] Shutting down plugin 'mysql_native_password'
2022-12-27T14:15:12.774395Z 0 [Note] Shutting down plugin 'binlog'
2022-12-27T14:15:12.774633Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
2022-12-27T14:15:35.451512Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-12-27T14:15:35.452863Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.40-0ubuntu0.18.04.1) starting as process 1530 ...
2022-12-27T14:15:35.498925Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-12-27T14:15:35.498943Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-12-27T14:15:35.498946Z 0 [Note] InnoDB: Uses event mutexes
"error.log.1.gz" [readonly][noeol] 8L, 2541C 1,1 Top
journalctl -u mysql.service -f
Dec 30 09:12:16 docs systemd[1]: Started LSB: Start and stop the mysql database server daemon.
@ssddanbrown commented on GitHub (Dec 30, 2022):
The MySQL version in your error log (
mysqld 5.7.40-0ubuntu0.18.04.1) looks to be for Ubuntu 18.04. Maybe it's not being upgraded during the upgrade process to remain compatible. From Ubuntu 20.04 MySQL 8.0 is used.Might have been held back potentially related to the service being masked.
Assuming you have a safe backup of a previous instance, I'd try a re-install of MySQL on the upgraded system, ensuring the correct version is being used. (Currently
8.0.31-0ubuntu0.20.04.1for Ubuntu 20.04 or8.0.31-0ubuntu0.22.04.1for Ubuntu 22.04).@infotts-py commented on GitHub (Jan 10, 2023):
I was on vacation last week but got back to this tonight. I wasn't able to get MySQL updated correctly from 5.7 to 8.031. I ended up going back to my checkpoint and starting over from scratch.
I don't know why the upgrade process didn't react the same way the previous times...
Thank you for your help!
@ssddanbrown commented on GitHub (Jan 10, 2023):
Great to hear things are now working!
Will therefore close this off.