-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors Establishing communication with dbus #9
Comments
Possibly related to this commit which is not available until godbus 5.0.6. This library is currently using 5.0.5: godbus/dbus@7ba66a7
|
Because This isuue is about firewalld use dbus remotely connect firewalld dbus interface error #851 . if i want use tcp remote connect over dbus procotol, but, the program can't get uid, this issue for usual facing over remote connect, the firewalld group said "This is not something we can reasonably support", so my remove the firewalld pokit kit and write this tutorial. if i write a firewalld-agent, can resovle this issue, because on local Linux, program can get uid, but this solution need IT manager deploy many of agent on many Linux sever, that dificute, so i remove the pokit kit in firewalld code, and just provide a rpm/deb package to IT manager, IT manager just install, This does not require complicated operations, because each of our Linux has the dbus port enabled by default. please refer install manual Setup firewalld section, you need without policy kit, my provide two version for debian 11 and centos 7, if you want other Linux OS pls refer without policy kit tutorial About the redhat like, i just use until centos 7, the debian11 and detian 12 still using dbus-daemon. Rocky9 i will download and install to try you issue. Thank you for you advise, I will try this new featrue. |
Interesting. Just to clarify, this isn't exclusive to remote connections, adjusting the following parameters to use the loopback 127.0.0.1 results in the same error: /usr/share/dbus-1/system.d/Uranus.conf <listen>tcp:host=localhost,bind=127.0.0.1,port=55556,family=ipv4</listen> firewalld-gateway.toml
At this point Rocky9 is using firewalld version 1.3.4. Modifying both the firewalld and firewall-cmd packages are possible but frankly not worth the configuration overhead nor the security risks. Just to be clear this is what is required (so far) to get this package working on the latest RHEL-based distros:
Honestly this is way too much work and introduces more security vulnerabilities than it's worth. At this point for the adoptability or this project I would highly recommend:
|
@joe-at-startupmedia Uranus-agent not final choice, although this approach is simpler than now architecture, if use agent, I have more choices and no need for firewalld. but that code is more than firewalld, because firewalld can suitable run on iptables and nftables. I will adapt as soon as possible rocky9 like. |
Getting DBUS working on a tcp socket
This library establishes a connection to dbus over tcp. The problem is getting dbus to work with tcp on my Rocky Linux distro (rhel -based)
The first issue is this distro no longer uses dbus-daemon but dbus-broker-launch
As such, following this method to open TCP doesn't work.
https://stackoverflow.com/questions/61327052/linux-dbus-remote-tcp-connection-with-systemd-fails
Modify /usr/lib/systemd/system/dbus.socket
Adding that results in the following error:
Error: dbus-broker-launch[2476921]: More than one listener socket passed
dbus-broker doesn't like multiple listen streams specified in dbus.socket so we use dbus-daemon instead. This is what Centos 7 (rocky linux predecessor) is using.
Create a new system file at: /usr/lib/systemd/system/dbus.service
Create the uranus busconfig
This is included by the system.conf file
To resolve this, I use dbus-daemon instead:
Note: Make sure you have password access to your machine in case dbus crashes on reboot.
Confirm that DBUS is listening on TCP
Finally, now we have dbus listening on tcp
Next,
Establishing connection to Uranus
Error when attempting to create a host on the localst machine:
https://uranus.com/fw/v1/dashboard?ip=0.0.0.0
Disable SELinux (not Permissive or Enabled) and reboot is the only solution I've found to suppress this error.
After rebooting the machine and attempting to list the host:
Adding this line to the firewalld buspolicy resolves this error
Now restart dbus and attempt to list the policies again in the Uranus UI gives a new error:
Subsequent requests will result in the same error with an incremented UID
The text was updated successfully, but these errors were encountered: