Flink本地模式启动时Task Managers启动失败

环境:

修改前

启动命令:/usr/local/src/flink-1.7.2

           启动信息:Starting cluster.

           Starting standalonesession daemon on host basic.
           Starting taskexecutor daemon on host basic.
           终止命令:./bin/stop-cluster.sh

终止信息:

No taskexecutor daemon (pid: 3589) is running anymore on basic.
           No standalonesession daemon (pid: 3153) is running anymore on basic.

修改前页面信息:

http://192.168.159.13:8081/#/overview 

Flink本地模式启动时Task Managers启动失败_第1张图片

原因分析:

因为虚拟机创建时使用的主机名为 basic,但是未在host文件中指定映射,故找不到对应的主机信息,无法启动

报错信息如下:

Flink本地模式启动时Task Managers启动失败_第2张图片

修改host文件:vim /etc/hosts

关闭集群重新启动即可:

[root@basic flink-1.7.2]# ./bin/stop-cluster.sh
No taskexecutor daemon (pid: 7822) is running anymore on basic.
No standalonesession daemon (pid: 7371) is running anymore on basic.

Starting cluster.
[INFO] 1 instance(s) of standalonesession are already running on basic.
Starting standalonesession daemon on host basic.
Starting taskexecutor daemon on host basic.
启动成功后界面如下:

Flink本地模式启动时Task Managers启动失败_第3张图片

[INFO] 1 instance(s) of standalonesession are already running on basic.
Starting standalonesession daemon on host basic.
Starting taskexecutor daemon on host basic.
 

你可能感兴趣的:(Flink本地模式启动时Task Managers启动失败)