contiki-ng / contiki-ng

Contiki-NG: The OS for Next Generation IoT Devices
https://www.contiki-ng.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 699 forks source link

Problem when starting Cooja simulator #2848

Open dfonovic opened 7 months ago

dfonovic commented 7 months ago

I got this error when I try to start Cooja simulator from Docker conatainer:

root@9e6c9da70970:~/contiki-ng# cooja Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

BUILD FAILED in 8s root@9e6c9da70970:~/contiki-ng#

pjonsson commented 7 months ago

Use the user user inside the container, not root.

yvshudrenko commented 2 months ago

I have the same error with the user:

Screenshot 2024-06-21 at 20 08 12
yvshudrenko commented 2 months ago

Might be related to Java 21 being the default, while Gradle 8.1.1 only supports Java 20.

user@f3d24c51036a:~/contiki-ng/tools/cooja$ java --version
java 21.0.3 2024-04-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37, mixed mode, sharing)
user@f3d24c51036a:~/contiki-ng/tools/cooja$ 
pjonsson commented 2 months ago

The Java 21 issue with Gradle 8.1.1 sounds plausible, try with an older contiki-ng image and see if that works better.

yvshudrenko commented 1 month ago

Recent images had the same issue, tried one randomly from a bit longer ago - 8f38c24bc0c292a0115b36eb9aad1efa4dddfd5aeecc12693c30cc170fc65a54, it works. There are still some hiccups related to X11 with M1 Mac, but it's a different story.

Not sure what's the deal here in general with macOS, seems to work fine on WSL with latest contiki image.