You are not logged in.

#1 2013-01-20 06:16:58

developej
Member
Registered: 2011-10-02
Posts: 68

[SOLVED] no-ip2 service fails to update ip

Hey,

Here is some info from my system:

/etc ⮀systemctl status noip2.service
noip2.service - No-IP Dynamic DNS Update Client
      Loaded: loaded (/usr/lib/systemd/system/noip2.service; enabled)
      Active: active (running) since Sat 2013-01-19 10:49:21 CET; 10h ago
     Process: 397 ExecStart=/usr/bin/noip2 -c /etc/no-ip2.conf (code=exited, status=0/SUCCESS)
    Main PID: 399 (noip2)
      CGroup: name=systemd:/system/noip2.service
          └─399 /usr/bin/noip2 -c /etc/no-ip2.conf
__________________________________________________

/etc ⮀ l | grep no-ip2
-rw-r--r--  1 root root  152 Dec 30 21:30 no-ip2.conf
__________________________________________________

So my service is running, but i don't get my ip updated...

I found this topic - https://bbs.archlinux.org/viewtopic.php … 3#p1134203
but I don't know what does "run noip2 -C as root" means...all I did was enable the service, so "I" don't run anything...do I need to configure the service somehow?
Are permissions for the no-ip2.conf ok?

Thanks,
developej

Last edited by developej (2013-02-24 07:49:24)

Offline

#2 2013-01-20 06:25:27

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

Re: [SOLVED] no-ip2 service fails to update ip

Well, you need to tell the client about your login info.  So before you run the service you need to configure it, right?  This is what the -C flag is for.  So run that to configure it, then start the service.  Like most things on your Arch system, it does not read your mind or try to configure things for you.

Offline

#3 2013-01-20 06:40:16

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

I did configure it, and it updates fine when I start noip2 manually. It just does not do auto ip update.

Last edited by developej (2013-01-20 06:41:46)

Offline

#4 2013-01-20 06:47:35

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

Re: [SOLVED] no-ip2 service fails to update ip

See, this is something you should have mentioned in the first post.  In fact, you actually made it seem as though you didn't understand why you needed up configure it.

But I just checked and the permissions on /etc/no-ip2.conf should be like so

-rw------- 1 root root 152 Nov 26 21:32 /etc/no-ip2.conf

Edit: 600 if you want to use an octal.

Last edited by WonderWoofy (2013-01-20 06:48:19)

Offline

#5 2013-01-20 07:25:29

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

It was 600, but didn.t work either, so I followed tips from the thread I linked and changed it to 644. But it didn't help.
Anyway, I rerun noip2 -C, this time with sudo (don't remember if I used sudo the first time), will see how that goes...

Offline

#6 2013-02-02 19:39:38

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

I still don't get ip update...

⮀systemctl status noip2.service
noip2.service - No-IP Dynamic DNS Update Client
	  Loaded: loaded (/usr/lib/systemd/system/noip2.service; enabled)
	  Active: active (running) since Sat 2013-02-02 22:34:24 CET
	 Process: 590 ExecStart=/usr/bin/noip2 -c /etc/no-ip2.conf (code=exited, status=0/SUCCESS)
	Main PID: 600 (noip2)
	  CGroup: name=systemd:/system/noip2.service
		  └─600 /usr/bin/noip2 -c /etc/no-ip2.conf
/etc ⮀ l | grep no-ip
-rw-r--r--  1 root root  152 Jan 20 07:42 no-ip2.conf

(it was 600, still didn't update, so I changed it to 644 (found that in another thread), rebooted my laptop, still nothing)

Ideas?

Last edited by developej (2013-02-02 21:13:39)

Offline

#7 2013-02-08 17:58:25

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

bump
still don't know what is wrong...

Offline

#8 2013-02-16 10:24:34

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

while googling i found that tcp 8245 needs to be forwarded for noip client (is this really needed?), but forwarding it didn't help either...i'm sure it's something stupid, probably permissions related, but i can't find out what.
any ideas are welcome

thanks

Offline

#9 2013-02-16 11:00:42

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] no-ip2 service fails to update ip

Does it autoupdate when you start noip2 manually and leave it running? Run noip2 with -d to see what it's doing; perhaps use -U to modify the update interval (you can modify the service file to use those options).

Last edited by lucke (2013-02-16 11:01:01)

Offline

#10 2013-02-16 11:17:16

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

it does update if i start it manualy. i do have to use sudo, without it says:

⮀ noip2 -d
Can't locate configuration file /etc/no-ip2.conf. (Try -c). Ending!
⮀ l /etc | grep no-ip2
-rw-------  1 root root  136 Feb 15 13:16 no-ip2.conf

i am a noob kinda, so this may be a stupid question - is it possible that the noip2 service itself can't access the config file?
thanks

edit: i left the terminal open (the one where i ran sudo noip2 -d) and it updates every 5 minutes. need to fix that service!

Last edited by developej (2013-02-16 11:23:41)

Offline

#11 2013-02-16 12:08:36

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] no-ip2 service fails to update ip

