[GH-ISSUE #9431] [BUG] Graylog update #2069

Closed
opened 2026-02-26 12:51:12 +03:00 by kerem · 6 comments
Owner

Originally created by @Danny89530 on GitHub (Nov 25, 2025).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/9431

Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

Graylog

📂 What was the exact command used to execute the script?

update

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

8.4.14

📝 Provide a clear and concise description of the issue.

Cannot update from update command

🔄 Steps to reproduce the issue.

I am attempting to update Graylog, currently at version 6.3.6, using the update command. Direct execution of the command results in the service being stopped and immediately restarted, without the actual update being performed.
I analyzed the update shell script and found that version 6.3.6 does not fall within any of the predefined conditional blocks: it satisfies neither the condition dpkg --compare-versions "$CURRENT_VERSION" lt "6.3" nor the subsequent elif dpkg --compare-versions "$CURRENT_VERSION" ge "7.0".

I worked around this issue by locally modifying the version comparison, changing the if condition from 6.3 to 6.4, which allowed the correct update of the packages (MongoDB, Graylog server, and datanode).
During the update of the graylog-server, I kept my local configuration file when prompted from apt, allowing the service to restart successfully.

However, the problem encountered is that, upon completion of the procedure, the Graylog installation is missing existing data and configurations: all my indices, grok patterns, and streams are lost, as if it were a clean installation. The expected behavior is for the update procedure to preserve the user's configuration and data.

Paste the full error output (if available).

N/A

🖼️ Additional context (optional).

[14:38 root@Graylog ~] # cat /etc/issue
Debian GNU/Linux 13 \n \l

[14:39 root@Graylog ~] # apt list --installed 2>/dev/null | grep graylog-*
graylog-6.3-repository/stable,now 1-1 all [installed]
graylog-datanode/stable,now 6.3.6-1 amd64 [installed]
graylog-server/stable,now 6.3.6-1 amd64 [installed]

[14:39 root@Graylog ~] # apt list --installed 2>/dev/null | grep mongodb-*
mongodb-database-tools/bookworm/mongodb-org/7.0,now 100.13.0 amd64 [installed,automatic]
mongodb-mongosh/bookworm/mongodb-org/7.0,now 2.5.9 amd64 [installed,automatic]
mongodb-org-database-tools-extra/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org-database/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org-mongos/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org-server/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org-shell/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org-tools/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic]
mongodb-org/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed]

Originally created by @Danny89530 on GitHub (Nov 25, 2025). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/9431 ### ✅ Have you read and understood the above guidelines? yes ### 🔎 Did you run the script with verbose mode enabled? Yes, verbose mode was enabled and the output is included below ### 📜 What is the name of the script you are using? Graylog ### 📂 What was the exact command used to execute the script? update ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 13 ### 📈 Which Proxmox version are you on? 8.4.14 ### 📝 Provide a clear and concise description of the issue. Cannot update from `update` command ### 🔄 Steps to reproduce the issue. I am attempting to update Graylog, currently at version 6.3.6, using the update command. Direct execution of the command results in the service being stopped and immediately restarted, without the actual update being performed. I analyzed the update shell script and found that version 6.3.6 does not fall within any of the predefined conditional blocks: it satisfies neither the condition `dpkg --compare-versions "$CURRENT_VERSION" lt "6.3"` nor the subsequent `elif dpkg --compare-versions "$CURRENT_VERSION" ge "7.0"`. I worked around this issue by locally modifying the version comparison, changing the if condition from 6.3 to 6.4, which allowed the correct update of the packages (MongoDB, Graylog server, and datanode). During the update of the graylog-server, I kept my local configuration file when prompted from apt, allowing the service to restart successfully. However, the problem encountered is that, upon completion of the procedure, the Graylog installation is missing existing data and configurations: all my indices, grok patterns, and streams are lost, as if it were a clean installation. The expected behavior is for the update procedure to preserve the user's configuration and data. ### ❌ Paste the full error output (if available). N/A ### 🖼️ Additional context (optional). [14:38 root@Graylog ~] # cat /etc/issue Debian GNU/Linux 13 \n \l [14:39 root@Graylog ~] # apt list --installed 2>/dev/null | grep graylog-* graylog-6.3-repository/stable,now 1-1 all [installed] graylog-datanode/stable,now 6.3.6-1 amd64 [installed] graylog-server/stable,now 6.3.6-1 amd64 [installed] [14:39 root@Graylog ~] # apt list --installed 2>/dev/null | grep mongodb-* mongodb-database-tools/bookworm/mongodb-org/7.0,now 100.13.0 amd64 [installed,automatic] mongodb-mongosh/bookworm/mongodb-org/7.0,now 2.5.9 amd64 [installed,automatic] mongodb-org-database-tools-extra/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org-database/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org-mongos/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org-server/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org-shell/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org-tools/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed,automatic] mongodb-org/bookworm/mongodb-org/7.0,now 7.0.26 amd64 [installed]
kerem 2026-02-26 12:51:12 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tremor021 commented on GitHub (Nov 25, 2025):

I mean, all the data should be in mongodb, right? We just upgrade from mongo 7 to 8. we dont touch user data at all

Did you follow the upgrade guide?

<!-- gh-comment-id:3575855050 --> @tremor021 commented on GitHub (Nov 25, 2025): I mean, all the data should be in mongodb, right? We just upgrade from mongo 7 to 8. we dont touch user data at all Did you follow the upgrade guide?
Author
Owner

@Danny89530 commented on GitHub (Nov 25, 2025):

It is possible that I may have overlooked a critical step: I did not execute any specific procedure beyond running the "update" command via the shell.

All other operations I performed have been documented in the initial report, including the necessary local modification of the update shell script (changing the version comparison from 6.3 to 6.4) to allow the update process to even start.

Did I miss any required or recommended procedures that caused this loss of configuration and data?

<!-- gh-comment-id:3576166781 --> @Danny89530 commented on GitHub (Nov 25, 2025): It is possible that I may have overlooked a critical step: I did not execute any specific procedure beyond running the "update" command via the shell. All other operations I performed have been documented in the initial report, including the necessary local modification of the update shell script (changing the version comparison from 6.3 to 6.4) to allow the update process to even start. Did I miss any required or recommended procedures that caused this loss of configuration and data?
Author
Owner

@Danny89530 commented on GitHub (Nov 25, 2025):

I have conducted further tests by locally downloading the script and running it in debug mode. The results are provided below for your analysis.

Please find the execution trace for the script running "as is" (before modification) here:

And here is the execution trace for the script after the version comparison condition in the if statement was altered, as described in my first post:

<!-- gh-comment-id:3576287718 --> @Danny89530 commented on GitHub (Nov 25, 2025): I have conducted further tests by locally downloading the script and running it in debug mode. The results are provided below for your analysis. Please find the execution trace for the script running "as is" (before modification) here: - Execution 'as is': https://pastebin.com/SucCkg5a And here is the execution trace for the script after the version comparison condition in the if statement was altered, as described in my first post: - Execution after modification: https://pastebin.com/6qvhbxUG
Author
Owner
<!-- gh-comment-id:3576638425 --> @tremor021 commented on GitHub (Nov 25, 2025): https://go2docs.graylog.org/current/upgrading_graylog/upgrading_graylog.html https://go2docs.graylog.org/current/planning_your_deployment/data_node_in-place_migration.htm?tocpath=Upgrade%20Graylog%7CData%20Node%20Migration%7C_____0
Author
Owner

@tremor021 commented on GitHub (Nov 27, 2025):

If you can restore from snapshot, then follow the upgrade guide.

Our script just detects current version and if it matches the upgrade path then it installs v7.0 repo and installs packages from there.

If something needs to be done in the app (and i see in the guide that it should be done), script can't do that for you. Its manual work.

I'm gonna close this for now. If you have further problems with migrating to v7.0 i guess you should open a issue on their github.

<!-- gh-comment-id:3585762961 --> @tremor021 commented on GitHub (Nov 27, 2025): If you can restore from snapshot, then follow the upgrade guide. Our script just detects current version and if it matches the upgrade path then it installs v7.0 repo and installs packages from there. If something needs to be done in the app (and i see in the guide that it should be done), script can't do that for you. Its manual work. I'm gonna close this for now. If you have further problems with migrating to v7.0 i guess you should open a issue on their github.
Author
Owner

@denis-ev commented on GitHub (Jan 27, 2026):

@Danny89530 I havent looked at the mongo installation bit in the script, but that seems to be removing the data.

curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
   --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list

# rm /etc/apt/sources.list.d/mongodb-org-7*

apt update && apt upgrade -y

upgrading mongo as above and then manually executing the script with the fixed compare and removing mongodb install part does do the upgrade

#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://graylog.org/

APP="Graylog"
var_tags="${var_tags:-logging}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-8192}"
var_disk="${var_disk:-30}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"

header_info "$APP"
variables
color
catch_errors

