noip2.service fails on startup, works if manually launched

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

noip2.service fails on startup, works if manually launched

Postby doragasu1 » Mon Jun 15, 2015 6:53 am

I'm having a problem with noip2 and my RPi 2. I have installed the service using AUR, then configured and enabled it. Everything works perfect if I manually start the service, but when the Pi boots, it fails to resolve the DNS of the update service. And it continues failing each time until I manually restart it:

$this->bbcode_second_pass_code('', '# systemctl status noip2
● noip2.service - No-IP Dynamic DNS Update Client
Loaded: loaded (/usr/lib/systemd/system/noip2.service; enabled; vendor preset: disabled)
Active: active (running) since lun 2015-06-15 08:37:08 CEST; 3min 1s ago
Process: 202 ExecStart=/usr/bin/noip2 -c /etc/no-ip2.conf (code=exited, status=0/SUCCESS)
Main PID: 206 (noip2)
CGroup: /system.slice/noip2.service
└─206 /usr/bin/noip2 -c /etc/no-ip2.conf

jun 15 08:37:08 iori-rpi2 systemd[1]: Starting No-IP Dynamic DNS Update Client...
jun 15 08:37:08 iori-rpi2 noip2[206]: v2.1.9 daemon started with NAT enabled
jun 15 08:37:08 iori-rpi2 systemd[1]: Started No-IP Dynamic DNS Update Client.
jun 15 08:37:08 iori-rpi2 noip2[206]: Can't gethostbyname for dynupdate.no-ip.com
jun 15 08:37:08 iori-rpi2 noip2[206]: Can't get our visible IP address from ip1.dynupdate.no-ip.com
# systemctl restart noip2
# systemctl status noip2
● noip2.service - No-IP Dynamic DNS Update Client
Loaded: loaded (/usr/lib/systemd/system/noip2.service; enabled; vendor preset: disabled)
Active: active (running) since lun 2015-06-15 08:40:36 CEST; 15s ago
Process: 278 ExecStart=/usr/bin/noip2 -c /etc/no-ip2.conf (code=exited, status=0/SUCCESS)
Main PID: 279 (noip2)
CGroup: /system.slice/noip2.service
└─279 /usr/bin/noip2 -c /etc/no-ip2.conf

jun 15 08:40:36 iori-rpi2 systemd[1]: Starting No-IP Dynamic DNS Update Client...
jun 15 08:40:36 iori-rpi2 noip2[279]: v2.1.9 daemon started with NAT enabled
jun 15 08:40:36 iori-rpi2 systemd[1]: Started No-IP Dynamic DNS Update Client.
jun 15 08:40:36 iori-rpi2 noip2[279]: *****.***.com was already set to ***.***.***.***.')

Network is wired (eth0), with static IP. /etc/resolv.conf has the two nameservers provided by my ISP, and also tested adding nameserver 8.8.8.8 without luck. /etc/hosts has these contents (rpi is my other raspberry pi):

$this->bbcode_second_pass_code('', '127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
192.168.1.31 rpi rpi ')


I'm out of ideas. Any suggestions?
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: noip2.service fails on startup, works if manually launch

Postby sdjf » Sun Jun 28, 2015 8:08 pm

If you log in anyways when you reboot, you could put a test in your .bashrc for whether your IP is known, and put a line in that restarts it, if it is not. I would put the test in so that if you open another tab in bash, it won't bother to try to restart it unnecessarily.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: noip2.service fails on startup, works if manually launch

Postby WarheadsSE » Mon Jun 29, 2015 3:10 pm

This should depends on network-online.target.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: noip2.service fails on startup, works if manually launch

Postby doragasu1 » Tue Jun 30, 2015 6:56 pm

@sdjf: Thanks for your suggestion, but lots of times I do not log in after reboot. So that doesn't solve the problem.

@WarheadsSE: Tried changing the dependency to "After=network-online.target" in "/usr/systemd/system/noip2.service". Unfortunately that doesn't help. I don't know what's causing the problem, but it's really strange.

Is there a target on systemd for the resolver?
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: noip2.service fails on startup, works if manually launch

Postby doragasu1 » Tue Jun 30, 2015 7:34 pm

Some more data. Dunno why, noip was starting much earlier than systemd-networkd.service
$this->bbcode_second_pass_code('', '$ systemd-analyze blame
7.271s httpd.service
6.691s systemd-journal-flush.service
4.533s mysqld.service
2.676s dev-mmcblk0p2.device
2.305s systemd-journald.service
1.166s systemd-modules-load.service
461ms systemd-udev-trigger.service
423ms tmp.mount
395ms kmod-static-nodes.service
395ms systemd-remount-fs.service
338ms sys-kernel-debug.mount
337ms dev-mqueue.mount
327ms systemd-networkd.service
308ms systemd-user-sessions.service
273ms systemd-logind.service
268ms systemd-resolved.service
258ms systemd-tmpfiles-setup-dev.service
256ms systemd-vconsole-setup.service
245ms systemd-udevd.service
216ms media-hdd1.mount
202ms user@1000.service
150ms systemd-timesyncd.service
128ms boot.mount
127ms noip2.service
126ms systemd-update-utmp.service
122ms systemd-sysctl.service
69ms systemd-tmpfiles-setup.service
55ms systemd-random-seed.service
34ms sys-kernel-config.mount')

Tried adding "Requires=systemd-networkd.service" to noip2.service, and now it's starting after systemd-networkd, but it is still not working until manually restarted.
$this->bbcode_second_pass_code('', '$ systemd-analyze blame
8.746s httpd.service
6.965s systemd-journal-flush.service
4.309s mysqld.service
2.756s dev-mmcblk0p2.device
2.383s systemd-journald.service
1.144s systemd-modules-load.service
846ms systemd-logind.service
732ms noip2.service
720ms systemd-user-sessions.service
572ms user@1000.service
538ms systemd-udev-trigger.service
497ms systemd-remount-fs.service
475ms kmod-static-nodes.service
338ms tmp.mount
327ms systemd-networkd.service
263ms systemd-tmpfiles-setup-dev.service
259ms dev-mqueue.mount
248ms systemd-udevd.service
200ms systemd-vconsole-setup.service
178ms media-hdd1.mount
163ms sys-kernel-debug.mount
155ms systemd-timesyncd.service
150ms systemd-update-utmp.service
143ms systemd-resolved.service
131ms boot.mount
110ms systemd-sysctl.service
81ms systemd-random-seed.service
69ms systemd-tmpfiles-setup.service
29ms sys-kernel-config.mount')

Available targets are:

$this->bbcode_second_pass_code('', '$ systemctl list-units --type=target
UNIT LOAD ACTIVE SUB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
getty.target loaded active active Login Prompts
graphical.target loaded active active Graphical Interface
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User System
network.target loaded active active Network
paths.target loaded active active Paths
remote-fs.target loaded active active Remote File Systems
slices.target loaded active active Slices
sockets.target loaded active active Sockets
sound.target loaded active active Sound Card
swap.target loaded active active Swap
sysinit.target loaded active active System Initialization
time-sync.target loaded active active System Time Synchronized
timers.target loaded active active Timers')
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: noip2.service fails on startup, works if manually launch

Postby WarheadsSE » Tue Jun 30, 2015 8:08 pm

after & requires
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 9 guests