Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”(已解决)

漏洞扫描、网关、防火墙、补丁升级、数据备份和迁移、系统故障排除
回复
头像
zwdnet
帖子: 344
注册时间: 2010-06-09 15:22
送出感谢: 4 次
接收感谢: 1 次

Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”(已解决)

#1

帖子 zwdnet » 2010-10-28 8:58

我每天都要运行一个脚本用于定时将电脑休眠,之前一直很正常,但是昨天更新了内核,从2.6.32升级到2.6.35,启动运行一切正常,但是发现at命令无法运行,提示“Warning: at daemon not running”。具体情况如下:
执行at命令的情况:

代码: 全选

zym@zym-freedom:~$ at now+1minute
warning: commands will be executed using /bin/sh
at> ls
at> 
at> <EOT>
job 273 at Thu Oct 28 08:30:00 2010
Warning: at daemon not running
提示"at daemon没有运行“
接下来看看有没有atd这个进程:

代码: 全选

zym@zym-freedom:~$ ps -aux | grep atd
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym      14369  0.0  0.0   3596   744 pts/0    S+   08:33   0:00 grep --color=auto atd
真的没有
那就启动atd吧,

代码: 全选

zym@zym-freedom:/etc/init.d$ sudo /etc/init.d/atd start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start atd
按照提示,

代码: 全选

zym@zym-freedom:/etc/init.d$ sudo start atd
start: Job is already running: atd
说是任务已经运行,那我再试试at

代码: 全选

zym@zym-freedom:/etc/init.d$ at now + 1minutes
warning: commands will be executed using /bin/sh
at> ls
at> <EOT>
job 274 at Thu Oct 28 08:42:00 2010
Warning: at daemon not running
还是老样子,再看看进程,

代码: 全选

zym@zym-freedom:/etc/init.d$ ps -aux | grep 'atd'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym      16209  0.0  0.0   3596   744 pts/0    S+   08:43   0:00 grep --color=auto atd
zym@zym-freedom:/etc/init.d$ sudo ps -aux | grep 'atd'
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
zym      16241  0.0  0.0   3596   744 pts/0    S+   08:43   0:00 grep --color=auto atd
还是没有,再看atd的状态

代码: 全选

zym@zym-freedom:/etc/init.d$ sudo /etc/init.d/atd status
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd status

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the status(8) utility, e.g. status atd
atd start/killed, process 27511
按照提示:

代码: 全选

zym@zym-freedom:/etc/init.d$ status atd
atd start/killed, process 27511
试试kill掉吧

代码: 全选

zym@zym-freedom:/etc/init.d$ kill 27511
bash: kill: (27511) - 没有那个进程
不行!我彻底没辙了!at命令还是没法执行。我在网上搜了,资料很少,只有一篇中文相关的,跟我问题一样,最后结论是selinux的问题,但他的发行版本是好像是redhat之类的,好多命令看不懂相应的Ubuntu命令是什么(http://hi.baidu.com/yanyulou/blog/item/ ... 08942.html)。求助大家了,该怎么办啊?谢谢了!
上次由 zwdnet 在 2010-10-30 2:09,总共编辑 1 次。
您好,请多关照!
头像
zwdnet
帖子: 344
注册时间: 2010-06-09 15:22
送出感谢: 4 次
接收感谢: 1 次

Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”

#2

帖子 zwdnet » 2010-10-29 0:56

再次升级内核,到2.6.36,还是无效。
在新立得里彻底删除at,然后重新安装,依然无效。重启后情况如下:

代码: 全选

zym@zym-freedom:~$ status atd
atd stop/waiting
zym@zym-freedom:~$ sudo /etc/init.d/atd restart
[sudo] password for zym: 
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service atd restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart atd
atd start/running, process 3037
zym@zym-freedom:~$ service atd restart
restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.45" (uid=1000 pid=3185 comm="restart) interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
zym@zym-freedom:~$ 
您好,请多关照!
头像
zwdnet
帖子: 344
注册时间: 2010-06-09 15:22
送出感谢: 4 次
接收感谢: 1 次

Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”

#3

帖子 zwdnet » 2010-10-29 1:11

以下是用grep 'atd' -r /var/log/*搜索到的相关日志,以下均出现了多次,我只粘贴部分的。
syslog.1

代码: 全选

Oct 29 00:36:01 localhost kernel: [   32.043984] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:01 localhost atd[1084]: Can't link execution file: Operation not permitted
Oct 29 00:36:01 localhost init: atd main process (1084) terminated with status 1
Oct 29 00:36:01 localhost init: atd main process ended, respawning
Oct 29 00:36:01 localhost cron[1083]: (CRON) STARTUP (fork ok)
Oct 29 00:36:02 localhost init: apport post-stop process (1078) terminated with status 1
Oct 29 00:36:02 localhost acpid: 37 rules loaded
Oct 29 00:36:02 localhost acpid: waiting for events: event logging is off
Oct 29 00:36:02 localhost atd[1092]: Removing stale lockfile for pid 1084
Oct 29 00:36:02 localhost atd[1092]: Can't link execution file: Operation not permitted
Oct 29 00:36:02 localhost init: atd main process (1092) terminated with status 1
Oct 29 00:36:02 localhost init: atd main process ended, respawning
syslog:

代码: 全选

 29 00:43:48 localhost atd[8079]: Removing stale lockfile for pid 1158
Oct 29 00:44:32 localhost ntpd[2258]: synchronized to 137.189.11.63, stratum 1
Oct 29 00:45:00 localhost atd[8079]: Can't link execution file: Operation not permitted
Oct 29 00:45:00 localhost init: atd main process (8079) terminated with status 1
Oct 29 00:45:00 localhost init: atd main process ended, respawning
Oct 29 00:45:00 localhost kernel: [  570.025310] yama_path_link: 1 callbacks suppressed
Oct 29 00:45:00 localhost kernel: [  570.025321] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:45:00 localhost atd[8906]: Removing stale lockfile for pid 8079
Oct 29 00:45:00 localhost atd[8906]: Can't link execution file: Operation not permitted
Oct 29 00:45:00 localhost init: atd main process (8906) terminated with status 1
Oct 29 00:45:00 localhost init: atd main process ended, respawning
Oct 29 00:45:00 localhost kernel: [  570.129114] non-accessible hardlink creation was attempted by: atd (fsuid 1)
rkhunter.log:

代码: 全选

/var/log/rkhunter.log.1:[07:38:24]   Checking for file '/usr/bin/.zeen/.. /statdx'   [ Not found ]
/var/log/rkhunter.log.1:[07:40:08]     Checking for file '/usr/sbin/atd2'            [ Not found ]
/var/log/rkhunter.log.1:[07:40:09]     Checking for file '/usr/sbin/atd2'            [ Not found ]
message:

代码: 全选

Oct 29 00:36:01 localhost kernel: [   32.043984] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.069579] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.079388] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.094269] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.108177] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.140768] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.170518] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.194724] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.228532] non-accessible hardlink creation was attempted by: atd (fsuid 1)
Oct 29 00:36:02 localhost kernel: [   32.260946] non-accessible hardlink creation was attempted by: atd (fsuid 1)
各位大侠,救命啊!at命令对我真的很有用! :em06
您好,请多关照!
头像
zwdnet
帖子: 344
注册时间: 2010-06-09 15:22
送出感谢: 4 次
接收感谢: 1 次

Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”

#4

帖子 zwdnet » 2010-10-30 2:08

唉,重新安装linux2.6.32-25的内核,问题消失,又可以用at命令了。看来以后没事别老升级内核玩,教训啊!
您好,请多关照!
回复

回到 “服务器维护和硬件相关”