Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2795

how to install apache flink on wsl2 ubuntu of windows 11

$
0
0

Below is my Apache Flink Installation process on wsl2 ubuntu of Windows 11.

First, openjdk-11 installation

$ sudo apt update$ sudo apt upgrade$ sudo apt install openjdk-11-jdk

systemd installation,

$ sudo nano /etc/wsl.conf[boot]systemd=true

download and unzip flink-1.18.1 and make link of flink-1.18.1

$ ln -s flink-1.18.1 flink$ pwd /home/jhwang$ lsflink flink-1.18.1

creation of flink.service on /usr/lib/systemd/system

$ nano /usr/lib/systemd/system/flink.service[Unit]Description=Flink Service[Service]Type=simpleUser=jhwangGroup=jhwangEnvironment=JAVA_HOME=/usr/lib/jvm/jdkExecStart=/home/jhwang/flink/bin/start-cluster.shExecStop=/home/jhwang/flink/bin/stop-cluster.shRestart=always[Install]WantedBy=multi-user.target

Then I execute the systemctl of flink,

$ sudo systemctl enable flink$ sudo systemctl start flink

But the flink system daemon is deactivated immediately.

● flink.service - Flink Service     Loaded: loaded (/lib/systemd/system/flink.service; enabled; vendor preset: enabled)     Active: deactivating (stop) since Fri 2024-02-16 08:33:03 KST; 2s ago    Process: 248179 ExecStart=/home/jhwang/flink/bin/start-cluster.sh (code=exited, status=0/SUCCESS)   Main PID: 248179 (code=exited, status=0/SUCCESS); Control PID: 248868 (bash)      Tasks: 67 (limit: 19187)     Memory: 257.8M     CGroup: /system.slice/flink.service├─248563 /usr/lib/jvm/jdk/bin/java -Xmx1073741824 -Xms1073741824 -XX:MaxMetaspaceSize=268435456 -XX:+Ignor>             ├─248868 bash /home/jhwang/flink/bin/stop-cluster.sh├─249273 bash /home/jhwang/flink-1.18.1/bin/jobmanager.sh stop├─249382 bash /home/jhwang/flink-1.18.1/bin/flink-daemon.sh stop standalonesession├─249513 timeout 10 tail --pid=248563 -f /dev/null└─249515 tail --pid=248563 -f /dev/nullFeb 16 08:33:01 DESKTOP-7MNP0L0 systemd[1]: Started Flink Service.Feb 16 08:33:01 DESKTOP-7MNP0L0 start-cluster.sh[248179]: Starting cluster.Feb 16 08:33:02 DESKTOP-7MNP0L0 start-cluster.sh[248449]: Starting standalonesession daemon on host DESKTOP-7MNP0L0.Feb 16 08:33:03 DESKTOP-7MNP0L0 start-cluster.sh[248751]: Starting taskexecutor daemon on host DESKTOP-7MNP0L0.Feb 16 08:33:03 DESKTOP-7MNP0L0 stop-cluster.sh[249116]: Stopping taskexecutor daemon (pid: 248865) on host DESKTOP-7MN>Feb 16 08:33:05 DESKTOP-7MNP0L0 stop-cluster.sh[249382]: Stopping standalonesession daemon (pid: 248563) on host DESKTO>lines 1-21/21 (END)...skipping...● flink.service - Flink Service     Loaded: loaded (/lib/systemd/system/flink.service; enabled; vendor preset: enabled)     Active: deactivating (stop) since Fri 2024-02-16 08:33:03 KST; 2s ago    Process: 248179 ExecStart=/home/jhwang/flink/bin/start-cluster.sh (code=exited, status=0/SUCCESS)   Main PID: 248179 (code=exited, status=0/SUCCESS); Control PID: 248868 (bash)      Tasks: 67 (limit: 19187)     Memory: 257.8M     CGroup: /system.slice/flink.service├─248563 /usr/lib/jvm/jdk/bin/java -Xmx1073741824 -Xms1073741824 -XX:MaxMetaspaceSize=268435456 -XX:+IgnoreUnrecognizedVMOptions --add-exports=java.base/sun.net.util=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tool>             ├─248868 bash /home/jhwang/flink/bin/stop-cluster.sh├─249273 bash /home/jhwang/flink-1.18.1/bin/jobmanager.sh stop├─249382 bash /home/jhwang/flink-1.18.1/bin/flink-daemon.sh stop standalonesession├─249513 timeout 10 tail --pid=248563 -f /dev/null└─249515 tail --pid=248563 -f /dev/nullFeb 16 08:33:01 DESKTOP-7MNP0L0 systemd[1]: Started Flink Service.Feb 16 08:33:01 DESKTOP-7MNP0L0 start-cluster.sh[248179]: Starting cluster.Feb 16 08:33:02 DESKTOP-7MNP0L0 start-cluster.sh[248449]: Starting standalonesession daemon on host DESKTOP-7MNP0L0.Feb 16 08:33:03 DESKTOP-7MNP0L0 start-cluster.sh[248751]: Starting taskexecutor daemon on host DESKTOP-7MNP0L0.Feb 16 08:33:03 DESKTOP-7MNP0L0 stop-cluster.sh[249116]: Stopping taskexecutor daemon (pid: 248865) on host DESKTOP-7MNP0L0.

Does this installation process contain wrong command or miss something? Kindly inform me how to install apache flink on wsl2 ubuntu. Best regards


Viewing all articles
Browse latest Browse all 2795

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>