You are not logged in.

#1 2024-07-19 15:47:40

ZingerZola
Member
Registered: 2024-03-16
Posts: 3

Help Needed: OBEX Service Failing on Arch - DBUS_SESSION_BUS_ADDRESS

Hello,

I've been troubleshooting an issue with transferring files via Bluetooth and have encountered a problem with the obex service. Here are the details:

Issue Description:

When I attempt to start the OBEX service, it fails with the following error messages: (note: the 'override.conf' file is empty)

sudo systemctl status obex

× obex.service - OBEX Object Push server
     Loaded: loaded (/etc/systemd/system/obex.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/obex.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Fri 2024-07-19 16:09:11 BST; 19min ago
   Duration: 44ms
 Invocation: 7802736bc85c4d9780c5533dfdc422dd
    Process: 4894 ExecStart=/usr/lib/bluetooth/obexd (code=exited, status=1/FAILURE)
   Main PID: 4894 (code=exited, status=1/FAILURE)

Jul 19 16:09:11 fan1 systemd[1]: Started OBEX Object Push server.
Jul 19 16:09:11 fan1 obexd[4894]: OBEX daemon 5.77
Jul 19 16:09:11 fan1 obexd[4894]: manager_init failed
Jul 19 16:09:11 fan1 obexd[4894]: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Jul 19 16:09:11 fan1 systemd[1]: obex.service: Main process exited, code=exited, status=1/FAILURE
Jul 19 16:09:11 fan1 systemd[1]: obex.service: Failed with result 'exit-code'.

Troubleshooting Steps Taken:

1. Checked Permissions and Configuration:
   - Ensured `/etc/bluetooth` has the correct permissions (`755`).

2. DBUS_SESSION_BUS_ADDRESS Issue:
   - The error message suggests setting `DBUS_SESSION_BUS_ADDRESS`. I tried exporting this variable in my ~/.bashrc (then logging out and back in) but the problem persists. I even tried to add this to the root users .bashrc file too.

export $(dbus-launch)

3. Configured .bashrc to Set Environment Variable:
   - Verified the current value of `DBUS_SESSION_BUS_ADDRESS`:

echo $DBUS_SESSION_BUS_ADDRESS

unix:path=/tmp/dbus-RY0T5JKG5v,guid=11cfcbca1e7db0092561c6b1669a88af

Despite these efforts, the `obex.service` continues to fail with the same errors.

Request for Help:

- Has anyone encountered similar issues with `obexd` and `DBUS_SESSION_BUS_ADDRESS`?
- Are there any additional troubleshooting steps or configurations that I might be missing?
- Could this be a version-specific issue with the OBEX daemon or D-Bus configuration?

Any insights or suggestions would be greatly appreciated. Thank you for your time and assistance!

Offline

#2 2024-07-19 15:54:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Help Needed: OBEX Service Failing on Arch - DBUS_SESSION_BUS_ADDRESS

DBUS_SESSION_BUS_ADDRESS is set when systemd starts the bus. You do not set it yourself, you do not use dbus-launch.

What's your override.conf for obex.service?

Edit: And where did the obex system service come from in the first place?

Last edited by Scimmia (2024-07-19 15:56:39)

Offline

#3 2024-07-19 17:18:20

ZingerZola
Member
Registered: 2024-03-16
Posts: 3

Re: Help Needed: OBEX Service Failing on Arch - DBUS_SESSION_BUS_ADDRESS

Thank you for your response.

/etc/systemd/system/obex.service File

My understanding is that the `obex.service` is configured to launch after `bluetooth.service`. See the contents of `/etc/systemd/system/obex.service`:

[Unit]
Description=OBEX Object Push server
After=bluetooth.service

[Service]
ExecStart=/usr/lib/bluetooth/obexd
User=fan1
Group=fan1

[Install]
WantedBy=multi-user.target

/etc/systemd/system/obex.service.d/override.conf File

The `override.conf` file contains the following:

[Service]
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/\$(id -u)/bus"

### Additional Information

I understand that `DBUS_SESSION_BUS_ADDRESS` should be set automatically by systemd, and I have followed the suggestions to not set it manually (I have removed the export $(dbus-launch) from the .bashrc files). Despite this, I am still encountering the same error when starting the `obex` service.

### Error Messages

Here are the error messages I receive:

sudo systemctl status obex

× obex.service - OBEX Object Push server
     Loaded: loaded (/etc/systemd/system/obex.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/obex.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Fri 2024-07-19 18:11:31 BST; 15s ago
   Duration: 17ms
 Invocation: c94e3b8a29234f4698377dd7d7786b46
    Process: 5097 ExecStart=/usr/lib/bluetooth/obexd (code=exited, status=1/FAILURE)
   Main PID: 5097 (code=exited, status=1/FAILURE)

Jul 19 18:11:31 fan1 systemd[1]: Started OBEX Object Push server.
Jul 19 18:11:31 fan1 obexd[5097]: OBEX daemon 5.77
Jul 19 18:11:31 fan1 obexd[5097]: manager_init failed
Jul 19 18:11:31 fan1 obexd[5097]: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Jul 19 18:11:31 fan1 systemd[1]: obex.service: Main process exited, code=exited, status=1/FAILURE
Jul 19 18:11:31 fan1 systemd[1]: obex.service: Failed with result 'exit-code'.

### Request for Further Guidance

1. Is there a standard configuration or service setup for `obex` that I should follow?
2. Should I be using a different method to enable file transfers via Bluetooth?
3. Any specific steps to correct the `manager_init failed` DBUS_SESSION_BUS_ADDRESS error?

Thanks again!

Offline

#4 2024-07-19 17:22:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,726

Re: Help Needed: OBEX Service Failing on Arch - DBUS_SESSION_BUS_ADDRESS

But where did that service file come from? It's not in any package in the Arch repos, and as far as I can see, it's not something that should be run as a system service at all?

Maybe reading https://wiki.archlinux.org/title/Systemd/User is what you're really after?

Offline

Board footer

Powered by FluxBB