问题描述
- Heron环境:Local 单节点
- 配置文件:local默认
提交topo时,出现如下错误信息:
yitian@heron01:~$ heron submit local ~/.heron/examples/heron-api-examples.jar com.twitter.heron.examples.api.WordCountTopology WordCountTopology --deploy-deactivated
[2018-06-05 04:01:38 +0000] [INFO]: Using cluster definition in /home/yitian/.heron/conf/local
[2018-06-05 04:01:38 +0000] [INFO]: Launching topology: 'WordCountTopology'
[2018-06-05 04:01:39 -0700] [INFO] com.twitter.heron.scheduler.local.LocalLauncher: core release package uri: file:///home/yitian/.heron/dist/heron-core.tar.gz
[2018-06-05 04:01:39 -0700] [SEVERE] com.twitter.heron.spi.utils.ShellUtils: Failed to run synced process
java.io.IOException: Cannot run program "curl" (in directory "/home/yitian/.herondata/topologies/local/yitian/WordCountTopology"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.twitter.heron.spi.utils.ShellUtils.runSyncProcess(ShellUtils.java:148)
at com.twitter.heron.spi.utils.ShellUtils.runSyncProcess(ShellUtils.java:74)
at com.twitter.heron.spi.utils.ShellUtils.curlPackage(ShellUtils.java:297)
at com.twitter.heron.scheduler.utils.SchedulerUtils.curlAndExtractPackage(SchedulerUtils.java:490)
at com.twitter.heron.scheduler.utils.SchedulerUtils.extractPackage(SchedulerUtils.java:467)
at com.twitter.heron.scheduler.local.LocalLauncher.setupWorkingDirectoryAndExtractPackages(LocalLauncher.java:134)
at com.twitter.heron.scheduler.local.LocalLauncher.launch(LocalLauncher.java:73)
at com.twitter.heron.scheduler.LaunchRunner.call(LaunchRunner.java:168)
at com.twitter.heron.scheduler.SubmitterMain.callLauncherRunner(SubmitterMain.java:549)
at com.twitter.heron.scheduler.SubmitterMain.submitTopology(SubmitterMain.java:453)
at com.twitter.heron.scheduler.SubmitterMain.main(SubmitterMain.java:327)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 11 more
[2018-06-05 04:01:39 -0700] [SEVERE] com.twitter.heron.scheduler.utils.SchedulerUtils: Failed to fetch package.
[2018-06-05 04:01:39 -0700] [SEVERE] com.twitter.heron.scheduler.local.LocalLauncher: Failed to setup working directory
[2018-06-05 04:01:39 -0700] [INFO] com.twitter.heron.uploader.localfs.LocalFileSystemUploader: Clean uploaded jar
[2018-06-05 04:01:39 +0000] [ERROR]: Failed to launch topology 'WordCountTopology'
[2018-06-05 04:01:39 +0000] [ERROR]: Failed to launch topology 'WordCountTopology'
问题解决
安装curl后,重新提交即可:
yitian@heron01:~$ curl
The program 'curl' is currently not installed. You can install it by typing:
sudo apt install curl
yitian@heron01:~$ sudo apt install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libcurl3-nss
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libcurl3-gnutls
The following NEW packages will be installed:
curl
The following packages will be upgraded:
libcurl3-gnutls
1 upgraded, 1 newly installed, 0 to remove and 412 not upgraded.
Need to get 139 kB/323 kB of archives.
After this operation, 340 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 curl amd64 7.47.0-1ubuntu2.8 [139 kB]
Fetched 139 kB in 2s (58.2 kB/s)
(Reading database ... 191540 files and directories currently installed.)
Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.8_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.8) over (7.47.0-1ubuntu2.2) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.47.0-1ubuntu2.8_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.8) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.8) ...
Setting up curl (7.47.0-1ubuntu2.8) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
yitian@heron01:~$ heron submit local ~/.heron/examples/heron-api-examples.jar com.twitter.heron.examples.api.WordCountTopology WordCountTopology --deploy-deactivated
[2018-06-05 04:03:25 +0000] [INFO]: Using cluster definition in /home/yitian/.heron/conf/local
[2018-06-05 04:03:25 +0000] [INFO]: Launching topology: 'WordCountTopology'
[2018-06-05 04:03:26 -0700] [INFO] com.twitter.heron.scheduler.local.LocalLauncher: core release package uri: file:///home/yitian/.heron/dist/heron-core.tar.gz
[2018-06-05 04:03:42 +0000] [INFO]: Successfully launched topology 'WordCountTopology'
yitian@heron01:~$ heron kill local WordCountTopology[2018-06-05 04:05:06 +0000] [INFO]: Using cluster definition in /home/yitian/.heron/conf/local
[2018-06-05 04:05:41 +0000] [INFO]: Successfully kill topology: WordCountTopology