ERROR conduwuit: Critical error running server: I/O error: Permission denied (os error 13) #734

Closed
opened 2025-04-07 19:59:00 +00:00 by el-dge · 3 comments
el-dge commented 2025-04-07 19:59:00 +00:00 (Migrated from github.com)

Good evening,
I have this error : DEVNAME not found ?
I use v0.5.0-rc3/x86_64-linux-musl-debug.deb (same error with 0.4.6)
then dpkg -i then edit toml and then su -s/bin/bash conduwuit -c "RUST_LOG=debug RUST_BACKTRACE=1 /usr/sbin/conduwuit -c /etc/conduwuit/conduwuit.toml"

WARN conduwuit_core::config::check: Note: conduwuit was built without optimisations (i.e. debug build)
DEBUG conduwuit_core::config::check: Checking for deprecated config keys
DEBUG conduwuit_core::config::check: Checking for unknown config keys
DEBUG conduwuit_core::utils::sys: Raised RLIMIT_NOFILE to=1048576 from=1024
INFO conduwuit::server: 0.5.0 (b6e9dc3) server_name=xxx.fr database_path="/var/lib/conduwuit" log_levels=debug
DEBUG main:start: conduwuit_router::run: Starting...
ERROR main:start: conduwuit_core::error::log: I/O error: DEVNAME not found.

...

INFO main:run: conduwuit_router::run: Finish
ERROR conduwuit: Critical error running server: I/O error: Permission denied (os error 13)
    at src/main/main.rs:67 on main ThreadId(1)
    in conduwuit::main

DEBUG signal: conduwuit_database::engine: Waiting for background tasks to finish...

I precise, I'm in an incus system container Debian 13 with:

  security.nesting: "true"
  security.privileged: "true"

No Error, when I run in root : /usr/sbin/conduwuit -c /etc/conduwuit/conduwuit.toml
In fact, yes, the first mistake : DEVNAME but not the critical, I have access to the admin console.

Any ideas ?
thx in advance.
ps: All log in PJ. :

a.log

Good evening, I have this error : `DEVNAME not found` ? I use v0.5.0-rc3/x86_64-linux-musl-debug.deb (same error with 0.4.6) then dpkg -i then edit toml and then `su -s/bin/bash conduwuit -c "RUST_LOG=debug RUST_BACKTRACE=1 /usr/sbin/conduwuit -c /etc/conduwuit/conduwuit.toml"` ``` WARN conduwuit_core::config::check: Note: conduwuit was built without optimisations (i.e. debug build) DEBUG conduwuit_core::config::check: Checking for deprecated config keys DEBUG conduwuit_core::config::check: Checking for unknown config keys DEBUG conduwuit_core::utils::sys: Raised RLIMIT_NOFILE to=1048576 from=1024 INFO conduwuit::server: 0.5.0 (b6e9dc3) server_name=xxx.fr database_path="/var/lib/conduwuit" log_levels=debug DEBUG main:start: conduwuit_router::run: Starting... ERROR main:start: conduwuit_core::error::log: I/O error: DEVNAME not found. ``` ... ``` INFO main:run: conduwuit_router::run: Finish ERROR conduwuit: Critical error running server: I/O error: Permission denied (os error 13) at src/main/main.rs:67 on main ThreadId(1) in conduwuit::main DEBUG signal: conduwuit_database::engine: Waiting for background tasks to finish... ``` I precise, I'm in an incus system container Debian 13 with: ``` security.nesting: "true" security.privileged: "true" ``` No Error, when I run in root : `/usr/sbin/conduwuit -c /etc/conduwuit/conduwuit.toml` In fact, yes, the first mistake : DEVNAME but not the critical, I have access to the admin console. Any ideas ? thx in advance. ps: All log in PJ. : [a.log](https://github.com/user-attachments/files/19638487/a.log)
jevolk commented 2025-04-07 22:41:32 +00:00 (Migrated from github.com)

Thanks for providing the log. We can rule out DEVNAME, the database directory, or the media directory being the source of the issue. Unfortunately it's not clear what the source of the error is, and I can't think of anything required of the filesystem beyond the aforementioned.

There are a few things we can do to expose the cause, the first and easiest might be to increase the log level to trace. If that doesn't show anything it can be further increased with -Olog_span_events=\"full\". If that still doesn't show anything, running the application under strace -f will almost certainly show what is being denied by the operating system. strace has filters if it becomes too cumbersome to find the needle in the haystack, but it will be in there.

Sorry about this inconvenience. This problem looks very fixable so I hope we can get to the bottom of it.

Thanks for providing the log. We can rule out DEVNAME, the database directory, or the media directory being the source of the issue. Unfortunately it's not clear what the source of the error is, and I can't think of anything required of the filesystem beyond the aforementioned. There are a few things we can do to expose the cause, the first and easiest might be to increase the log level to `trace`. If that doesn't show anything it can be further increased with `-Olog_span_events=\"full\"`. If that still doesn't show anything, running the application under `strace -f` will almost certainly show what is being denied by the operating system. `strace` has filters if it becomes too cumbersome to find the needle in the haystack, but it will be in there. Sorry about this inconvenience. This problem looks very fixable so I hope we can get to the bottom of it.
el-dge commented 2025-04-08 09:56:38 +00:00 (Migrated from github.com)

Thank you very much for your advices @jevolk, I follow it ; strace shows:

  • for the first error I/O error: DEVNAME not found. : I think it's because /sys/dev/block/0:88/... don't exist but it's non-blocking
  • for the last blocking error : I/O error: Permission denied (os error 13) , I'm ashamed it's because the keys for TLS weren't readable to user conduwuit. And more, we are warned : "It is strongly recommended that you use a reverse proxy instead of running conduwuit directly with TLS.". Shame on me !

Just in case for the first error :

strace.log

Thank you very much for your advices @jevolk, I follow it ; `strace` shows: - for the first error `I/O error: DEVNAME not found.` : I think it's because `/sys/dev/block/0:88/...` don't exist but it's non-blocking - for the last blocking error : `I/O error: Permission denied (os error 13)` , I'm ashamed it's because the keys for TLS weren't readable to user conduwuit. And more, we are warned : "It is strongly recommended that you use a reverse proxy instead of running conduwuit directly with TLS.". Shame on me ! Just in case for the first error : [strace.log](https://github.com/user-attachments/files/19646889/strace.log)
girlbossceo commented 2025-04-08 12:35:36 +00:00 (Migrated from github.com)

It probably should return a cleaner/nicer error though that's less confusing.

It probably should return a cleaner/nicer error though that's less confusing.
nex added the
Inherited
label 2025-04-14 23:37:06 +00:00
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: continuwuation/continuwuity#734
No description provided.