【Ambari】Build and install Ambari 2.7.5
文章目录
- 环境准备
- 1. download and build
- 1.1 download
- 1.1.1 下载源码包(清华镜像)
- 1.1.2 mvn versions:set -DnewVersion=2.7.5.0.0
- 1.1.3 pushd ambari-metrics
- 1.1.4 mvn versions:set -DnewVersion=2.7.5.0.0
- 1.1.5 popd
- 1.2 build
- 1.3 build过程报错处理技巧
- 2. install 过程问题
- **Step 2: Install Ambari Server**
- **Step 3: Setup and Start Ambari Server**
- Step 4: Install and Start Ambari Agent on All Hosts
- 3. 访问页面
环境准备
官方build安装链接:
https://cwiki.apache.org/confluence/display/AMBARI/Installation+Guide+for+Ambari+2.7.5
官方环境指导:
https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development
自己build过程报错后添加的:
- centos 7
- jdk 8
- maven 配置aliyun镜像提速 阿里镜像配置帮助,后边儿build的时候会报错,有的包在aliyun下不到,需要先注释掉aliyun
- python >=2.6
- yum -y install rpm-build
- node安装 淘宝cnpm安装提速
- yum -y install python-devel
- yum -y install gcc-c++
1. download and build
1.1 download
1.1.1 下载源码包(清华镜像)
wget https://mirrors.tuna.tsinghua.edu.cn/apache/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz
tar xfvz apache-ambari-2.7.5-src.tar.gz
cd apache-ambari-2.7.5-src
1.1.2 mvn versions:set -DnewVersion=2.7.5.0.0
[root@master apache-ambari-2.7.5-src] mvn versions:set -DnewVersion=2.7.5.0.0
...
一堆download省略
Downloaded from aliyunmaven: https://maven.aliyun.com/repository/public/commons-lang/commons-lang/2.6/commons-lang-2.6.jar (284 kB at 77 kB/s)
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /root/ambari-2.7.5/apache-ambari-2.7.5-src
[INFO] Processing change of org.apache.ambari:ambari:2.7.5.0.0 -> 2.7.5.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.7.5.0.0 .............................. SUCCESS [ 30.062 s]
[INFO] Apache Ambari Project POM 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Web 2.7.5.0.0 ............................... SKIPPED
[INFO] Ambari Views 2.7.5.0.0 ............................. SKIPPED
[INFO] Ambari Admin View 2.7.5.0.0 ........................ SKIPPED
[INFO] ambari-utility 1.0.0.0-SNAPSHOT .................... SKIPPED
[INFO] ambari-metrics 2.7.5.0.0 ........................... SKIPPED
[INFO] Ambari Metrics Common 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Metrics Hadoop Sink 2.7.5.0.0 ............... SKIPPED
[INFO] Ambari Metrics Flume Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Kafka Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) 2.7.5.0.0 ....... SKIPPED
[INFO] Ambari Metrics Collector 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Metrics Monitor 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Grafana 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Host Aggregator 2.7.5.0.0 ........... SKIPPED
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Service Advisor 1.0.0.0-SNAPSHOT ............ SKIPPED
[INFO] Ambari Server 2.7.5.0.0 ............................ SKIPPED
[INFO] Ambari Functional Tests 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Agent 2.7.5.0.0 ............................. SKIPPED
[INFO] ambari-logsearch 2.7.5.0.0 ......................... SKIPPED
[INFO] Ambari Logsearch Appender 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Config Api 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Config JSON 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Solr 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Zookeeper 2.7.5.0.0 ........ SKIPPED
[INFO] Ambari Logsearch Config Local 2.7.5.0.0 ............ SKIPPED
[INFO] Ambari Logsearch Log Feeder Plugin Api 2.7.5.0.0 ... SKIPPED
[INFO] Ambari Logsearch Log Feeder Container Registry 2.7.5.0.0 SKIPPED
[INFO] Ambari Logsearch Log Feeder 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Web 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Logsearch Server 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Logsearch Assembly 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Integration Test 2.7.5.0.0 ........ SKIPPED
[INFO] ambari-infra 2.7.5.0.0 ............................. SKIPPED
[INFO] Ambari Infra Solr Client 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Solr Plugin 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Manager 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Infra Assembly 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Infra Manager Integration Tests 2.7.5.0.0 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.891 s
[INFO] Finished at: 2020-01-13T10:45:45+08:00
[INFO] ------------------------------------------------------------------------
1.1.3 pushd ambari-metrics
[root@master apache-ambari-2.7.5-src] pushd ambari-metrics
~/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-metrics ~/ambari-2.7.5/apache-ambari-2.7.5-src
1.1.4 mvn versions:set -DnewVersion=2.7.5.0.0
[root@master ambari-metrics] mvn versions:set -DnewVersion=2.7.5.0.0
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ambari-utility [jar]
[INFO] ambari-metrics [pom]
[INFO] Ambari Metrics Common [jar]
[INFO] Ambari Metrics Hadoop Sink [jar]
[INFO] Ambari Metrics Flume Sink [jar]
[INFO] Ambari Metrics Kafka Sink [jar]
[INFO] Ambari Metrics Storm Sink [jar]
[INFO] Ambari Metrics Storm Sink (Legacy) [jar]
[INFO] Ambari Metrics Collector [jar]
[INFO] Ambari Metrics Monitor [pom]
[INFO] Ambari Metrics Grafana [pom]
[INFO] Ambari Metrics Host Aggregator [jar]
[INFO] Ambari Metrics Assembly [pom]
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-checkstyle-plugin/2.17/maven-checkstyle-plugin-2.17.pom
...
一堆download省略
这里可能有点慢,阿里云大概10分钟
[INFO]
[INFO] ------------------< org.apache.ambari:ambari-metrics >------------------
[INFO] Building ambari-metrics 2.7.5.0.0 [1/13]
[INFO] --------------------------------[ pom ]---------------------------------
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-surefire-plugin/2.19/maven-surefire-plugin-2.19.pom
Downloaded from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-surefire-plugin/2.19/maven-surefire-plugin-2.19.pom (5.6 kB at 39 kB/s)
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/surefire/surefire/2.19/surefire-2.19.pom
Downloaded from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/surefire/surefire/2.19/surefire-2.19.pom (18 kB at 12 kB/s)
Downloading from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-surefire-plugin/2.19/maven-surefire-plugin-2.19.jar
Downloaded from aliyunmaven: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-surefire-plugin/2.19/maven-surefire-plugin-2.19.jar (38 kB at 1.2 kB/s)
[INFO]
[INFO] --- versions-maven-plugin:2.7:set (default-cli) @ ambari-metrics ---
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: /root/ambari-2.7.5/apache-ambari-2.7.5-src
[INFO] Processing change of org.apache.ambari:ambari-metrics:2.7.5.0.0 -> 2.7.5.0.0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ambari-utility 1.0.0.0-SNAPSHOT .................... SKIPPED
[INFO] ambari-metrics 2.7.5.0.0 ........................... SUCCESS [ 34.592 s]
[INFO] Ambari Metrics Common 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Metrics Hadoop Sink 2.7.5.0.0 ............... SKIPPED
[INFO] Ambari Metrics Flume Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Kafka Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) 2.7.5.0.0 ....... SKIPPED
[INFO] Ambari Metrics Collector 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Metrics Monitor 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Grafana 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Host Aggregator 2.7.5.0.0 ........... SKIPPED
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:19 min
[INFO] Finished at: 2020-01-13T11:05:53+08:00
[INFO] ------------------------------------------------------------------------
1.1.5 popd
[root@master ambari-metrics] popd
~/ambari-2.7.5/apache-ambari-2.7.5-src
1.2 build
[root@master apache-ambari-2.7.5-src] mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"
#补充说明:# -B参数:该参数表示让Maven使用批处理模式构建项目,能够避免一些需要人工参与交互而造成的挂起状态。# 如果第一次编译报错之后,重新编译有问题,则在命令中加上 -Drat.skip=true
# -X:如果看详细debug信息可加上该参数
#[root@master apache-ambari-2.7.5-src]# mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X#因为会报错,重复执行mvn,把clean去掉可以快不少
#[root@master apache-ambari-2.7.5-src]# mvn -B install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X#从某个点开始恢复,就不用把之前build好的再重新来一次了如果报错末提示如:mvn <args> -rf :ambari-metrics-storm-sink-legacy
#[root@master apache-ambari-2.7.5-src]# mvn -B install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X -rf :ambari-metrics-storm-sink-legacy
build过程报错及解决办法:
---1. 这个错误可能是因为网络原因,再次重新执行就没有了
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:05 min
[INFO] Finished at: 2020-01-13T11:19:24+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ambari: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Could not transfer artifact org.codehaus.plexus:plexus-utils:jar:3.0 from/to aliyunmaven (https://maven.aliyun.com/repository/public): GET request of: org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar from aliyunmaven failed: Connection reset -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException---2. Unable to build the RPM: Error while executing process. Cannot run program "rpmbuild" (in directory "/root/ambari-2.7.5/apache-ambari-2.7.5-src/target/rpm/ambari/SPECS"): error=2, 没有那个文件或目录 -> [Help 1]---这个错误是因为需要rpm-build工具去生成rpm包,yum安装一下再重新执行就过去了
--yum install rpm 执行安装了rpm这个好像没包含,所以需要指定是rpm-build
--yum install -y rpm-build
-- 其实在root执行rpmbuild很要命的,因为权限太大,如果rpm的spec文件写不好,可能会把系统搞坏,一般不建议在root下执行,这里暂且这么执行吧[ERROR] Failed to execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.4:rpm (default-cli) on project ambari: Unable to build the RPM: Error while executing process. Cannot run program "rpmbuild" (in directory "/root/ambari-2.7.5/apache-ambari-2.7.5-src/target/rpm/ambari/SPECS"): error=2, 没有那个文件或目录 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException--- 3. ambari-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v0.23.2/yarn-v0.23.2.tar.gz
--看到这个报错,感觉也是网络原因,重复执行了几次命令一直过不去
--只能手动下载yarn-v0.23.2.tar.gz了,其实才4M,wget下载一直不能建立连接,浏览器下快一点
--将下载的包替换到目录/root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-yarn (install node and yarn) on project ambari-web: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v0.23.2/yarn-v0.23.2.tar.gz: Connection reset -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ambari-web
---------详细报错----------
-- 加-X参数得到详细信息
--mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -X
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.650 s
[INFO] Finished at: 2020-01-13T14:15:40+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-yarn (install node and yarn) on project ambari-web: Could not extract the Yarn archive: Could not extract archive: '/root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz': Input is not in the .gz format -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:install-node-and-yarn (install node and yarn) on project ambari-web: Could not extract the Yarn archive: Could not extract archive: '/root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz'at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke (Method.java:498)at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: Could not extract the Yarn archive: Could not extract archive: '/root/.m2/repository/com/github/eirslett/yarn/0.23.2/yarn-0.23.2./yarn-v0.23.2.tar.gz'at com.github.eirslett.maven.plugins.frontend.mojo.MojoUtils.toMojoFailureException (MojoUtils.java:28)---4. Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed.
---删除编译报错目录下的*.lastUpdated文件,重新编译
-- 关于lastUpdated生成原因,删除参见https://blog.csdn.net/u011990675/article/details/80066897,一定要看一下
-- 删除命令 find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;
-- 并且先把maven settings.xml中配置的aliyun mirror注掉,因为不注掉去aliyun拿不到相应的包就报错了
-- 安装node8.17 还是过不去于是于ambari-web下手动build它 ,报错5
-- npm install
-- brunch build
-- yarn install --ignore-engines --pure-lockfile
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:27 min
[INFO] Finished at: 2020-01-13T14:53:02+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:yarn (yarn install) on project ambari-web: Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ambari-web---- 5. 在ambari-web下yarn install --ignore-engines --pure-lockfile 报错
---run npm config set strict-ssl false to disbale strictSSL 也许是这个管用了
---run npm install
---run npm config set strict-ssl true to restore strictSSL
---反正一顿糊折腾,还是不行,再重新回到根目录mvn就行了
PhantomJS not found on PATH
Phantom installation failed TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefinedat validateString (internal/validators.js:125:11)at Object.join (path.js:1147:7)at findSuitableTempDirectory (/root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-web/node_modules/phantomjs/install.js:127:30)at /root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-web/node_modules/phantomjs/install.js:476:19at nextTickCallback (/root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-web/node_modules/kew/kew.js:47:28)at process._tickCallback (internal/process/next_tick.js:61:11) TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefinedat validateString (internal/validators.js:125:11)at Object.join (path.js:1147:7)at findSuitableTempDirectory (/root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-web/node_modules/phantomjs/install.js:127:30)--6. 关掉aliyun的mvn镜像,这些包下不到
[ERROR] Failed to execute goal on project ambari-metrics-storm-sink-legacy: Could not resolve dependencies for project org.apache.ambari:ambari-metrics-storm-sink-legacy:jar:2.7.5.0.0: Could not find artifact org.apache.storm:storm-core:jar:0.10.0.2.3.0.0-2557 in aliyunmaven (https://maven.aliyun.com/repository/public) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project ambari-metrics-storm-sink-legacy: Could not resolve dependencies for project org.apache.ambari:ambari-metrics-storm-sink-legacy:jar:2.7.5.0.0: Could not find artifact org.apache.storm:storm-core:jar:0.10.0.2.3.0.0-2557 in aliyunmaven (https://maven.aliyun.com/repository/public)at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)--7. Remote host closed connection during handshake: SSL peer shut down incorrectly
-- 添加执行参数 -Djavax.net.debug=ssl,handshake 加了还是报
--观察日志BasicRepositoryConnector-repo.hortonworks.com-11-4, READ: TLSv1.2 Application Data, length = 16464
--.bash_profile添加环境变量 export https.protocols=TLSv1,TLSv1.1,TLSv1.2
--或者 mvn -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2
--或者 export MAVEN_OPTS=-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2
--这个执行过去以后,如果后边儿的project报错找不到依赖,记录取消这个https.protocols配置
--再出现一样问题,再添加[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ambari-metrics-storm-sink-legacy: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.codehaus.plexus:plexus-utils:jar:3.0: Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:3.0: Could not transfer artifact org.codehaus.plexus:plexus-utils:pom:3.0 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.pom: Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ambari-metrics-storm-sink-legacy: Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.codehaus.plexus:plexus-utils:jar:3.0--8.error: command 'gcc' failed with exit status 1
--安装一下就可以了 yum -y install python-devel--9. build ambari-logsearch-web的时候报错,所以就到工程目录下单独执行yarn install --ignore-engines --pure-lockfile结果在报错信息发现 make: g++:命令未找到
--yum -y install gcc-c++
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project ambari-logsearch-web: Failed to run task: 'yarn install --ignore-engines --pure-lockfile' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project ambari-logsearch-web: Failed to run taskat org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
1.3 build过程报错处理技巧
总体报错解决技巧:
build过程几个反复做的解决方式,其它的或看上面有没有,或根据实际报错提示解决
切换镜像,配置了一个aliyun镜像,但是有的包可能下载不到,会报dependencies could not be resolved
这个时候就要先注释掉,使用默认镜像
每次切换镜像要先执行一下find ~/.m2/repository/ -name "*.lastUpdated" -exec rm -rf {} \;
再重新执行mvn命令一般如果停留在某个包download好久都不动了,可能这个包就比较大,容易超时,可以根据日志把下载路径拷贝到浏览器下载,然后手动放到要下载到的目录中,然后重新mvn,加上-rf参数
--比如这个包就很大,737MB,从get地址浏览器下载好了,手动放到to的地址里去这样比较快 Download Phoenix:[mkdir] Skipping /root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded because it already exists.[get] Getting: https://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/3.x/BUILDS/3.1.4.0-315/tars/phoenix/phoenix-5.0.0.3.1.4.0-315.tar.gz[get] To: /root/ambari-2.7.5/apache-ambari-2.7.5-src/ambari-metrics/ambari-metrics-timelineservice/target/embedded/phoenix.tar.gz
如果报错报Remote host closed connection during handshake: SSL peer shut down incorrectly这样的mvn执行命令加上参数-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2重新执行即可
如果报错末提示如:
mvn <args> -rf :ambari-metrics-storm-sink-legacy
,那么就在mvn命令后添加参数,表示从当前位置恢复build,之前build成功的就不重新build了,会节省大量时间每次报错后重新执行mvn命令,可把clean去掉,也可以节省时间
总之,磕磕绊绊需要执行很多次
#成功编译了一遍之后,再重新编译就快多了,担是把clean去掉了
##########################################
###############1.第一次执行###########
##########################################
[root@master apache-ambari-2.7.5-src]# mvn -B install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main 2.7.5.0.0 .............................. SUCCESS [ 2.533 s]
[INFO] Apache Ambari Project POM 2.7.5.0.0 ................ SUCCESS [ 0.215 s]
[INFO] Ambari Web 2.7.5.0.0 ............................... SUCCESS [03:35 min]
[INFO] Ambari Views 2.7.5.0.0 ............................. SUCCESS [06:50 min]
[INFO] Ambari Admin View 2.7.5.0.0 ........................ SUCCESS [ 53.010 s]
[INFO] ambari-utility 1.0.0.0-SNAPSHOT .................... SUCCESS [37:45 min]
[INFO] ambari-metrics 2.7.5.0.0 ........................... SUCCESS [ 0.715 s]
[INFO] Ambari Metrics Common 2.7.5.0.0 .................... SUCCESS [ 20.608 s]
[INFO] Ambari Metrics Hadoop Sink 2.7.5.0.0 ............... SUCCESS [ 55.778 s]
[INFO] Ambari Metrics Flume Sink 2.7.5.0.0 ................ SUCCESS [ 4.364 s]
[INFO] Ambari Metrics Kafka Sink 2.7.5.0.0 ................ SUCCESS [ 17.388 s]
[INFO] Ambari Metrics Storm Sink 2.7.5.0.0 ................ SUCCESS [ 2.863 s]
[INFO] Ambari Metrics Storm Sink (Legacy) 2.7.5.0.0 ....... SUCCESS [ 2.616 s]
[INFO] Ambari Metrics Collector 2.7.5.0.0 ................. FAILURE [05:09 min]
[INFO] Ambari Metrics Monitor 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Grafana 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Host Aggregator 2.7.5.0.0 ........... SKIPPED
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Service Advisor 1.0.0.0-SNAPSHOT ............ SKIPPED
[INFO] Ambari Server 2.7.5.0.0 ............................ SKIPPED
[INFO] Ambari Functional Tests 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Agent 2.7.5.0.0 ............................. SKIPPED
[INFO] ambari-logsearch 2.7.5.0.0 ......................... SKIPPED
[INFO] Ambari Logsearch Appender 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Config Api 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Config JSON 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Solr 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Zookeeper 2.7.5.0.0 ........ SKIPPED
[INFO] Ambari Logsearch Config Local 2.7.5.0.0 ............ SKIPPED
[INFO] Ambari Logsearch Log Feeder Plugin Api 2.7.5.0.0 ... SKIPPED
[INFO] Ambari Logsearch Log Feeder Container Registry 2.7.5.0.0 SKIPPED
[INFO] Ambari Logsearch Log Feeder 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Web 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Logsearch Server 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Logsearch Assembly 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Integration Test 2.7.5.0.0 ........ SKIPPED
[INFO] ambari-infra 2.7.5.0.0 ............................. SKIPPED
[INFO] Ambari Infra Solr Client 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Solr Plugin 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Manager 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Infra Assembly 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Infra Manager Integration Tests 2.7.5.0.0 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56:02 min
[INFO] Finished at: 2020-01-18T12:26:54+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project ambari-metrics-timelineservice: Could not resolve dependencies for project org.apache.ambari:ambari-metrics-timelineservice:jar:2.7.5.0.0: Failed to collect dependencies at org.apache.phoenix:phoenix-core:jar:5.0.0.3.1.4.0-315 -> org.apache.hbase:hbase-mapreduce:jar:2.0.2.3.1.4.0-315 -> org.apache.hbase:hbase-server:jar:2.0.2.3.1.4.0-315 -> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 -> org.glassfish:javax.el:jar:3.0.1-b11-SNAPSHOT: Failed to read artifact descriptor for org.glassfish:javax.el:jar:3.0.1-b11-SNAPSHOT: Could not transfer artifact org.glassfish:javax.el:pom:3.0.1-b11-SNAPSHOT from/to apache-snapshots (https://repository.apache.org/content/repositories/snapshots): Transfer failed for https://repository.apache.org/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b11-SNAPSHOT/javax.el-3.0.1-b11-SNAPSHOT.pom: Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ambari-metrics-timelineservice
##########################################
###############2.第二次执行###########
##########################################
[root@master apache-ambari-2.7.5-src]# mvn -B install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X -rf :ambari-metrics-timelineservice
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Metrics Collector 2.7.5.0.0 ................. SUCCESS [04:10 min]
[INFO] Ambari Metrics Monitor 2.7.5.0.0 ................... SUCCESS [ 2.184 s]
[INFO] Ambari Metrics Grafana 2.7.5.0.0 ................... SUCCESS [ 14.832 s]
[INFO] Ambari Metrics Host Aggregator 2.7.5.0.0 ........... SUCCESS [ 14.159 s]
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. FAILURE [01:10 min]
[INFO] Ambari Service Advisor 1.0.0.0-SNAPSHOT ............ SKIPPED
[INFO] Ambari Server 2.7.5.0.0 ............................ SKIPPED
[INFO] Ambari Functional Tests 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Agent 2.7.5.0.0 ............................. SKIPPED
[INFO] ambari-logsearch 2.7.5.0.0 ......................... SKIPPED
[INFO] Ambari Logsearch Appender 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Config Api 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Config JSON 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Solr 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Zookeeper 2.7.5.0.0 ........ SKIPPED
[INFO] Ambari Logsearch Config Local 2.7.5.0.0 ............ SKIPPED
[INFO] Ambari Logsearch Log Feeder Plugin Api 2.7.5.0.0 ... SKIPPED
[INFO] Ambari Logsearch Log Feeder Container Registry 2.7.5.0.0 SKIPPED
[INFO] Ambari Logsearch Log Feeder 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Web 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Logsearch Server 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Logsearch Assembly 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Integration Test 2.7.5.0.0 ........ SKIPPED
[INFO] ambari-infra 2.7.5.0.0 ............................. SKIPPED
[INFO] Ambari Infra Solr Client 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Solr Plugin 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Manager 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Infra Assembly 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Infra Manager Integration Tests 2.7.5.0.0 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:53 min
[INFO] Finished at: 2020-01-18T12:35:34+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (download-hadoop) on project ambari-metrics-assembly: An Ant BuildException has occured: java.net.ConnectException: 拒绝连接 (Connection refused)
...
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :ambari-metrics-assembly
##########################################
###############3.第三次执行###########
##########################################
[root@master apache-ambari-2.7.5-src]# mvn -B install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6" -Drat.skip=true -X -rf :ambari-metrics-assembly[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. SUCCESS [02:33 min]
[INFO] Ambari Service Advisor 1.0.0.0-SNAPSHOT ............ SUCCESS [ 4.050 s]
[INFO] Ambari Server 2.7.5.0.0 ............................ SUCCESS [ 01:10 h]
[INFO] Ambari Functional Tests 2.7.5.0.0 .................. SUCCESS [ 25.651 s]
[INFO] Ambari Agent 2.7.5.0.0 ............................. SUCCESS [19:47 min]
[INFO] ambari-logsearch 2.7.5.0.0 ......................... SUCCESS [ 0.506 s]
[INFO] Ambari Logsearch Appender 2.7.5.0.0 ................ SUCCESS [ 1.043 s]
[INFO] Ambari Logsearch Config Api 2.7.5.0.0 .............. SUCCESS [ 0.394 s]
[INFO] Ambari Logsearch Config JSON 2.7.5.0.0 ............. SUCCESS [ 0.319 s]
[INFO] Ambari Logsearch Config Solr 2.7.5.0.0 ............. SUCCESS [ 0.401 s]
[INFO] Ambari Logsearch Config Zookeeper 2.7.5.0.0 ........ SUCCESS [ 0.349 s]
[INFO] Ambari Logsearch Config Local 2.7.5.0.0 ............ SUCCESS [ 0.269 s]
[INFO] Ambari Logsearch Log Feeder Plugin Api 2.7.5.0.0 ... SUCCESS [ 0.403 s]
[INFO] Ambari Logsearch Log Feeder Container Registry 2.7.5.0.0 SUCCESS [ 0.686 s]
[INFO] Ambari Logsearch Log Feeder 2.7.5.0.0 .............. SUCCESS [ 5.368 s]
[INFO] Ambari Logsearch Web 2.7.5.0.0 ..................... SUCCESS [01:55 min]
[INFO] Ambari Logsearch Server 2.7.5.0.0 .................. SUCCESS [ 14.606 s]
[INFO] Ambari Logsearch Assembly 2.7.5.0.0 ................ SUCCESS [ 0.574 s]
[INFO] Ambari Logsearch Integration Test 2.7.5.0.0 ........ SUCCESS [ 1.408 s]
[INFO] ambari-infra 2.7.5.0.0 ............................. SUCCESS [ 0.373 s]
[INFO] Ambari Infra Solr Client 2.7.5.0.0 ................. SUCCESS [04:50 min]
[INFO] Ambari Infra Solr Plugin 2.7.5.0.0 ................. SUCCESS [ 0.649 s]
[INFO] Ambari Infra Manager 2.7.5.0.0 ..................... SUCCESS [ 11.038 s]
[INFO] Ambari Infra Assembly 2.7.5.0.0 .................... SUCCESS [ 0.666 s]
[INFO] Ambari Infra Manager Integration Tests 2.7.5.0.0 ... SUCCESS [ 21.436 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:40 h
[INFO] Finished at: 2020-01-18T14:17:59+08:00
[INFO] ------------------------------------------------------------------------
2. install 过程问题
Step 2: Install Ambari Server
Install the rpm package from ambari-server/target/rpm/ambari-server/RPMS/noarch/
yum install ambari-server*.rpm #This should also pull in postgres packages as well.
Step 3: Setup and Start Ambari Server
Run the setup command to configure your Ambari Server, Database, JDK, LDAP, and other options:
[root@host-10-1-236-60 jiazz]# ambari-server setup
/usr/sbin/ambari-server: line 34: buildNumber: unbound variable
解决办法:
是因为build的时候,应该给一个buildNumber,而我build的时候没给
所以需要自己给一个这个变量的值
#mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"
[root@host-10-211-55-60 installHdp]# export buildNumber=2.7.5.0
You have new mail in /var/spool/mail/root
[root@host-10-211-55-60 installHdp]# ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):root
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
Enter choice (1):
....可以正常安装了
但我还是重新build了ambari,重新安装:
[root@host-10-211-55-60 installHdp]# ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'disabled'
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership...
Checking firewall status...
WARNING: iptables is running. Confirm the necessary Ambari ports are accessible. Refer to the Ambari documentation for more details on ports.
OK to continue [y/n] (y)? y
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
Enter choice (1): 1
JDK already exists, using /var/lib/ambari-server/resources/jdk-8u112-linux-x64.tar.gz
Installing JDK to /usr/jdk64/
Successfully installed JDK to /usr/jdk64/
Downloading JCE Policy archive from http://public-repo-1.hortonworks.com/ARTIFACTS/jce_policy-8.zip to /var/lib/ambari-server/resources/jce_policy-8.zipSuccessfully downloaded JCE Policy archive to /var/lib/ambari-server/resources/jce_policy-8.zip
Installing JCE policy...
Check JDK version for Ambari Server...
JDK version found: 8
Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? y
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (1): 3
Hostname (localhost): host-10-211-55-60
Port (3306):
Database name (ambari):
Username (ambari): root
Enter Database Password (bigdata):
Configuring ambari database...
Should ambari use existing default jdbc /usr/share/java/mysql-connector-java.jar [y/n] (y)? y
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL directly from the database shell to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)? y
Extracting system views...
ambari-admin-2.7.5.0.72.jarAmbari repo file doesn't contain latest json url, skipping repoinfos modification
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
ambari-server start 报错:
2020-02-22 14:30:11,292 ERROR [main] AmbariServer:1120 - Failed to run the Ambari Server
Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ambari.metainfo' doesn't exist
Error Code: 1146
Call: SELECT `metainfo_key`, `metainfo_value` FROM metainfo WHERE (`metainfo_key` = ?)bind => [1 parameter bound]
Query: ReadObjectQuery(name="readMetainfoEntity" referenceClass=MetainfoEntity sql="SELECT `metainfo_key`, `metainfo_value` FROM metainfo WHERE (`metainfo_key` = ?)")at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684)at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:560)at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2055)at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:570)at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:242)at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:714)at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2803)at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2756)at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:555)at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1175)at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:904)at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1134)at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:441)at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1222)at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2896)at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1857)at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1839)at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1790)at org.eclipse.persistence.internal.jpa.EntityManagerImpl.executeQuery(EntityManagerImpl.java:911)at org.eclipse.persistence.internal.jpa.EntityManagerImpl.findInternal(EntityManagerImpl.java:854)at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:730)at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:599)at org.apache.ambari.server.orm.dao.MetainfoDAO.findByKey(MetainfoDAO.java:44)at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:44)at org.apache.ambari.server.checks.DatabaseConsistencyCheckHelper.checkDBVersionCompatible(DatabaseConsistencyCheckHelper.java:230)at org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:1105)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ambari.metainfo' doesn't existat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)at java.lang.reflect.Constructor.newInstance(Constructor.java:423)at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)at com.mysql.jdbc.Util.getInstance(Util.java:386)at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2820)at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2159)at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2326)at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:431)at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:1009)at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)... 26 more
解决办法:
看报信息是说ambari数据库里没有表metainfo,所以我们可能是少了某个步骤
## 进入数据库查看:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| aipaas |
| ambari |
| hive |
| mysql |
| ocmanager |
| performance_schema |
| ranger |
+--------------------+
8 rows in set (0.00 sec)mysql> use ambari;
Database changed
mysql> show tables;
Empty set (0.00 sec)## 创建相应元数据表
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
mysql> show tables;
+-------------------------------+
| Tables_in_ambari |
+-------------------------------+
| ClusterHostMapping |
| QRTZ_BLOB_TRIGGERS |
| QRTZ_CALENDARS |
| QRTZ_CRON_TRIGGERS |
| QRTZ_FIRED_TRIGGERS |
| QRTZ_JOB_DETAILS |
| QRTZ_LOCKS |
| QRTZ_PAUSED_TRIGGER_GRPS |
| QRTZ_SCHEDULER_STATE |
| QRTZ_SIMPLE_TRIGGERS |
| QRTZ_SIMPROP_TRIGGERS |
| QRTZ_TRIGGERS |
| adminpermission |
| adminprincipal |
| adminprincipaltype |
| adminprivilege |
| adminresource |
| adminresourcetype |
| alert_current |
| alert_definition |
| alert_group |
| alert_group_target |
| alert_grouping |
| alert_history |
| alert_notice |
| alert_target |
| alert_target_states |
| ambari_configuration |
| ambari_operation_history |
| ambari_sequences |
| artifact |
| blueprint |
| blueprint_configuration |
| blueprint_setting |
| clusterconfig |
| clusters |
| clusterservices |
| clusterstate |
| confgroupclusterconfigmapping |
| configgroup |
| configgrouphostmapping |
| execution_command |
| extension |
| extensionlink |
| groups |
| host_role_command |
| host_version |
| hostcomponentdesiredstate |
| hostcomponentstate |
| hostconfigmapping |
| hostgroup |
| hostgroup_component |
| hostgroup_configuration |
| hosts |
| hoststate |
| kerberos_descriptor |
| kerberos_keytab |
| kerberos_keytab_principal |
| kerberos_principal |
| key_value_store |
| kkp_mapping_service |
| members |
| metainfo |
| permission_roleauthorization |
| remoteambaricluster |
| remoteambariclusterservice |
| repo_applicable_services |
| repo_definition |
| repo_os |
| repo_tags |
| repo_version |
| request |
| requestoperationlevel |
| requestresourcefilter |
| requestschedule |
| requestschedulebatchrequest |
| role_success_criteria |
| roleauthorization |
| servicecomponent_version |
| servicecomponentdesiredstate |
| serviceconfig |
| serviceconfighosts |
| serviceconfigmapping |
| servicedesiredstate |
| setting |
| stack |
| stage |
| topology_host_info |
| topology_host_request |
| topology_host_task |
| topology_hostgroup |
| topology_logical_request |
| topology_logical_task |
| topology_request |
| upgrade |
| upgrade_group |
| upgrade_history |
| upgrade_item |
| user_authentication |
| users |
| viewentity |
| viewinstance |
| viewinstancedata |
| viewinstanceproperty |
| viewmain |
| viewparameter |
| viewresource |
| viewurl |
| widget |
| widget_layout |
| widget_layout_user_widget |
+-------------------------------+
111 rows in set (0.00 sec)
重新启动ambari-server restart
就成功了。
Step 4: Install and Start Ambari Agent on All Hosts
这一步需要在ambari的所有主机执行
拷贝 ambari-agent/target/rpm/ambari-agent/RPMS/x86_64/ 下的rpm并执行命令:
yum install ambari-agent*.rpm
编辑 /etc/ambari-agent/ambari.ini
[server]
hostname=host-10-211-55-60
确保[server]下列出所有ambari主机
启动ambari-agent
[root@host-10-211-55-60 installHdp]# ambari-agent start
Verifying Python version compatibility...
Using python /usr/bin/python
Checking for previously running Ambari Agent...
Checking ambari-common dir...
Starting ambari-agent
Verifying ambari-agent process status...
Ambari Agent successfully started
Agent PID at: /run/ambari-agent/ambari-agent.pid
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.log
3. 访问页面
访问页面http://10.211.55.60:8080/
创建集群的时候,不知道为啥是空,待解决
【Ambari】Build and install Ambari 2.7.5相关推荐
- 【大数据入门核心技术-Ambari】(一)Ambari介绍
一.什么是Ambari Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应.管理和监控.Ambari已支持大多数Hadoop组件,包括HDFS.MapReduc ...
- 【转】Build Your own Simplified AngularJS in 200 Lines of JavaScript
原文:http://blog.mgechev.com/2015/03/09/build-learn-your-own-light-lightweight-angularjs/ Build Your o ...
- 解决:【VUE】build Cannot find module ‘gifsicle‘
项目场景: 软件:VSCode 环境:Vue.Node.Npm 问题描述: build Cannot find module 'gifsicle' 解决方案: 1.删除项目中的image-webpac ...
- 【CMake】cmake的install指令
在cmake的时候,最常见的几个步骤就是: mkdir build && cd build cmake .. make make install 那么,make install的时候, ...
- 【转】How to install VNC server on ubuntu 14.04
转自:https://www.krizna.com/ubuntu/install-vnc-server-ubuntu-14-04/ VNC server is used to share graphi ...
- 【UE】BUILD ERROR: Missing precompiled manifest for ‘****‘.
编译报错完整信息: Error: Missing precompiled manifest for '***'. This module was most likely not flagged for ...
- 【Hadoop】Build and Execute
Hadoop官方wiki上介绍了如何用Maven编译和生成Eclipse项目,但是它需要hadoop-common的trunk代码,因为只有trunk上有pom.xml文件.而对于其他release版 ...
- 【FCC】Build a Tribute Page(html+css+bootstrap)
基本构建 HTML: <!--网格系统--> <div class="container"><!--超大屏幕--><div class=& ...
- 【pyenv】解决 pyenv install 国内下载缓慢的问题
直接上命令 wget https://registry.npmmirror.com/-/binary/python/3.9.0/Python-3.9.0.tar.xz -P ~/.pyenv/cach ...
最新文章
- 吐血推荐:win下如何安装tensorflow?只需两步!!
- VMware虚拟机上的文件如何和Windows进行共享
- 微博feed系统的推(push)模式和拉(pull)模式和时间分区拉模式架构探讨
- 我的spark学习之路(三):利用spark做回归分析
- JSP自定义标签学习笔记
- 无法将成员变量添加到ID为 的控件中
- 一步步通过命令行cl.exe编译Windows程序
- ngix 创建新的网站
- 记一次反制追踪溯本求源
- PHP实现生成二维码的示例代码
- 计算机一级误差怎么计算,(excel最大偏差公式)偏离值怎么计算
- 【到底什么才是电角度呢?如何使用示波器精准的测量电角度呢?】
- 将texlive带的字体安装进linux系统字体库
- 【noi.ac #1759】ZYB的测验计划
- 同盾科技声纹识别建模大赛
- window解决端口号被占用
- 鸿蒙兼容安卓,华为鸿蒙OS正式官宣!兼容安卓程序,网友反应却水火不容
- 苹果手机怎么编辑word文档_Word文档怎么转化为pdf格式?办公必备方法!
- 微博营销有什么价值?应注意什么?
- Win7 将 resync 命令发送到本地计算机 此计算机没有重新同步,因为要求的时间更改太大