Re: Connection failed to be established: privat-key-password-failure
On Mon, 2015-03-23 at 00:44 +0100, Thomas Schneider wrote: > The OpenVPN connection fails with the following error: > SIGUSR1[soft,private-key-password-failure] received, process restarting > > I have verified that the private-key-password is stored in "Standard" keyring > as: > VPN cert-pass secret for . (see attachment) What version of NM and NetworkManager-openvpn? Also, you can run NM with debugging by doing this: sudo nmcli g log level debug and then recreate the error, and email me the system logs from NM privately so I can diagnose, with something like "journalctl -b -u NetworkManager" (if you're using the systemd journal) or by looking at /var/log/messages or /var/log/daemon.log. I'll then followup with the analysis as a reply to this thread. Thanks! Dan > My config is this: > [connection] > id=VPN > uuid=340bf0b0-5fdf-42cd-ad28-ead553655fdc > type=vpn > permissions= > autoconnect=false > secondaries= > > [ipv6] > method=auto > dns-search= > ip6-privacy=0 > > [ipv4] > method=auto > dns-search= > > [vpn] > service-type=org.freedesktop.NetworkManager.openvpn > connection-type=tls > auth=SHA256 > tunnel-mtu=1500 > cipher=AES-256-CBC > comp-lzo=yes > remote= > cert-pass-flags=1 > port=1194 > dev-type=tun > cert=/etc/openvpn/config/VPN/pc.crt > ca=/etc/openvpn/config/VPN/pc.pem > key=/etc/openvpn/config/VPN/pc.key > ta=/etc/openvpn/config/VPN/ta.key > > I was expecting that line > cert-pass-flags=1 > forces usage of keyring, however this expected behavior is not working. > > ___ > networkmanager-list mailing list > networkmanager-list@gnome.org > https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NMClient.IP4Config get_addresses() not always populated when signal 'notify::ip4-config' is fired
On Fri, 2015-03-20 at 01:31 +0100, Sylvain Garaud wrote: > Hello Dan, > > Thank you for the answer. > I am using NM lib version 0.9.10.0 > I use the dbus-monitor command you provided. > It helped me greatly to understand my problem. > > In most cases the ip info I am interested in was defined when the IP4Config > propertiesChanges signal was received. But it was not always the case > depending of the network interface type and disconnection time. My routine > using the gi.NMClient was also missing to capture some signals that I saw > with the dbus-monitor as sometimes they were arriving in a burst. > > Eventually I implemented the following solution that seems to be working > properly. > > 1. I register a callback on the device "state-changed" signal > 2. Within the callback, I try immediately to get the ip address inside the > dhcp4 config. > 3. If I get it I am done, otherwise it is undefined and I simply register a > callback on the dhcp4 options signal that hopefully will arrive later. > > I tested it with several configuration and it seems to work correctly. Getting the IP address through the DHCP4 config won't give you user overrides, secondary IP addresses, or static IP configurations though. This still sounds like a bug in NM or libnm-glib, and if you still have the logs from dbus-monitor I'd like to take a look. Thanks! Dan > Thank you so much, > > Sylvain > > > On Wed, Mar 18, 2015 at 3:44 PM, Dan Williams wrote: > > > On Sun, 2015-03-15 at 12:46 +0100, Sylvain Garaud wrote: > > > Hello, > > > > > > I am writing a small javascript for gnome to grab the ip addresses of my > > > network interfaces using imports.gi.NMClient; > > > Basically I get the devices and connect each device to the > > > notify::ip4-config signal to be able to update the ip address value when > > it > > > changes > > > > Which version of NM are you using? > > > > this.client = NMC.Client.new(); > > > this.devices = this.client.get_devices(); > > > for each (let device in this.devices) { > > > device.connect('notify::ip4-config',Lang.bind(this,this._update)); > > > } > > > > > > It works fine for the wifi connection but there is a problem with the > > > ethernet connection. > > > After turning my ethernet connection up, the signal 'notify::ip4-config' > > > is fired, the device state is ACTIVATED, so I try to get the ip4 config. > > > with ipcfg = device.get_ip4_config(); > > > I get a not null ipcfg object, unfortunately ipcfg.get_addresses() is not > > > defined yet. > > > > So that we can narrow the issue down, could you run: > > > > dbus-monitor --system > > "type='signal',sender='org.freedesktop.NetworkManager'" > > > > and reproduce the problem? This will let us know the sequence of D-BUs > > events that come directly from NetworkManager, so that we can see the > > raw data that libnm/libnm-glib is getting. > > > > Dan > > > > > I see in my journalctl log few seconds later, some dhcp network manager > > > message. > > > > > > _update: function(device) { > > > let ipcfg = device.get_ip4_config(); > > > if (ipcfg != null) { > > > for each(let addr in ipcfg.get_addresses()){ > > > let num = addr.get_address(); > > > } > > > } > > >}, > > > > > > How to be sure ipcfg.get_addresses() will return something ? > > > Could someone tell me which signal to use for being sure the ip address > > is > > > set when calling ipcfg.get_addresses()? I tried using the > > > 'notify::dhcp4-config' signal instead 'notify::ip4-config' without much > > > success. > > > > > > Thank you very much for your help, > > > > > > Sylvain > > > ___ > > > networkmanager-list mailing list > > > networkmanager-list@gnome.org > > > https://mail.gnome.org/mailman/listinfo/networkmanager-list > > > > > > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NMClient.IP4Config get_addresses() not always populated when signal 'notify::ip4-config' is fired
Hello, You are perfectly right. I used finally the ip4config and not the dhcp4 config to get the ip. Looking at the dbus-monitor logs I thought I could save the ip decoding step by using the dhcp4 config. But it is not enough generic. Here is the log where I simply go from wired ethernet off to on. I think I get an ip4config signal from the line 204 in the log but it does not include the addresses. The "real" one is at line 403. Not so sure what is the expected behavior. I have the following piece of code at line 166 which seems to work ok for that case. https://github.com/sgaraud/gnome-extension-show-ip/blob/master/extension.js#L166 at line 173, this is for the case when I sometimes get double notifications if I put up the ethernet com then down just before it get the dhcp4 config and up again. At that time it seems I get some old signals. Regards, Sylvain On Mon, Mar 23, 2015 at 5:58 PM, Dan Williams wrote: > On Fri, 2015-03-20 at 01:31 +0100, Sylvain Garaud wrote: > > Hello Dan, > > > > Thank you for the answer. > > I am using NM lib version 0.9.10.0 > > I use the dbus-monitor command you provided. > > It helped me greatly to understand my problem. > > > > In most cases the ip info I am interested in was defined when the > IP4Config > > propertiesChanges signal was received. But it was not always the case > > depending of the network interface type and disconnection time. My > routine > > using the gi.NMClient was also missing to capture some signals that I > saw > > with the dbus-monitor as sometimes they were arriving in a burst. > > > > Eventually I implemented the following solution that seems to be working > > properly. > > > > 1. I register a callback on the device "state-changed" signal > > 2. Within the callback, I try immediately to get the ip address inside > the > > dhcp4 config. > > 3. If I get it I am done, otherwise it is undefined and I simply > register a > > callback on the dhcp4 options signal that hopefully will arrive later. > > > > I tested it with several configuration and it seems to work correctly. > > Getting the IP address through the DHCP4 config won't give you user > overrides, secondary IP addresses, or static IP configurations though. > This still sounds like a bug in NM or libnm-glib, and if you still have > the logs from dbus-monitor I'd like to take a look. > > Thanks! > Dan > > > Thank you so much, > > > > Sylvain > > > > > > On Wed, Mar 18, 2015 at 3:44 PM, Dan Williams wrote: > > > > > On Sun, 2015-03-15 at 12:46 +0100, Sylvain Garaud wrote: > > > > Hello, > > > > > > > > I am writing a small javascript for gnome to grab the ip addresses > of my > > > > network interfaces using imports.gi.NMClient; > > > > Basically I get the devices and connect each device to the > > > > notify::ip4-config signal to be able to update the ip address value > when > > > it > > > > changes > > > > > > Which version of NM are you using? > > > > > > this.client = NMC.Client.new(); > > > > this.devices = this.client.get_devices(); > > > > for each (let device in this.devices) { > > > > > device.connect('notify::ip4-config',Lang.bind(this,this._update)); > > > > } > > > > > > > > It works fine for the wifi connection but there is a problem with the > > > > ethernet connection. > > > > After turning my ethernet connection up, the signal > 'notify::ip4-config' > > > > is fired, the device state is ACTIVATED, so I try to get the ip4 > config. > > > > with ipcfg = device.get_ip4_config(); > > > > I get a not null ipcfg object, unfortunately ipcfg.get_addresses() > is not > > > > defined yet. > > > > > > So that we can narrow the issue down, could you run: > > > > > > dbus-monitor --system > > > "type='signal',sender='org.freedesktop.NetworkManager'" > > > > > > and reproduce the problem? This will let us know the sequence of D-BUs > > > events that come directly from NetworkManager, so that we can see the > > > raw data that libnm/libnm-glib is getting. > > > > > > Dan > > > > > > > > I see in my journalctl log few seconds later, some dhcp network > manager > > > > message. > > > > > > > > _update: function(device) { > > > > let ipcfg = device.get_ip4_config(); > > > > if (ipcfg != null) { > > > > for each(let addr in ipcfg.get_addresses()){ > > > > let num = addr.get_address(); > > > > } > > > > } > > > >}, > > > > > > > > How to be sure ipcfg.get_addresses() will return something ? > > > > Could someone tell me which signal to use for being sure the ip > address > > > is > > > > set when calling ipcfg.get_addresses()? I tried using the > > > > 'notify::dhcp4-config' signal instead 'notify::ip4-config' without > much > > > > success. > > > > > > > > Thank you very much for your help, > > > > > > > > Sylvain > > > > ___ > > > > networkmanager-list mailing list > > > > networkmanager-list@gnome.org > > > > https://mail.gnome.org/mailman/listinfo/networkmanager-list > > > > > > > > > > >