hbbs
(RustDesk ID Server)/mnt/rustdesk-test/db_v2.sqlite3
I have encountered a persistent disk I/O error
when attempting to start the hbbs
service. Despite extensive troubleshooting, the issue remains unresolved. The service fails with the following error message:
Error: An error occurred while creating a new object: error returned from database: disk I/O error
Permissions and Ownership:
sudo chmod 777 /mnt/rustdesk-test/db_v2.sqlite3
sudo chown www-data:www-data /mnt/rustdesk-test/db_v2.sqlite3
Write Access:
www-data
user:
sudo -u www-data sqlite3 /mnt/rustdesk-test/db_v2.sqlite3 "CREATE TABLE test5 (id INTEGER PRIMARY KEY);"
Filesystem Health:
sudo fsck -f /dev/sdd2
AppArmor:
sudo systemctl stop apparmor
sudo systemctl disable apparmor
sudo apt-get remove apparmor
Service Configuration:
hbbs
service to use the www-data
user and pointed to the new database location:
[Unit]
Description=RustDesk ID Server
After=network.target
[Service]
ExecStart=/usr/local/rustdesk-server/hbbs -r /mnt/rustdesk-test/db_v2.sqlite3
Restart=always
User=www-data
Group=www-data
WorkingDirectory=/usr/local/rustdesk-server
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Dependencies and Environment:
sudo apt-get install -y sqlite3 libsqlite3-dev
hbbs
binary is not corrupted:
md5sum /usr/local/rustdesk-server/hbbs
Logs and Errors:
sudo dmesg | grep -i error
sudo journalctl -xe
Disk I/O Test:
dd if=/dev/zero of=/mnt/rustdesk-test/testfile bs=1M count=1024 oflag=direct
rm /mnt/rustdesk-test/testfile
Despite these efforts, the hbbs
service continues to fail with the same disk I/O error
. Any insights, suggestions, or guidance from the community would be greatly appreciated.
Thank you for your assistance!
Setup the Environment:
Create the Database Directory:
sudo mkdir /mnt/rustdesk-test
sudo chmod 777 /mnt/rustdesk-test
sudo chown www-data:www-data /mnt/rustdesk-test
Create the SQLite Database File:
sudo sqlite3 /mnt/rustdesk-test/db_v2.sqlite3 "CREATE TABLE init (id INTEGER PRIMARY KEY);"
sudo chown www-data:www-data /mnt/rustdesk-test/db_v2.sqlite3
sudo chmod 777 /mnt/rustdesk-test/db_v2.sqlite3
Configure the hbbs
Service:
Create or edit the hbbs
service file to use the new database location:
sudo nano /etc/systemd/system/hbbs.service
Ensure the ExecStart
line is:
[Unit]
Description=RustDesk ID Server
After=network.target
[Service]
ExecStart=/usr/local/rustdesk-server/hbbs -r /mnt/rustdesk-test/db_v2.sqlite3
Restart=always
User=www-data
Group=www-data
WorkingDirectory=/usr/local/rustdesk-server
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
Restart the hbbs
Service:
hbbs
service:
sudo systemctl daemon-reload
sudo systemctl start hbbs
sudo systemctl status hbbs
Monitor for Errors:
sudo journalctl -u hbbs -e
By following these steps, you should be able to reproduce the disk I/O error
observed when starting the hbbs
service.
Expected Behavior
The hbbs service should start successfully without encountering any errors. Specifically, it should be able to create new objects in the SQLite database located at /mnt/rustdesk-test/db_v2.sqlite3 without generating a disk I/O error. The service should run smoothly, allowing RustDesk to function correctly for managing connections and providing the necessary ID services.
Ubuntu 24.04.1 LTS
1.1.12
N/A as operating in a console environment
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too