linux crond.d定时调度执行一段时间后不执行
2017-03-10 07:03
92 查看
[b]问题一:/etc/cron.d下的定时任务执行一段时间后不执行[/b]
背景:在/etc/cron.d下加了一个定时任务,名为dispute_cron(使用root用户编辑),内容:
28 15 * * * hdfs /home/hdfs/spdb/work/disputefile/bin/rundispute.sh
使用hdfs用户每日定时执行该脚本rundispute.sh,执行一段时间后不执行了。
排查:1.看crond日志是否调起来,vim
/var/log/cron 看日志在对应的时间点上相应的定时任务并没有被调起来。
2.切换到hdfs,执行crontab–e,报错:
鉴定令牌不再有效;需要新的鉴定令牌
You (hive) are not allowed to access to (crontab) because of pam configuration.
脚本是hdfs执行的,这表示hdfs密码过期了,执行chage–l
hdfs,显示:
Last password change:
Sep 25, 2016
Password expires:
Dec 24, 2016 --过期时间
Password inactive:
never
Account expires:
never
Minimum number of days between password change:
0
Maximum number of days between password change:
90
Number of days of warning before password expires:
7
2016.12.24号之后该调度脚本就不能被hdfs用户调起了。
或vim /var/log/secure看密码过期提醒,若要过期会有提醒如:
***********************
3.设置用户密码永不过期,脚本即可被调用。
chage -M -1hdfs
参考文章:[u]http://blog.itpub.net/29392174/viewspace-1063866/[/u]
[u]http://www.th7.cn/system/lin/201602/153915.shtml[/u]
日志不全,还是改换成hdfs用户在crontab–e中加了下面内容:
28 15 *
* * cd /home/hdfs/spdb/work/disputefile/bin; ./rundispute.sh >> ../logs/run.log 2>&1
可以进入cd /var/spool/cron/看每个用户配置的定时任务。
[b]问题二:HIVE JDBC查询报错return code-101[/b]
java.sql.SQLException:Errorwhileprocessingstatement:FAILED:ExecutionError,returncode-101fromorg.apache.hadoop.hive.ql.exec.mr.MapRedTask.Java heap
space.
……..
背景:在/etc/cron.d下加了一个定时任务,名为dispute_cron(使用root用户编辑),内容:
28 15 * * * hdfs /home/hdfs/spdb/work/disputefile/bin/rundispute.sh
使用hdfs用户每日定时执行该脚本rundispute.sh,执行一段时间后不执行了。
排查:1.看crond日志是否调起来,vim
/var/log/cron 看日志在对应的时间点上相应的定时任务并没有被调起来。
2.切换到hdfs,执行crontab–e,报错:
鉴定令牌不再有效;需要新的鉴定令牌
You (hive) are not allowed to access to (crontab) because of pam configuration.
脚本是hdfs执行的,这表示hdfs密码过期了,执行chage–l
hdfs,显示:
Last password change:
Sep 25, 2016
Password expires:
Dec 24, 2016 --过期时间
Password inactive:
never
Account expires:
never
Minimum number of days between password change:
0
Maximum number of days between password change:
90
Number of days of warning before password expires:
7
2016.12.24号之后该调度脚本就不能被hdfs用户调起了。
或vim /var/log/secure看密码过期提醒,若要过期会有提醒如:
***********************
3.设置用户密码永不过期,脚本即可被调用。
chage -M -1hdfs
参考文章:[u]http://blog.itpub.net/29392174/viewspace-1063866/[/u]
[u]http://www.th7.cn/system/lin/201602/153915.shtml[/u]
日志不全,还是改换成hdfs用户在crontab–e中加了下面内容:
28 15 *
* * cd /home/hdfs/spdb/work/disputefile/bin; ./rundispute.sh >> ../logs/run.log 2>&1
可以进入cd /var/spool/cron/看每个用户配置的定时任务。
[b]问题二:HIVE JDBC查询报错return code-101[/b]
java.sql.SQLException:Errorwhileprocessingstatement:FAILED:ExecutionError,returncode-101fromorg.apache.hadoop.hive.ql.exec.mr.MapRedTask.Java heap
space.
……..
Caused by: java.lang.OutOfMemoryError: Java heap space
重启hiveserver2堆内存释放OK,不能解决根本问题:需要增加hivesever2堆内存或者优化查询,优化查询根据具体情况具体分析,可以调整hivesever2堆内存使其不溢出,如下(hortonworks平台):相关文章推荐
- linux下使用crond定时执行kettle的job
- 使用crond 在linux中定时执行任务
- Linux下利用Crond和Expect定时登陆交换机执行任务
- Linux 循环执行的例行性工作调度 crond
- linux下使用crond 定时执行php脚本
- 使用crond和at 在linux中定时执行任务
- linux中定时执行任务crond及crontab命令的使用
- linux下使用crond定时执行kettle的job任务
- Linux命令之crond周期定时计划任务执行
- linux下定时执行计划crond任务
- 实战-----使用crond 在linux中定时执行任务
- linux下定时执行计划crond任务
- timer 的使用 模拟显示时间,可以每隔一段时间定时执行调度
- 使用crond和at 在linux中定时执行任务
- 使用crond 在linux中定时执行任务 (狗一样~)
- Linux定时执行crontab使用方法祥解
- 几个关机、重启NT系统的脚本(如何定时或系统无相应一段时间后执行关机任务)
- Linux定时执行任务
- linux下定时自动执行某个进程
- 在linux下定时执行PHP脚本(定时执行crontab使用方法详解)