LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ddclient fails with uninitialized value when cache file exists (https://www.linuxquestions.org/questions/linux-networking-3/ddclient-fails-with-uninitialized-value-when-cache-file-exists-793987/)

YetAnotherDave 03-08-2010 11:35 AM

ddclient fails with uninitialized value when cache file exists
 
When I run ddclient with an existing ddclient.cache file I get errors saying "uninitialized value" and the remote IP address does not get updated.

This pretty much renders ddclient useless.

If I delete the cache file then things work fine and the IP address *does* get updated (if need be).

I happen to be running version 3.7.3 of ddclient but I've tried this with ddclient 3.8.0 and the result is exactly the same except that the line number in the error changes to line 2030.

Here's the code at that line number :

Code:

if ($config{$host}{'login'} eq '') {
    warning("null login name specified for host %s.", $host);

I'm running ubuntu ( 9.04 I think ) and using zoneedit.com for dynamic dns.

Here's a transcript showing the problem.

root@ruby:/var/cache/ddclient# ddclient
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
root@ruby:/var/cache/ddclient# !rm
rm ddclient.cache
root@ruby:/var/cache/ddclient# ddclient
SUCCESS: updating XXXXXXXXX.info: IP address set to XX.XX.XXX.XXX (201: No reco
rds need updating.)
root@ruby:/var/cache/ddclient# ddclient
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
Use of uninitialized value in string ne at /usr/sbin/ddclient line 1973.
root@ruby:/var/cache/ddclient#

smoker 03-08-2010 12:12 PM

can you post the contents of the ddclient.cache file ?

Maybe the $host variable is picking up fluff.

YetAnotherDave 03-08-2010 06:39 PM

Thank you for thinking about this.

Here's the ddclient.cache file:

## ddclient-3.7.3
## last updated at Mon Mar 8 16:33:02 2010 (1268094782)
atime=1268094782,host=XXXXXXXXX.info,ip=XX.XX.XXX.XXX,mtime=1268094782,status=good,warned-min-error-interval=0,warned-min-interval=0,wtime=0 XXXXXXXXX.info


The two XXXXXXXXX.info identifiers are identical

smoker 03-08-2010 08:07 PM

That looks ok. Is that line of code you posted, line 1973 ? In other words is that the correct line for that error output ?
Or is it the output from line 2030 ?

YetAnotherDave 03-08-2010 09:32 PM

1 Attachment(s)
The line of code that I posted is line 1973 in ddclient version 3.7.3. It corresponds to the "undefined" error that gets printed 8 times.

The line of code that I posted also happens to be line 2030 in ddclient version 3.8.0. If I run ddclient 3.8.0, I get the same error printed 8 times except that the line number changes from 1973 to 2030.

In other words, the error does not change when you go from version 3.7.3 to version 3.8.0 - it just moves.

I'll attach ddclient 3.7.3 . This is the one you get out of the ubuntu repository. Renamed to ddclient.txt for attachment purposes.

smoker 03-09-2010 05:12 AM

I need to see your config file.
Obviously hide your username and password.

Lines of enquiry include, mx setting in config, current ip address not being picked up and other possibilities.

Also could you run :
Code:

sudo ddclient -daemon=0 -verbose
both before you delete the cache and after, then post the results.
Also the output from /var/log/daemon.log
and you could run
Code:

sudo ddclient -daemon 0 -debug -noquiet
thanks

YetAnotherDave 03-09-2010 09:51 AM

False alarm:

I was testing by changing the value stored by zoneedit.com for my DNS entry and then running ddclient to see if the value would switch back to the correct value. It appears that ddclient uses the cache file to remember what was stored by the dynamic dns provider ( zoneedit in this case ). If I change the ip address stored in the cache file along with the value stored by zoneedit, then ddclient works fine without showing any "uninitialized value" warnings. Then the *next* time I run ddclient, the warnings come back but at that point, the ip address for my DNS entry is set correctly. The warnings are a little alarming but apparently harmless (??) .

Sorry to waste your time and thanks again for looking at this.

evilmegaman 11-01-2011 01:29 PM

Quote:

Originally Posted by YetAnotherDave (Post 3891671)
False alarm:

I was testing by changing the value stored by zoneedit.com for my DNS entry and then running ddclient to see if the value would switch back to the correct value. It appears that ddclient uses the cache file to remember what was stored by the dynamic dns provider ( zoneedit in this case ). If I change the ip address stored in the cache file along with the value stored by zoneedit, then ddclient works fine without showing any "uninitialized value" warnings. Then the *next* time I run ddclient, the warnings come back but at that point, the ip address for my DNS entry is set correctly. The warnings are a little alarming but apparently harmless (??) .

Sorry to waste your time and thanks again for looking at this.

Absolutely not a waste of time! Saved me a ton of time!


All times are GMT -5. The time now is 12:48 AM.