PDA

View Full Version : [ubuntu] ddclient Daemon Trouble



fiveironfrnzy08
May 4th, 2010, 10:10 PM
Hey everyone, having a hard time figuring this out...

I have ddclient installed and want to send an updated ip address every so often. I can use "ddclient -force" and that will successfully send an update. However, when ddclient starts it doesn't work, so I looked at the /var/log/daemon.log and this was the output...

"
May 4 15:57:52 *myusername* ddclient[1324]: WARNING: file /etc/ddclient.conf: Cannot open file '/etc/ddclient.conf'. (Permission denied)
May 4 15:57:52 *myusername* ddclient[1335]: WARNING: file /etc/ddclient.conf: Cannot open file '/etc/ddclient.conf'. (Permission denied)
May 4 15:57:52 *myusername* ddclient[1335]: WARNING: file /var/cache/ddclient/ddclient.cache: Cannot open file '/var/cache/ddclient/ddclient.cache'. (Permission denied)
"

Any thoughts?

arrrghhh
May 4th, 2010, 10:14 PM
Are you running this from an init script or by hand? Mine's just a script in init.d, starts just fine...

fiveironfrnzy08
May 4th, 2010, 10:18 PM
I'm pretty sure it's an init script, the way I restart it is by "/etc/init.d/ddclient restart"

What are the differences between the two? What does running it by hand look like?

arrrghhh
May 4th, 2010, 10:23 PM
Running it by hand, I would assume would be simply typing
ddclient at the prompt. Did you install ddclient from the repo's?

fiveironfrnzy08
May 4th, 2010, 10:25 PM
I installed it from the Synaptic Package Manager

arrrghhh
May 4th, 2010, 10:30 PM
I installed it from the Synaptic Package Manager

Ok good. I think I just noticed the problem, which I should've noticed right away.

Run /etc/init.d/ddclient as root - with 'sudo' in front of it. Let us know how that goes :D

fiveironfrnzy08
May 4th, 2010, 10:48 PM
Ok, that worked! Progress! Why did I need to enter sudo if I had already put in sudo su in the beginning of the session?

Also I don't think it is running as a daemon successfully though...
Here is what my /etc/ddclient.conf looks like

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
daemon=300
protocol=dyndns2
use=web, web=myip.dnsomatic.com
server=updates.dnsomatic.com
login=*****
password=*****
*****.***

arrrghhh
May 4th, 2010, 10:55 PM
You can't su to root. You have to use sudo, root doesn't have a password so you can't authenticate as that user in Ubuntu...

Here's my config:


# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

protocol=dyndns2
use=web, web=checkip.dyndns.com, web-skip='IP Address'
server=members.dyndns.org
login=user
password='password'
domain.domain.com

fiveironfrnzy08
May 4th, 2010, 11:11 PM
It actually isn't working anymore, it worked that one time and that's it. I restarted the computer and all the same permission stuff came up when the computer tried to automatically start it on startup. Then I tried sudo ... and nothing came up in the log.

arrrghhh
May 4th, 2010, 11:21 PM
It actually isn't working anymore, it worked that one time and that's it. I restarted the computer and all the same permission stuff came up when the computer tried to automatically start it on startup. Then I tried sudo ... and nothing came up in the log.

Hrm... who own's that init script and what are the permissions on it?

I installed this from the repo's and honestly did not have any issues whatsoever. Just setup my .conf file, and it's been great....

fiveironfrnzy08
May 4th, 2010, 11:50 PM
I feel like my problems always come about when I try to use it in daemon mode, but it's useless if I don't.

/etc/init.d/ddclient
owner: root, read and write
group: root, read
others: read
(checked) allow executing file as program

When I restart the computer, these are the errors I get in the /var/log/daemon.log

"
May 4 17:34:57 ryan-desktop ddclient[825]: WARNING: cannot connect to checkip.dyndns.com:80 socket: IO::Socket::INET: Bad hostname 'checkip.dyndns.com'
"
and
"
May 4 17:35:01 ryan-desktop ddclient[1304]: WARNING: file /etc/ddclient.conf: Cannot open file '/etc/ddclient.conf'. (Permission denied)
May 4 17:35:01 ryan-desktop ddclient[1348]: WARNING: file /etc/ddclient.conf: Cannot open file '/etc/ddclient.conf'. (Permission denied)
May 4 17:35:01 ryan-desktop ddclient[1348]: WARNING: file /var/cache/ddclient/ddclient.cache: Cannot open file '/var/cache/ddclient/ddclient.cache'. (Permission denied)

arrrghhh
May 5th, 2010, 12:03 AM
Those errors are definitely permission related. I've pretty much exhausted my limited expertise tho... Like I said it works for me, and all I have is a init.d script that runs it in "daemon" mode if you will (just sets it up as a service so I don't have to login for it to be working...)