It seems the service file runs noip2 as user "nobody" - the config file would need to have e.g. 644 permissions to be read (but you said you had tried 644). You can edit /usr/lib/systemd/system/noip2.service, append -d to the command there, run "systemctl reenable noip2; systemctl restart noip2" and see its debugging output in "systemctl status noip2" or "journalctl -u noip2". See what it shows with 644 and 600 permissions.

Last edited by lucke (2013-02-16 12:08:53)

Offline

#12 2013-02-16 13:10:47

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

it does run as nobody:

⮀ ps -aux | grep noip2
nobody    3492  0.0  0.0  10580   844 ?        Ss   14:03   0:00 /usr/bin/noip2 -d -c /etc/no-ip2.conf

i added the -d as it shows, but i don't know where should i (and how exactly) type journalctl command?
anyway, here is the systemctl status:

⮀ systemctl status noip2.service
noip2.service - No-IP Dynamic DNS Update Client
	  Loaded: loaded (/usr/lib/systemd/system/noip2.service; enabled)
	  Active: active (running) since Sat 2013-02-16 14:03:38 CET; 4min 50s ago
	 Process: 3491 ExecStart=/usr/bin/noip2 -d -c /etc/no-ip2.conf (code=exited, status=0/SUCCESS)
	Main PID: 3492 (noip2)
	  CGroup: name=systemd:/system/noip2.service
		  └─3492 /usr/bin/noip2 -d -c /etc/no-ip2.conf

Offline

#13 2013-02-16 14:55:47

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] no-ip2 service fails to update ip

https://wiki.archlinux.org/index.php/Systemd#Journal

You should see the last entries from the journal pertaining to a given service in the output of the status command.

Offline

#14 2013-02-16 17:40:18

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

well, i rerun noip2 configure, entered username and pw (like i did 3 times before), left the default time of 30 minutes
then i changed permissions before starting the service (of /etc/no-ip2.conf) to 644
started the service and here is what the journal is saying:

Feb 16 18:03:42 **** noip2[3491]: > GET http://ip1.dynupdate.no-ip.com/ HTTP/1.0
Feb 16 18:03:42 **** noip2[3491]: > User-Agent: Linux-DUC/2.1.9
Feb 16 18:03:42 **** noip2[3491]: >
Feb 16 18:03:43 **** noip2[3491]: < HTTP/1.1 200 OK
Feb 16 18:03:43 **** noip2[3491]: < Date: Sat, 16 Feb 2013 17:03:42 GMT
Feb 16 18:03:43 **** noip2[3491]: < Server: Apache/2
Feb 16 18:03:43 **** noip2[3491]: < Content-Length: 14
Feb 16 18:03:43 **** noip2[3491]: < Connection: close
Feb 16 18:03:43 **** noip2[3491]: < Content-Type: text/html; charset=UTF-8
Feb 16 18:03:43 **** noip2[3491]: <
Feb 16 18:03:43 **** noip2[3491]: < **.***.***.***
Feb 16 18:03:43 **** noip2[3491]: ! Our NAT IP address is **.***.***.***
Feb 16 18:03:43 **** noip2[3491]: ! Last_IP_Addr = **.***.***.***, IP = **.***.***.***
Feb 16 18:33:43 **** noip2[3491]: > GET http://ip1.dynupdate.no-ip.com/ HTTP/1.0
Feb 16 18:33:43 **** noip2[3491]: > User-Agent: Linux-DUC/2.1.9
Feb 16 18:33:43 **** noip2[3491]: >
Feb 16 18:33:43 **** noip2[3491]: < HTTP/1.1 200 OK
Feb 16 18:33:43 **** noip2[3491]: < Date: Sat, 16 Feb 2013 17:33:43 GMT
Feb 16 18:33:43 **** noip2[3491]: < Server: Apache/2
Feb 16 18:33:43 **** noip2[3491]: < Content-Length: 14
Feb 16 18:33:43 **** noip2[3491]: < Connection: close
Feb 16 18:33:43 **** noip2[3491]: < Content-Type: text/html; charset=UTF-8
Feb 16 18:33:43 **** noip2[3491]: <
Feb 16 18:33:43 **** noip2[3491]: < **.***.***.***
Feb 16 18:33:43 **** noip2[3491]: ! Our NAT IP address is **.***.***.***
Feb 16 18:33:43 **** noip2[3491]: ! Last_IP_Addr = **.***.***.***, IP = **.***.***.***

it looks fine...i just don't know what got it fixed (if it is really fixed, will see how it goes with time)

thanks for your help, lucke

Offline

#15 2013-02-23 13:59:44

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

and here i come again...
my laptop was at home these days, with the same ip (code from the previous post shows that the noip2 daemon didn't complain)

and here is journalctl -u noip2 from today

Feb 23 13:47:20 wslap noip2[450]: < HTTP/1.1 200 OK
Feb 23 13:47:20 wslap noip2[450]: < Date: Sat, 23 Feb 2013 12:47:20 GMT
Feb 23 13:47:20 wslap noip2[450]: < Server: Apache/2
Feb 23 13:47:20 wslap noip2[450]: < Content-Length: 14
Feb 23 13:47:20 wslap noip2[450]: < Connection: close
Feb 23 13:47:20 wslap noip2[450]: < Content-Type: text/html; charset=UTF-8
Feb 23 13:47:20 wslap noip2[450]: <
Feb 23 13:47:20 wslap noip2[450]: < **.***.***.***
Feb 23 13:47:20 wslap noip2[450]: ! Our NAT IP address is **.***.***.***
Feb 23 13:47:20 wslap noip2[450]: ! Last_IP_Addr = **.***.***.***, IP = **.***.***.***
Feb 23 13:53:01 wslap noip2[450]: Read-only file '/etc/no-ip2.conf' prevents saving Last_IP_Addr **.***.***.***

why do i get this last line today? it didn't complain earlier, so why now? also, what would be my course of action now - changing the permissions of no-ip2.conf even though so many people use it with the same 644 permissions or maybe something else?

then i left home with laptop, got on another wireless and here's the output of journalctl -u noip2

-- Reboot --
Feb 23 16:42:57 wslap noip2[420]: v2.1.9 daemon started with NAT enabled
Feb 23 16:42:58 wslap noip2[417]: Can't gethostbyname for dynupdate.no-ip.com
Feb 23 16:42:58 wslap noip2[417]: Can't get our visible IP address from ip1.dynupdate.no-ip.com
Feb 23 16:42:58 wslap noip2[417]: ! Last_IP_Addr = 0.0.0.0, IP =

so this is on another wireless...i have no idea what this is...

thanks

Last edited by developej (2013-02-23 14:13:38)

Offline

#16 2013-02-23 16:01:19

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED] no-ip2 service fails to update ip

I was getting those read-only errors too. And it was apparently reading the config file when user nobody had no rights to read it.

-edit-

It starts as root, reads the config and changes to nobody. The section of the code responsible for saving looks dubious to me, but I'm not a programmer. The gethostbyname error might be a result of a non-working dns,

You might also try ddclient or inadyn.

Last edited by lucke (2013-02-23 16:28:52)

Offline

#17 2013-02-24 07:48:47

developej
Member
Registered: 2011-10-02
Posts: 68

Re: [SOLVED] no-ip2 service fails to update ip

ok, I came back home and it automatically updated ip.
so the service is working, maybe that other wifi ap somehow blocked the service...
anyway, I will mark this as solved. although i don't even know what was the problem and what fixed it smile

Offline

#18 2015-07-01 09:52:09

ertehbasi
Member
Registered: 2015-07-01
Posts: 1

Re: [SOLVED] no-ip2 service fails to update ip

Hello All,
I just want to share my systemd configuration. The daemon now automatically start noip2 service and also succesfully updated the IP address. I initially having issue similar with developej, and I found that I need to add this:

After=network.target systemd-resolved.service

to my noip2.service file.

Here's the full configuration that I use.

[Unit]
Description=noip2
After=network.target systemd-resolved.service

[Service]
Type=forking
TimeoutStartSec=30
ExecStart=/usr/bin/noip2 -d -c /etc/no-ip2.conf
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

Offline

#19 2015-07-01 17:20:59

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,784
Website

Re: [SOLVED] no-ip2 service fails to update ip

Thank you for sharing that, ertehbasi, but two year old threads are not the best place to share this information -- the wiki is a much better place.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB