[[email protected] script]$ ls /etc/init.d/hadoop.sh ls: cannot access /etc/init.d/hadoop.sh: Too many levels of symbolic links [[email protected] script]$ ls /home/hadoop/script/hadoop.sh /etc/init.d/hadoop.sh ls: cannot access /etc/init.d/hadoop.sh: Too many levels of symbolic links /home/hadoop/script/hadoop.sh
解决办法:sudo 删除链接,然后补上全路径。
在做ln的时候要将文件的绝对路径下的完整目录写上去!例子如下:
[[email protected] script]$ sudo rm /etc/init.d/hadoop.sh [[email protected] script]$ sudo ln -s /home/hadoop/script/hadoop.sh /etc/init.d/hadoop.sh [[email protected] script]$ /etc/init.d/hadoop.sh st /etc/init.d/hadoop.sh {start|stop|restart|status} [[email protected] script]$ /etc/init.d/hadoop.sh status 11283 ResourceManager 12323 Jps 10836 DataNode 10694 NameNode 11033 SecondaryNameNode 11610 NodeManager 11756 JobHistoryServer
时间: 2024-10-23 01:09:46