当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”(已解决)
帖子发表于 : 2010-10-28 8:58 
头像

注册: 2010-06-09 15:22
帖子: 344
送出感谢: 4
接收感谢: 1
我每天都要运行一个脚本用于定时将电脑休眠,之前一直很正常,但是昨天更新了内核,从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/c2299c2feec37a3b1e308942.html)。求助大家了,该怎么办啊?谢谢了!


_________________
您好,请多关照!


最后由 zwdnet 编辑于 2010-10-30 2:09,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 : Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”
帖子发表于 : 2010-10-29 0:56 
头像

注册: 2010-06-09 15:22
帖子: 344
送出感谢: 4
接收感谢: 1
再次升级内核,到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:~$


_________________
您好,请多关照!


页首
 用户资料  
 
3 楼 
 文章标题 : Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”
帖子发表于 : 2010-10-29 1:11 
头像

注册: 2010-06-09 15:22
帖子: 344
送出感谢: 4
接收感谢: 1
以下是用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


_________________
您好,请多关照!


页首
 用户资料  
 
4 楼 
 文章标题 : Re: Ubuntu10.04 at命令无法运行,提示“Warning: at daemon not running”
帖子发表于 : 2010-10-30 2:08 
头像

注册: 2010-06-09 15:22
帖子: 344
送出感谢: 4
接收感谢: 1
唉,重新安装linux2.6.32-25的内核,问题消失,又可以用at命令了。看来以后没事别老升级内核玩,教训啊!


_________________
您好,请多关照!


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译