-
Notifications
You must be signed in to change notification settings - Fork 140
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
StatusManagerEvent signal is sent before backend client service is ready #238
Comments
I also relatively often get this error UPD. Oh I could even get |
I've not pushed out yet some new code which uses this feature from Python. It will be part of the project once the code is properly tested. But you can have a look at it here: https://gist.github.com/dsommers/d4447dba169b1278bcab4b7ebd235761 The approach to use is to listen to To check if your setup is functional, try running this command as root: |
I see the |
I am creating client app, so not sure how to ensure that D-Bus interfaces are running. After trying to call them I could get |
Depending on the system itself, I have seen that it in some cases the client process has not settled quickly enough, so a little delay is needed currently. I'm re-doing the D-Bus implementation (see the 171 issue ticket), which seems to be far more efficient in general. I'll have a look closer at when the There are several things happening when
When all these steps are done, that's when the session path will be fully functional. That But it's awesome that you're looking into a client app! Keep us updated and we can collaborate further on these efforts. |
@dsommers thanks for clarifying. Yes, I understand that calling But I still don't understand what I can do with |
I'll definitely try to improve the situation with v22_dev, once that is ready, yes. Generally speaking, the challenge with D-Bus is that there are no strict delivery guarantees on signals. At least that's my experience so far. In many ways, it's not unreasonable to compare it with UDP traffic. Most of the time it works just fine, but it may be delayed. In this case, since the |
@dsommers is there any workaround to pre-activate all necessary D-Bus services? Currently client user should click "Connect" button like 2 or 3 times to finally connect. Because of |
What is this "Connect" button? Do you have some code providing such a button? Also, have a look at the OpenVPN 3 Indicator project; we've recently embraced that project as an alternative GUI for OpenVPN 3 Linux. That said, the common behaviour across D-Bus libraries is to give that "Object does not exist" behaviour if the D-Bus service is not running and not starting quick enough. That even goes for the The approach I've taken in GDBus++ and the refactoring of openvpn3-linux, is to do a for-loop check doing a |
@dsommers thanks for the reply! Very useful. Well, by "connect" button I mean starting an OpenVPN3 session. Then I call consequently Import, Connect, etc I got those errors. Thanks for the detailed answer, now I know where to dig... Currently as a workaround I am just calling |
Well, it worked! Much better solution, thank you again. |
Just a note ... you seem to import configurations each time. Consider using persistent configuration imports.
With this approach, the configuration profile will always be present on the system for the user which did the import. To grant more users access, have a look at the And once imported, all you need to do: |
Yes, I know about persistent configurations, but in our case we dynamically fetch and assign configurations for each user based on conditions (e.g. where OpenVPN over UDP could be blocked). Today it could ok, tomorrow already not. |
This should be fixed with the latest devsnapshot. The issuing of the "session created" signal is now postponed until after the session object is created and the backend VPN client process has completed the registration with the session manager. |
As far as I got it, from some point there was a change then
StatusChange
andAttentionRequired
became "private" signals. There isLogForward
method which allows to receive some signals withnet.openvpn.v3.backends
as sender. But I cannot receive any signals fromnet.openvpn.v3.sessions
(while docs clearly says it should be proxified).It lead me to the situation where I cannot track state of session initialization: I am importing configuration (
Import
), creating new session (NewTunnel
), but if I will immediately call something likeLogForward
orReady
, I will get this error:Backend VPN process is not ready
.Without any signals I could not do it without manual sleeps in the code.
I use
godbus
, it's a bit more lower level than Python's dbus, but even if I didn't apply any Match filter and just print ALL signals my app is getting, I still unable to find any signals fromsessions
.The text was updated successfully, but these errors were encountered: