
一,问题
在搭建Flink的时候,已经在linux服务器上运行了./start-cluster.sh, 而且日志显示已经成功了。

服务器上也没有开启防火墙

正常来说应该能通过ip:8081来访问(8081是Flink WebUI的默认端口),但是访问的时候,显示访问拒绝。
二,解决方法
进入到Flink目录的下conf目录,vi flink-conf.yaml
找到"Rest & web frontend"这个部分,将rest.bind-address: localhost修改成0.0.0.0, 这样就可以对外暴露webUI访问接口了。
改完之后保存,重启Flink

然后就可以通过ip:8081端口(可以在上面修改rest.port来实现,默认是8081)来访问了

问题解决!