-
Notifications
You must be signed in to change notification settings - Fork 472
Failed to create bus connection: No such file or directory - when calling /api/v1/health endpoint #1732
Comments
Weird, I cannot seem to reproduce this issue 🤔 Could you set the log level to |
What I see when calling |
Failed to create bus connection: No such file or directory sh-4.3# ps auxf |
That's frustrating, I've tried to reproduce it in multiple ways with no luck... Wouldn't you have a configuration that I could use in order to reproduce it ? |
I'm also see this. Fresh deployment of portus to Kubernetes |
I am seeing the same errors here. |
I found out, that something inside the Portus container expects the DBUS socket to be available at @mssola we run
The same error appeared when executing |
I run into the very same issue while trying to run I'll just write down the whole process, it might be useful for @mssola or others ;) DebuggingFirst of all I changed the Then I entered the pod (just use
Then I looked at the
Basically rails is going through all the gems requires by Portus. These are not something you should be worried about (if the problem were into one of these gems others would have complained about it). Then it reads something Portus specific: Some of them triggered by interest:
The most significant are:
Then I looked into the ruby code that was opened right before this series of Portus/packaging/suse/portusctl/lib/constants.rb Lines 6 to 14 in 0583e1a
As you can see the The As a proof:
Given
The failure of That's the origin of our bug. FixI'm about to open a PR that fixes the issue by changing how the |
The code determining if Portus is running containerized is broken on Kubernetes because in this case PID 1 doesn't belong to the `docker` cgroup slice. That causes the code to invoke `hostnamectl`, that tries to access kdbus from within a container. That causes Rails to fail immediately. Signed-off-by: Flavio Castelli <[email protected]>
BTW, given he commented on this issue... I just wanted to send ❤️ to @rendhalver for his work on Portus' helm chart! |
Improve detection of containerized environments - fix issue #1732
Fixed by #1879. |
I think you got the PR reference wrong. #1732 is this issue. |
@rendhalver fixed 😅 |
Just curious if this was erroring, what was it trying to do that it could not do because of the error? |
* upstream/v2.3: Bump version Remind users to login again after password update Restrict deletes into the repository Bump version update sprockets to fix cve-2018-3760 Bump version oauth/gitlab: Be sure to load all groups Allow to use private gitlab server Fixed regression on registries not being created Make it possible to connect to a database socket Allow Puma to bind to unix socket also in production user: skip validations when creating portus user passwords: don't allow the portus user to reset user: do not allow the update of the portus user Improve detection of containerized environments - fix issue SUSE#1732
Description
I've just deployed opensuse/portus:2.3.0 (with puma) connected to a postgres:9.6 pod into kubernetes.
Everything works fine except of Portus is logging "Failed to create bus connection: No such file or directory" after every Kubernetes LiveProbe calling /api/v1/health check. The Database is accessible, the software works like expected, calling the URL in the browser gives me success all over the place (database, clair, registry) - but it always logs this error. the /api/v1/_ping endpoint works like expected (no Error in Log).
Steps to reproduce
The text was updated successfully, but these errors were encountered: