且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于无法找到或加载主类错误,Flink 集群无法启动

更新时间:2022-01-12 23:25:34

我遇到了同样的问题,但现在我可以启动集群并看到 localhost:8081 UI.

I was experiencing the same issue, but now I am able to start the cluster and see the localhost:8081 UI.

这是我采取的步骤:

  1. 激活 Windows 的 WSL:https://www.thewindowsclub.com/how-to-run-sh-or-shell-script-file-in-windows-10(第 1 部分使用 WSL 执行 Shell 脚本文件)
  2. 让 Ubuntu for win 10 运行 Linux 命令(运行 .sh 文件),这可以通过进入 Microsoft Store 并下载首选的 Linux 发行版来实现.(或在 Windows 中打开 PowerShell,键入 bash 以获取简单信息)
  3. 在 Ubuntu 上安装 OpenJDK,如下:https://askubuntu.com/问题/746413/trying-to-install-java-8-unable-to-locate-package-openjdk-8-jre(先打开Linux shell,然后按照说明操作)
  1. Activation WSL for windows : https://www.thewindowsclub.com/how-to-run-sh-or-shell-script-file-in-windows-10 (part 1 Execute Shell Script file using WSL)
  2. Getting Ubuntu for win 10 to run Linux commands (running the .sh files), this can be achieved by going into Microsoft Store and downloading the preferred distribution of Linux. (Or open PowerShell in windows, type bash for easy info)
  3. Installing OpenJDK on the Ubuntu, following: https://askubuntu.com/questions/746413/trying-to-install-java-8-unable-to-locate-package-openjdk-8-jre (first open Linux shell, then follow the instructions)


完成这些步骤后,您应该可以在 Apache Flink 1.11.2 文件夹中打开 Linux Shell 并毫无问题地运行 ./bin/start-cluster.sh.


After these steps you should be able to open Linux Shell in Apache Flink 1.11.2 folder and run ./bin/start-cluster.sh without any problem.