SQOOP 服务器已启动但未找到错误命令
Posted
技术标签:
【中文标题】SQOOP 服务器已启动但未找到错误命令【英文标题】:SQOOP Server started but getting an error command not found 【发布时间】:2018-02-23 11:12:31 【问题描述】:我使用的是 ubuntu 16.04 版
harsha@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
我能够启动 sqoop 服务器和 sqoop shell,但是当我在终端中输入 sqoop help 或 sqoop import 时,它说找不到命令。
错误是
harsha@ubuntu:~$ sqoop help
sqoop: command not found
harsha@ubuntu:~$ sqoop -help
sqoop: command not found
harsha@ubuntu:~$ sqoop --help
sqoop: command not found
harsha@ubuntu:~$ sqoop
sqoop: command not found
下面的命令工作得很好。
sqoop2-tool upgrade
sqoop2-tool verify
sqoop2-server start
sqoop2-server stop
sqoop2-shell
这里是回声 $PATH
/home/harsha/bin:/home/harsha/.local/bin:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
/usr/lib/jvm/java-8-oracle/bin:/opt/hadoop-3.0.0/bin:
/opt/apache-flume-1.8.0-bin/bin:/opt/kafka_2.12-1.0.0/bin:
/opt/zookeeper-3.5.3-beta/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/bin:/usr/lib/sqoop-1.99.7-bin-hadoop200/conf:
当前正在运行的进程是
harsha@ubuntu:~$ jps
6277 ResourceManager
5814 DataNode
90105 Jps
37418 SqoopShell
6395 NodeManager
5694 NameNode
~/.bashrc 文件中的条目如下
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:$JAVA_HOME/bin
#HADOOP HOME
#export HADOOP_PREFIX=/opt/hadoop-3.0.0
export HADOOP_HOME=/opt/hadoop-3.0.0
export PATH=$PATH:$HADOOP_HOME/bin
#FLUME HOME
export FLUME_HOME=/opt/apache-flume-1.8.0-bin
export PATH=$PATH:$FLUME_HOME/bin
#HADOOP HOME
export KAFKA_HOME=/opt/kafka_2.12-1.0.0
export PATH=$PATH:$KAFKA_HOME/bin
#ZOOKEEPER HOME
export ZOOKEEPER_HOME=/opt/zookeeper-3.5.3-beta
export PATH=$PATH:$ZOOKEEPER_HOME/bin
#SQOOP HOME
export SQOOP_HOME=/usr/lib/sqoop-1.99.7-bin-hadoop200
export SQOOP_CONF_DIR=$SQOOP_HOME/conf
export SQOOP_CLASS_PATH=$SQOOP_HOME/server/lib
export PATH=$PATH:$SQOOP_HOME/bin:$SQOOP_CONF_DIR:$SQOOP_CLASSPATH
如果有人可以帮助我,那将是一个很大的帮助。感谢您的帮助。
【问题讨论】:
我现在卡住了,任何建议都将不胜感激 【参考方案1】:找到 sqoop 命令并将命令的路径添加到 $PATH 变量中。
locate sqoop
【讨论】:
以上是关于SQOOP 服务器已启动但未找到错误命令的主要内容,如果未能解决你的问题,请参考以下文章
如何在 Tomcat 9.0.0M10 中修复“已扫描但未在其中找到 TLD 的 JAR”