免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 12207 | 回复: 13
打印 上一主题 下一主题

[系统管理] rpcbind服务开机不启动,尽管已经在chkconfig rpcbind on [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-08-27 17:14 |显示全部楼层 |倒序浏览
本帖最后由 liaozd 于 2013-08-27 17:14 编辑

Redhat 6.4里面

可以在chkconfig rpcbind --list看到:
  1. rpcbind    0:off   1:0ff   2:on   3:on   4:on   5:on   6:off
复制代码
但是service rpcbind status显示的是:
rpcbind is stopped

除非手动运行一下/sbin/rpcbind,才能看到rpcbind(pid 2312) is running....

论坛徽章:
0
2 [报告]
发表于 2013-08-27 21:14 |显示全部楼层
回复 2# zongg


    如何看占的什么端口?

RHEL4和5是portmap,RHEL6改名叫作rpcbind了,我是需要mount NAS上的NFS。每次手动运行rpcbind之后就可以正常mount,否则mount不上。

论坛徽章:
0
3 [报告]
发表于 2013-08-28 06:48 |显示全部楼层
回复 4# zongg

我就是不明白为什么chkconfig中可以看到rpcbind是开着的,但每次启动之后却没有启动。


   

论坛徽章:
0
4 [报告]
发表于 2013-08-28 21:36 |显示全部楼层
回复 6# zongg

我重装一下再试试吧。谢谢!

   

论坛徽章:
0
5 [报告]
发表于 2013-08-29 11:12 |显示全部楼层
回复 9# llzzccc

etc/rc[3-5].d/ 每个里面都有rpcbind的link


   

论坛徽章:
0
6 [报告]
发表于 2013-08-29 11:25 |显示全部楼层
回复 10# wenhq


message里面没有出现rpcbind

论坛徽章:
0
7 [报告]
发表于 2013-08-30 12:10 |显示全部楼层
回复 13# Purple_Grape

谢谢,是个备选方案!


   

论坛徽章:
0
8 [报告]
发表于 2013-08-30 12:13 |显示全部楼层
回复 14# wenhq

这是台新安装的机器,没安装什么新服务,也没有多少error和warning。message里面没有线索


   

论坛徽章:
0
9 [报告]
发表于 2013-09-03 16:14 |显示全部楼层
回复 17# llzzccc

感谢你的建议,不过rpcbind是在/sbin/rpcbind,不是一个script,我file了一下,结果是:
  1. /sbin/rpcbind: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Llinux j2.6.18, stipped
复制代码

论坛徽章:
0
10 [报告]
发表于 2013-09-06 11:53 |显示全部楼层
本帖最后由 liaozd 于 2013-09-06 12:00 编辑

回复 20# llzzccc

o" />ps:" /> 看串楼层了。

加入了一些warning message 1-7 (Line: 22, 31, 38, 47, 49, 63)

  1. # This is an interactive program, we need the current locale
  2. [ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
  3. # We can't Japanese on normal console at boot time, so force LANG=C.
  4. if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then
  5.     if [ "$TERM" = "linux" ] ; then
  6.         LANG=C
  7.     fi
  8. fi

  9. # Source function library.
  10. . /etc/init.d/functions

  11. # Source networking configuration.
  12. [ -f /etc/sysconfig/network ] &&  . /etc/sysconfig/network

  13. prog="rpcbind"
  14. [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

  15. RETVAL=0
  16. uid=`id | cut -d\( -f1 | cut -d= -f2`

  17. echo "waring message 1"
  18. start() {
  19.         # Check that networking is up.
  20.         [ "$NETWORKING" = "yes" ] || exit 6

  21.         [ -f /sbin/$prog ] || exit 5

  22.         # Make sure the rpcbind is not already running.
  23.         if status $prog > /dev/null ; then
  24.                 echo "waring message 2"
  25.                 exit 0        
  26.         fi

  27.         # Only root can start the service
  28.         [ $uid -ne 0 ] && exit 4

  29.         echo "waring message 4"
  30.         echo -n [        DISCUZ_CODE_0        ]quot;Starting $prog: "
  31.         daemon $prog $1 "$RPCBIND_ARGS"
  32.         RETVAL=$?
  33.         echo
  34.         if [ $RETVAL -eq 0 ] ; then
  35.                 touch /var/lock/subsys/$prog
  36.                 [ ! -f /var/run/rpcbind.pid ] &&
  37.                         /sbin/pidof $prog > /var/run/rpcbind.pid
  38.         echo "waring message 5"
  39.         fi
  40.         echo "waring message 6"
  41.         return $RETVAL
  42. }


  43. stop() {
  44.         echo -n [        DISCUZ_CODE_0        ]quot;Stopping $prog: "
  45.         killproc $prog
  46.         RETVAL=$?
  47.         echo
  48.         [ $RETVAL -eq 0 ] && {
  49.                 rm -f /var/lock/subsys/$prog
  50.                 rm -f /var/run/rpcbind*
  51.         }
  52.         echo "waring message 7"
  53.         return $RETVAL
  54. }

  55. # See how we were called.
  56. case "$1" in
  57.   start)
  58.         start
  59.         RETVAL=$?
  60.         ;;
  61.   stop)
  62.         stop
  63.         RETVAL=$?
  64.         ;;
  65.   status)
  66.         status $prog
  67.         RETVAL=$?
  68.         ;;
  69.   restart | reload| force-reload)
  70.         stop
  71.         start
  72.         RETVAL=$?
  73.         ;;
  74.   condrestart | try-restart)
  75.         if [ -f /var/lock/subsys/$prog ]; then
  76.                 stop
  77.                 start -w
  78.                 RETVAL=$?
  79.         fi
  80.         ;;
  81.   *)
  82.         echo [        DISCUZ_CODE_0        ]quot;Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
  83.         RETVAL=2
  84.         ;;
  85. esac

  86. exit $RETVAL
复制代码
执行的输出结果是这样的:
  1. [root@vfxws04 init.d]# service rpcbind start
  2. waring message 1
  3. [root@vfxws04 init.d]# service rpcbind status
  4. waring message 1
  5. rpcbind is stopped
  6. [root@vfxws04 init.d]# service rpcbind stop
  7. waring message 1
  8. Stopping rpcbind:                                          [FAILED]
  9. waring message 7
  10. [root@vfxws04 init.d]#
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP