未修改任何配置的情况下,重启hadoop
biglucky@localhost>sh start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
start-all.sh: 112: /opt/hadoop-2.7.1/sbin/../libexec/hadoop-config.sh: Syntax error: word unexpected (expecting ")")
提示了“Syntax error: word unexpected (expecting “)”)”这样的异常,而这段期间我没有修改过任何配置。于是各种找资料使用
sudo sh start-all.sh
等这样的命令也会出错。
bash start-all.sh
>start-all.sh
后来发现,直接运行start-all.sh 脚本不会出错:
biglucky@localhost>start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/hadoop-2.7.1/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/kael/CDH/hbase/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Starting namenodes on [ubuntu]
ubuntu: starting namenode, logging to /opt/hadoop-2.7.1/logs/hadoop-kael-namenode-ubuntu.out
ubuntu: SLF4J: Class path contains multiple SLF4J bindings.
在一般的linux操作系统之中,使用sh等于打开了bash的posix的标准模式 ,等于执行
bash --posix
“sh”并不是一个程序,而是一种标准(POSIX),这种标准,在一定程度上保证了脚本的跨系统性(跨UNIX系统)