Re: [opensuse] ddclient error
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Content-ID: <alpine.LNX.2.00.1308280143130.9215@minas-tirith.valinor> El 2013-08-28 a las 06:54 +0800, George Olson (SUSE list) escribió:
On 08/28/2013 06:02 AM, Carlos E. R. wrote:
You forgot to email to the list :-)
I have a trigger set on the router log; a script runs, and the IP is logged. I could use it to trigger a dynamic dns update if I used the service.
That sounds like a great idea, but I wouldn't know how to set up a router log or how to trigger it. Can you point me in the right direction to figure that out?
I'm not at home, so I can't look up the details. The idea is as follows: First, you configure the router to send the log to the computer. Many can do that, but some can not. If yours can't, then this can not be done. You have to detect if the router logs a certain message when it loses the connection and reconnects, or if the IP changes. Some even write the new IP to the log, which is fantastic. Then, you configure the syslog daemon to accept those messages and write them to a file. How to do that depends on which syslog daemon you have, because openSUSE has set different ones by default on each release. Next step is to make the syslog daemon detect a certain message pattern on the log; this is normally quite easy. Typical actions are to save that entry to a file or not to; but you can also trigger a call to an external command: that's what we are looking for. Well, the idea is precisely to trigger an script when the router sends the message that it is recovering the connection... if the message contains the IP, good; if not, a simple call to links to a certain web page that answers with the IP, and some trickery with sed, and you have the IP. I can fill the details probably this Thursday. And, in case this fails, have cron obtain the IP every... 8 hours? And at boot. - -- Cheers Carlos E. R. (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iF4EAREIAAYFAlIdObkACgkQja8UbcUWM1zhWAD/Yq0Mag2u54Tlg+k/6AP6ntdo DUi7xf62UCnFtCxKWooA/AlJnWxUayWnBawvgMo85fW2AxeRCCBew1aVtbojpCE0 =kWKL -----END PGP SIGNATURE-----
I won't be able to get back on this for a couple of weeks, as I have a trip coming up that I have to prepare for. But before I go, I now have a new problem. I have disabled ddclient as a service on my server, as you can see below: ------------- # systemctl status ddclient.service ddclient.service - LSB: ddclient a daemon to update dynamic DNS entries Loaded: loaded (/etc/init.d/ddclient) Active: inactive (dead) since Wed, 2013-08-28 13:36:14 PHT; 5h 1min ago Process: 10185 ExecStop=/etc/init.d/ddclient stop (code=exited, status=0/SUCCESS) Process: 306 ExecStart=/etc/init.d/ddclient start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/ddclient.service Aug 28 09:20:34 tribaltrekker.site ddclient[6972]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 09:50:47 tribaltrekker.site ddclient[7185]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 10:31:03 tribaltrekker.site ddclient[7488]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 11:31:31 tribaltrekker.site ddclient[7918]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 12:01:42 tribaltrekker.site ddclient[8608]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 13:27:14 tribaltrekker.site ddclient[10042]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 13:32:17 tribaltrekker.site ddclient[10126]: WARNING: REPLIED: HTTP/1.1 200 OK Aug 28 13:36:14 tribaltrekker.site systemd[1]: Stopping LSB: ddclient a daemon to update dynamic DNS entries... Aug 28 13:36:14 tribaltrekker.site ddclient[10185]: Shutting down ddclient daemon :..done Aug 28 13:36:14 tribaltrekker.site systemd[1]: Stopped LSB: ddclient a daemon to update dynamic DNS entries. ------------------ HOwever, I am still getting system mail that says it hasn't updated the dynamic dns, like this: ------------------
From root@tribaltrekker.site Wed Aug 28 18:35:48 2013 Return-Path: <root@tribaltrekker.site> X-Original-To: root Delivered-To: root@tribaltrekker.site Received: by tribaltrekker.site (Postfix, from userid 0) id 9499E65F8D; Wed, 28 Aug 2013 18:35:48 +0800 (PHT) To: root@tribaltrekker.site Subject: status report from ddclient@tribaltrekker.site Message-Id: <20130828103548.9499E65F8D@tribaltrekker.site> Date: Wed, 28 Aug 2013 18:35:48 +0800 (PHT) From: root@tribaltrekker.site (root)
WARNING: SENT: https://freedns.afraid.org/dynamic/update.php?MmNWYUQ2eDhrTUU1cDdYOFd4Zkk6MT... WARNING: REPLIED: HTTP/1.1 200 OK WARNING: Server: nginx WARNING: Date: Wed, 28 Aug 2013 10:36:04 GMT WARNING: Content-Type: text/plain WARNING: Content-Length: 46 WARNING: Connection: close WARNING: Vary: Accept-Encoding WARNING: WARNING: ERROR: Address MY.ROUTER.IP.ADDRESS has not changed. FAILED: updating MYDOMAIN.com: Invalid reply. regards, ddclient@tribaltrekker.site (version 3.8.1) ------------------ As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running? -- George Olson Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribió: ...
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running?
Probably because it is a cron job, and that job does not look to check that the service is down. As a quick hack, find that job and comment it out. Later, recode it. - -- Cheers Carlos E. R. (from 11.4, with Evergreen, x86_64 "Celadon" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iF4EAREIAAYFAlId3tAACgkQja8UbcUWM1xXFgD/VpcT29xRpGx1yFVmYc/nuDgW V7iRbHInQunAee+PbFwA/2JJkR4/Uyg1dXrTrz5DyUJg+rf46KHFQL5L+zQ9upjP =GnQ7 -----END PGP SIGNATURE-----
On 08/28/2013 07:28 PM, Carlos E. R. wrote:
El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribió:
...
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running?
Probably because it is a cron job, and that job does not look to check that the service is down.
As a quick hack, find that job and comment it out. Later, recode it.
Ok, I am looking in my folders... /etc/cron.d is empty /etc/cron/daily has several files, but the log error is happening every 10 minutes. Where would be the file that shows that a cron job is running as some kind of service? I don't know which file to edit in order to comment that out. -- George Olson Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* George Olson (SUSE list) <grglsn765@gmail.com> [08-28-13 20:13]:
On 08/28/2013 07:28 PM, Carlos E. R. wrote:
El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribió:
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running?
Probably because it is a cron job, and that job does not look to check that the service is down.
As a quick hack, find that job and comment it out. Later, recode it.
Ok, I am looking in my folders...
/etc/cron.d is empty /etc/cron/daily has several files, but the log error is happening every 10 minutes.
Where would be the file that shows that a cron job is running as some kind of service? I don't know which file to edit in order to comment that out.
ls -lad /etc/cron* will give you a list of possible locations. or maybe: grep -r ddclient /etc/cron* also try: crontab -l |grep ddclient and do the same as root -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/29/2013 08:40 AM, Patrick Shanahan wrote:
* George Olson (SUSE list) <grglsn765@gmail.com> [08-28-13 20:13]:
On 08/28/2013 07:28 PM, Carlos E. R. wrote:
El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribió:
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running? Probably because it is a cron job, and that job does not look to check that the service is down.
As a quick hack, find that job and comment it out. Later, recode it.
Ok, I am looking in my folders...
/etc/cron.d is empty /etc/cron/daily has several files, but the log error is happening every 10 minutes.
Where would be the file that shows that a cron job is running as some kind of service? I don't know which file to edit in order to comment that out. ls -lad /etc/cron* None of these files had any reference to ddclient will give you a list of possible locations.
or maybe: grep -r ddclient /etc/cron* sudo grep -r ddclient /etc/cron*
nothing returned
also try: crontab -l |grep ddclient and do the same as root
crontab -l | grep ddclient no crontab for george
If it is a cron job, it is not running in any of the normal cron files. This makes me think that ddclient is still running, even though systemd says it is not. But that's not possible, is it? If not, what else could be continuing to send the emails saying that it failed to update the ip address? It says it is from root@tribaltrekker.site. Tribaltrekker is my hostname on my pc. -- George Olson Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-08-29 at 14:04 +0800, George Olson (SUSE list) wrote:
that out. ls -lad /etc/cron* None of these files had any reference to ddclient will give you a list of possible locations.
/etc/cron.d/* is where I would place it.
or maybe: grep -r ddclient /etc/cron* sudo grep -r ddclient /etc/cron*
nothing returned
also try: crontab -l |grep ddclient and do the same as root
crontab -l | grep ddclient no crontab for george
You have to look at the one for root.
If it is a cron job, it is not running in any of the normal cron files. This makes me think that ddclient is still running, even though systemd says it is not. But that's not possible, is it? If not, what else could be continuing to send the emails saying that it failed to update the ip address? It says it is from root@tribaltrekker.site. Tribaltrekker is my hostname on my pc.
Have a look at the entire list of processes, looking for candidates. A script can be waiting iddle for 5 minutes and run again. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIfAb4ACgkQtTMYHG2NR9VC+wCeMD4l6lUYiHNM9DAu3te3l+Ss 8bcAn2e1UHpRFdHJFtyUGi5TxRHnVvs7 =g1Tr -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/29/2013 04:09 PM, Carlos E. R. wrote:
Have a look at the entire list of processes, looking for candidates. A script can be waiting iddle for 5 minutes and run again.
Ok, I found out that ddclient was still running, even though the service was dead in systemd. I tested it by going to /etc/ddclient.conf and changing the time check to 3600 sec, and then it turned out that the next system mail I got was an hour later. So then I did what you suggested and checked the processes, and this is what I found out: # ps ax | grep ddclient 3954 pts/0 S+ 0:00 grep --color=auto ddclient 28634 ? S 0:04 ddclient - sleeping for 3460 second 28684 ? S 0:04 ddclient - sleeping for 3460 second It was counting down the 1 hour timer that I set in the configuration file and running it. So, I killed the processes, and it is stopped. But the question I have is, when the service is stopped in systemd, should the process not be stopped also? I did not expect to have to go and kill the process. Should I file a bug report? Or is this normal behavior? Thanks for your help. -- George Olson Box #1: 12.3 | KDE 4.10 | AMD Phenom IIX4 | 64 | ATI Radeon HD 3300 | 16GB Box #2: 12.2 | KDE 4.9.2 | AMD Athlon X3 | 64 | nVidia C61 GeForce 7025 | 4GB Laptop: 12.3 | KDE 4.10 | Core i7-2620M | 64 | Intel HD Graphics 3000 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-08-29 at 16:22 +0800, George Olson (SUSE list) wrote:
But the question I have is, when the service is stopped in systemd, should the process not be stopped also? I did not expect to have to go and kill the process. Should I file a bug report? Or is this normal behavior?
It should stop, yes. I think it is a bug. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIf3Q8ACgkQtTMYHG2NR9VVtwCcDUwDxJkMBqwH/HdeYiNxwzQB 8XUAn3+ciV6YVLVgWAOd8kEzMSZjoBrr =Dsjy -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 8/28/2013 11:04 PM, George Olson (SUSE list) wrote:
On 08/29/2013 08:40 AM, Patrick Shanahan wrote:
* George Olson (SUSE list) <grglsn765@gmail.com> [08-28-13 20:13]:
On 08/28/2013 07:28 PM, Carlos E. R. wrote:
El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribi�:
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running? Probably because it is a cron job, and that job does not look to check that the service is down.
As a quick hack, find that job and comment it out. Later, recode it.
Ok, I am looking in my folders...
/etc/cron.d is empty /etc/cron/daily has several files, but the log error is happening every 10 minutes.
Where would be the file that shows that a cron job is running as some kind of service? I don't know which file to edit in order to comment that out. ls -lad /etc/cron* None of these files had any reference to ddclient will give you a list of possible locations.
or maybe: grep -r ddclient /etc/cron* sudo grep -r ddclient /etc/cron*
nothing returned
also try: crontab -l |grep ddclient and do the same as root
crontab -l | grep ddclient no crontab for george
Guys, ddclient hooks dhcpc so that it doesn't need a cron job. It wakes up and updates when your ip changes, and it you want it to do it any other time (why?) you can just touch /var/cache/ddclient/ddclient.cache -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2013-08-29 at 10:15 -0700, John Andersen wrote:
Guys, ddclient hooks dhcpc so that it doesn't need a cron job. It wakes up and updates when your ip changes, and it you want it to do it any other time (why?) you can just touch /var/cache/ddclient/ddclient.cache
The computer IP does not change at all, it is the external IP on the router which changes. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIf3McACgkQtTMYHG2NR9UbpQCfc1vmacUl+yBMtGI5488xhAnR pIEAn0lKVUiWD5csa2Y8YLTMH7vaP18d =KMr8 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
George Olson (SUSE list) [29.08.2013 08:04]:
On 08/29/2013 08:40 AM, Patrick Shanahan wrote:
* George Olson (SUSE list) <grglsn765@gmail.com> [08-28-13 20:13]:
On 08/28/2013 07:28 PM, Carlos E. R. wrote:
El 2013-08-28 a las 18:50 +0800, George Olson (SUSE list) escribió:
As you can see from the time stamps, the time that this email came was 5 hours after I turned off ddclient.service, and it has been doing this every 10 minutes (the time I set the update frequency to earlier long before I disabled the service). Why is it still sending these emails if the service is no longer running? Probably because it is a cron job, and that job does not look to check that the service is down.
As a quick hack, find that job and comment it out. Later, recode it.
Ok, I am looking in my folders...
/etc/cron.d is empty /etc/cron/daily has several files, but the log error is happening every 10 minutes.
Where would be the file that shows that a cron job is running as some kind of service? I don't know which file to edit in order to comment that out. ls -lad /etc/cron* None of these files had any reference to ddclient will give you a list of possible locations.
or maybe: grep -r ddclient /etc/cron* sudo grep -r ddclient /etc/cron*
nothing returned
also try: crontab -l |grep ddclient and do the same as root
crontab -l | grep ddclient no crontab for george
If it is a cron job, it is not running in any of the normal cron files. This makes me think that ddclient is still running, even though systemd says it is not. But that's not possible, is it? If not, what else could be continuing to send the emails saying that it failed to update the ip address? It says it is from root@tribaltrekker.site. Tribaltrekker is my hostname on my pc.
Why would ddclient be a cron job? It is a service (or daemon, as it is called before) of it's own which might be startet by either systemd or the classical startup system (the current openSUSE package uses systemd). When you look at the executable (/usr/sbin/ddclient) you'll see that it is a Perl script. If it is run as a daemon (or service), which is standard, it will wake up every 300 seconds (at least this is the default) and act like it is programmed :-) You may see the process when issuing "ps -ef | grep ddclient" on the command line. The mail recipient is given in the file /etc/ddclient.conf: #mail=root # mail all msgs to root mail-failure=root # mail failed update msgs to root If you do not want mails, make sure both lines begin with a #. Since the process is run as root, you get root@yourhostname as sender, which is quite logical for me. Regards, Werner -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday, 2013-08-30 at 13:48 +0200, Werner Flamme wrote:
Why would ddclient be a cron job? It is a service (or daemon, as it is called before) of it's own which might be startet by either systemd or the classical startup system (the current openSUSE package uses systemd).
You have not read all the emails of this thread. The problem is that after telling systemd to stop the service, the daemon was still running and sending emails. He had to kill it manually, with "kill". Before finding that out, we were trying to find who was sending those emails, and the first idea was that it would be a cron job, separate from the service, because the service had been stopped already. So it said, but it was in fact running. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlIglWQACgkQtTMYHG2NR9WcDACdGKm8CUJdIdp9qnsGOlhCqavc GTYAoJWm+VLH3uAeqITn7/L9AJqP8Wsg =2Tks -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Carlos E. R.
-
Carlos E. R.
-
George Olson (SUSE list)
-
John Andersen
-
Patrick Shanahan
-
Werner Flamme