function update_script() {
  header_info
  check_container_storage
  check_container_resources

  if [[ ! -d /etc/graylog ]]; then
    msg_error "No ${APP} Installation Found!"
    exit
  fi

  msg_info "Stopping Service"
  systemctl stop graylog-datanode
  systemctl stop graylog-server
  msg_info "Stopped Service"

  CURRENT_VERSION=$(apt list --installed 2>/dev/null | grep graylog-server | grep -oP '\d+\.\d+\.\d+' | head -n1 | tr -d '[:space:]')

  echo "Detected Graylog version: $CURRENT_VERSION"

  if dpkg --compare-versions "$CURRENT_VERSION" ge "6.3" && dpkg --compare-versions "$CURRENT_VERSION" lt "7.0"; then
    # Handle Graylog >= 6.3 and < 7.0
    #MONGO_VERSION="8.0" setup_mongodb
    msg_info "Updating Graylog to 7.x"
    $STD apt update
    $STD apt upgrade -y
    curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb" -o "graylog-7.0-repository_latest.deb"
    $STD dpkg -i graylog-7.0-repository_latest.deb
    $STD apt update
    $STD apt install -y graylog-server graylog-datanode
    rm -f graylog-7.0-repository_latest.deb
    msg_ok "Updated Graylog"
  elif dpkg --compare-versions "$CURRENT_VERSION" ge "7.0"; then
    # Handle Graylog >= 7.0
    msg_info "Updating Graylog"
    $STD apt update
    $STD apt upgrade -y
    msg_ok "Updated Graylog"
  else
    # Handle < 6.3 if needed
    msg_info "Detected an old Graylog version (< 6.3), please upgrade manually."
  fi

  msg_info "Starting Service"
  systemctl start graylog-datanode
  systemctl start graylog-server
  msg_ok "Started Service"
  msg_ok "Updated successfully!"
  exit
}

start
build_container
description

msg_ok "Completed successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000${CL}"
<!-- gh-comment-id:3803373783 --> @denis-ev commented on GitHub (Jan 27, 2026): @Danny89530 I havent looked at the mongo installation bit in the script, but that seems to be removing the data. ``` curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ --dearmor echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list # rm /etc/apt/sources.list.d/mongodb-org-7* apt update && apt upgrade -y ``` upgrading mongo as above and then manually executing the script with the fixed compare and removing mongodb install part does do the upgrade ``` #!/usr/bin/env bash source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) # Copyright (c) 2021-2026 community-scripts ORG # Author: Slaviša Arežina (tremor021) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://graylog.org/ APP="Graylog" var_tags="${var_tags:-logging}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-8192}" var_disk="${var_disk:-30}" var_os="${var_os:-debian}" var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables color catch_errors function update_script() { header_info check_container_storage check_container_resources if [[ ! -d /etc/graylog ]]; then msg_error "No ${APP} Installation Found!" exit fi msg_info "Stopping Service" systemctl stop graylog-datanode systemctl stop graylog-server msg_info "Stopped Service" CURRENT_VERSION=$(apt list --installed 2>/dev/null | grep graylog-server | grep -oP '\d+\.\d+\.\d+' | head -n1 | tr -d '[:space:]') echo "Detected Graylog version: $CURRENT_VERSION" if dpkg --compare-versions "$CURRENT_VERSION" ge "6.3" && dpkg --compare-versions "$CURRENT_VERSION" lt "7.0"; then # Handle Graylog >= 6.3 and < 7.0 #MONGO_VERSION="8.0" setup_mongodb msg_info "Updating Graylog to 7.x" $STD apt update $STD apt upgrade -y curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb" -o "graylog-7.0-repository_latest.deb" $STD dpkg -i graylog-7.0-repository_latest.deb $STD apt update $STD apt install -y graylog-server graylog-datanode rm -f graylog-7.0-repository_latest.deb msg_ok "Updated Graylog" elif dpkg --compare-versions "$CURRENT_VERSION" ge "7.0"; then # Handle Graylog >= 7.0 msg_info "Updating Graylog" $STD apt update $STD apt upgrade -y msg_ok "Updated Graylog" else # Handle < 6.3 if needed msg_info "Detected an old Graylog version (< 6.3), please upgrade manually." fi msg_info "Starting Service" systemctl start graylog-datanode systemctl start graylog-server msg_ok "Started Service" msg_ok "Updated successfully!" exit } start build_container description msg_ok "Completed successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000${CL}" ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2069
No description provided.