开发者社区> 问答> 正文

cloudera搭建完成并启动之后,通过 公网IP:7180 不能访问CM

第一次尝试使用阿里云服务器进行cloudera大数据平台的搭建,并且成功启动了主节点上的服务器,如图 ![97AWFG4$K36Q5R8TP9$]485.png](https://ucc.alicdn.com/pic/developer-ecology/6ecdbc52a19944f7a7371cb7a60f6285.png)

并且查看cloudera-scm-server.log中近200条记录,没有出现报错 2.png

但是,我通过浏览器输入 公网IP:7180 并不能成功访问CM服务器 同时,在本机使用命令:telnet localhost:7180 仍然出现错误 3.png

请问这种情况CM是否算成功启动呐?如果没有,应该如何解决呐?求解!!!

展开
收起
风吹北大荒 2020-11-05 13:55:11 1336 0
1 条回答
写回答
取消 提交回答
  • 思路1:

    Starting cloudera-scm-server: * Couldn't start cloudera-scm-server的解决办法(图文详解)

      思路2:

      查看cloudera-scm-agent的运行日志

    复制代码 复制代码 bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log$ ll total 20 drwxr-xr-x 5 bigdata bigdata 4096 2月 12 2016 ./ drwxr-xr-x 8 bigdata bigdata 4096 2月 12 2016 ../ drwxr-xr-x 2 bigdata bigdata 4096 6月 25 19:53 cloudera-scm-agent/ drwxr-xr-x 2 bigdata bigdata 4096 6月 25 19:52 cloudera-scm-server/ drwxr-xr-x 2 bigdata bigdata 4096 2月 12 2016 cmf/ bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log$ cd cloudera-scm-agent/ bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-agent$ ll total 40 drwxr-xr-x 2 bigdata bigdata 4096 6月 25 19:53 ./ drwxr-xr-x 5 bigdata bigdata 4096 2月 12 2016 ../ -rw-r--r-- 1 root root 14757 6月 25 19:57 cloudera-scm-agent.log -rw-r--r-- 1 root root 935 6月 25 19:53 cloudera-scm-agent.out -rw-r--r-- 1 root root 202 6月 25 19:53 cmf_listener.log -rw-r--r-- 1 root root 539 6月 25 19:53 supervisord.log -rw-r--r-- 1 root root 449 6月 25 19:53 supervisord.out bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-agent$ cat cloudera-scm-agent.out [25/Jun/2017 19:53:01 +0000] 9651 MainThread agent INFO SCM Agent Version: 5.6.0 [25/Jun/2017 19:53:01 +0000] 9651 MainThread util INFO Generating Agent UUID for the first time: '/opt/cm-5.6.0/lib/cloudera-scm-agent/uuid' [25/Jun/2017 19:53:01 +0000] 9651 MainThread agent INFO Adding env vars that start with CMF_AGENT_ [25/Jun/2017 19:53:01 +0000] 9651 MainThread agent INFO explicitly passing env var to supervisee: MGMT_HOME: /opt/cm-5.6.0/share/cmf [25/Jun/2017 19:53:01 +0000] 9651 MainThread agent INFO explicitly passing env var to supervisee: ROOT: /opt/cm-5.6.0/lib/cmf [25/Jun/2017 19:53:01 +0000] 9651 MainThread agent INFO Logging to /opt/cm-5.6.0/log/cloudera-scm-agent/cloudera-scm-agent.log Error: could not find config file /opt/cm-5.6.0/run/cloudera-scm-agent/supervisor/supervisord.conf For help, use /opt/cm-5.6.0/lib/cmf/agent/src/cmf/agent.py -h bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/log/cloudera-scm-agent$ 复制代码 复制代码

      当cloudera-scm-server、cloudera-scm-agent start启动成功之后,可通过http://主节点IP:7180来访问CM,用户名密码都为admin。剩下的就是一直点下一步和根据具体的需求来配置集群了。

     注意,在此之前。

     

      注意,在此之前。

      ubuntucmbigdata1机器上,则需要执行

    复制代码 bigdata@ubuntucmbigdata1:~$ sudo /usr/share/cmf/schema/scm_prepare_database.sh mysql scm scm scm_password

    [sudo] password for bigdata: Sorry, try again. [sudo] password for bigdata: JAVA_HOME=/usr/java/jdk1.7.0_80 Verifying that we can write to /etc/cloudera-scm-server Creating SCM configuration file in /etc/cloudera-scm-server Executing: /usr/java/jdk1.7.0_80/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/usr/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /etc/cloudera-scm-server/db.properties com.cloudera.cmf.db. [ main] DbCommandExecutor INFO Successfully connected to database. All done, your SCM database is configured correctly!

    bigdata@ubuntucmbigdata1:~$ sudo service cloudera-scm-server start [sudo] password for bigdata: Starting cloudera-scm-server: * cloudera-scm-server started

    bigdata@ubuntucmbigdata1:~$

    bigdata@ubuntucmbigdata1:~$ sudo service cloudera-scm-agent start [sudo] password for bigdata: Starting cloudera-scm-agent: * cloudera-scm-agent started

    bigdata@ubuntucmbigdata1:~$

    复制代码

      然后,在ubuntucmbigdata2、ubuntucmbigdata3、ubuntucmbigdata4上

    复制代码 bigdata@ubuntucmbigdata2:~$ sudo service cloudera-scm-agent start [sudo] password for bigdata: Starting cloudera-scm-agent: * cloudera-scm-agent started

    bigdata@ubuntucmbigdata2:~$

    bigdata@ubuntucmbigdata3:~$ sudo service cloudera-scm-agent start [sudo] password for bigdata: Starting cloudera-scm-agent: * cloudera-scm-agent started

    bigdata@ubuntucmbigdata3:~$

    bigdata@ubuntucmbigdata4:~$ sudo service cloudera-scm-agent start [sudo] password for bigdata: Starting cloudera-scm-agent: * cloudera-scm-agent started

    bigdata@ubuntucmbigdata4:~$

    复制代码

      思路3:

      关闭这台机器的防火墙

    bigdata@ubuntucmbigdata1:/opt$ sudo ufw disable Firewall stopped and disabled on system startup bigdata@ubuntucmbigdata1:/opt$ sudo ufw status Status: inactive bigdata@ubuntucmbigdata1:/opt$

      思路4:

    复制代码 bigdata@ubuntucmbigdata1:/opt/cm-5.6.0/etc$ netstat -nltp (No info could be read for "-p": geteuid()=1000 but you should be root.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:19001 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:6011 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:6012 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.1.1:9000 0.0.0.0:* LISTEN -
    tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
    tcp6 0 0 :::22 :::* LISTEN -
    tcp6 0 0 ::1:631 :::* LISTEN -
    tcp6 0 0 ::1:6010 :::* LISTEN -
    tcp6 0 0 ::1:6011 :::* LISTEN -
    tcp6 0 0 ::1:6012 :::* LISTEN -
    复制代码

        思路5:

    cloudera-scm-server启动时出现Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection问题解决方法(图文详解)

       思路6:

        时间同步

    ntpdate pool.ntp.org

      一般前面的6种思路是一定可以解决cloudera manager的7180 web界面访问不了

      思路7:(万不得已)

      最戳的办法,就是

    http://www.aboutyun.com/thread-8992-1-1.html (包含centos、ubuntu、debian和rehat各版本都有)

      卸载它,重新来过。

    正用得上,刚安装好的CDH5的CM server启不来,只好全部四节点卸载来过。

        

      如在ubuntu系统下

    复制代码 bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera* bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo apt-get purge 'cloudera-manager-' bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo apt-get purge 'cloudera-manager-' avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-hdfs-nfs3 hadoop-httpfs hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-python sqoop sqoop2 whirr

    bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo apt-get clean bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera* /var/log/cloudera* /var/run/cloudera* bigdata@ubuntucmbigdata1:/opt/softwares/cm-5.6.0$ sudo rm -Rf /var/cache/apt/archives/cloudera*

    复制代码

    2021-02-22 13:28:37
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《基于 Service Worker 实现在线代理》 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载