You are not logged in.

#1 2013-03-28 16:55:02

ilikepie
Member
Registered: 2009-10-28
Posts: 38

noip2 can't get my IP when run automatically after booting

I'm trying to set up a VPN and I use the noip.com service. I use the "noip" package to update my hosts.

If I run it manually with systemctl start noip2, it works fine and my host is updated properly.

If I set it to be run after booting with systemctl enable noip2, it doesn't work and gets caught in an endless loop that looks like this:

Mar 28 19:44:07 eee systemd[1]: Started No-IP Dynamic DNS Update Client.
Mar 28 19:44:07 eee noip2[154]: v2.1.9 daemon started with NAT enabled
Mar 28 19:44:07 eee noip2[154]: Can't gethostbyname for dynupdate.no-ip.com
Mar 28 19:44:07 eee noip2[154]: Can't get our visible IP address from ip1.dynupdate.no-ip.com
Mar 28 19:49:07 eee noip2[154]: Can't gethostbyname for dynupdate.no-ip.com
Mar 28 19:49:07 eee noip2[154]: Can't get our visible IP address from ip1.dynupdate.no-ip.com

I suspect this is because the network isn't ready by the time the noip2 service is launched, so it can't resolve the updater domain name. However, I don't understand why, after five minutes, it still can't resolve this domain name. I can ping it just fine.

Any ideas are more than welcome smile

Offline

#2 2013-03-29 04:34:10

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: noip2 can't get my IP when run automatically after booting

Okay, so how are you starting your internets?  Is it with a wired conenction, or wireless?  Netcfg, dhcpcd, NetworkManager, wicd, do you send carrier pidgeons back and forth? 

If it requires that you have an active connection when it starts, maybe you should try using NetworkManager's service that waits until it is online before it notifies (creatively named NetworkManager-wait-online.service).  I think that what this does is it delays the completion of the network.target until after this service starts.  So if you have noip.service be "After=network.target" then the IP should be resolved and ready to go.

Offline

#3 2013-03-29 21:05:24

ilikepie
Member
Registered: 2009-10-28
Posts: 38

Re: noip2 can't get my IP when run automatically after booting

It's with a wired connection, dhcpcd.

"After=network.target" is already set. I'm going to try "After=dhcpcd.target" too.

What I don't understand though, is that it still doesn't work when the network is up. I understand that it fails the first time, but after five minutes have passed, the network is perfectly working and yet noip2 is still choking on the resolve.

EDIT: "After=dhcpcd.target" doesn't seem to help either

Last edited by ilikepie (2013-03-29 21:37:14)

Offline

#4 2013-03-30 01:30:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: noip2 can't get my IP when run automatically after booting

Because there is no dhcpcd.target.  It is dhcpcd.service.

Offline

#5 2013-03-30 13:46:37

ilikepie
Member
Registered: 2009-10-28
Posts: 38

Re: noip2 can't get my IP when run automatically after booting

No dice with "After=dhcpcd.service" either...

Offline

#6 2013-03-31 19:20:54

ilikepie
Member
Registered: 2009-10-28
Posts: 38

Re: noip2 can't get my IP when run automatically after booting

I think the problem wasn't the way I configured my system after all, but rather that noip2 is sort of dumb. I've started using "inadyn-fork-git" instead of noip2 and it works perfectly. It also copes well with temporary network loss, which is great.

Last edited by ilikepie (2013-03-31 19:21:16)

Offline

#7 2013-03-31 19:49:23

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: noip2 can't get my IP when run automatically after booting

That is interesting because I have never had an issue with noip2.service.  But why did you have to go and mention something better?  Now I am curious, and definitely the type to think, "If it ain't broke... I'm gonna tweak it 'til it is!"

Offline

Board footer

Powered by FluxBB