From 1e231feae4ba0072ff3c9f8db8364741e622cb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rard=20Collin?= Date: Sun, 8 Jan 2023 12:04:44 +0100 Subject: [PATCH] Trying to understand why Mongo crashes in CI --- scripts/install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index b95856c..8acd52f 100755 --- a/scripts/install +++ b/scripts/install @@ -128,6 +128,14 @@ ynh_print_info --message="Debian release is $(ynh_get_debian_release)" # Install the required version of Mongo ynh_install_mongo --mongo_version=$mongo_version +# Try to get better error message from Mongo about why it doesn't start +ynh_exec_warn journalctl --quiet --no-hostname --no-pager --lines=100 --unit=mongod +log_path="/var/log/mongodb/mongod.log" +if [ -e "$log_path" ]; then + ynh_print_warn --message="\-\-\-" + ynh_exec_warn tail --lines=100 "$log_path" +fi + #================================================= # CREATE DEDICATED USER #=================================================