maciejwalkowiak / just

Magical 🪄 command line toolkit for developing 🍃 Spring Boot apps
312 stars 6 forks source link

Exception thrown when executing `just kill -p <PORT` #37

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi, I encountered the following exception when running the kill command. I was using it to start my personal project: https://github.com/MKKnapinski/parking-share

Steps:

just | Just 0.12.0 just | ✅ License valid until 2023-01-31 just | Application run failed java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86-64/libjnidispatch.so) not found in resource path () at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1033) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:989) at com.sun.jna.Native.(Native.java:195) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy$LibC.(RootlessDockerClientProviderStrategy.java:96) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy.lambda$null$0(RootlessDockerClientProviderStrategy.java:37) at java.base@17.0.5/java.util.Optional.orElseGet(Optional.java:364) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy.lambda$resolveSocketPath$1(RootlessDockerClientProviderStrategy.java:36) at java.base@17.0.5/java.util.Optional.orElseGet(Optional.java:364) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy.resolveSocketPath(RootlessDockerClientProviderStrategy.java:33) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy.getSocketPath(RootlessDockerClientProviderStrategy.java:27) at org.testcontainers.dockerclient.RootlessDockerClientProviderStrategy.isApplicable(RootlessDockerClientProviderStrategy.java:82) at java.base@17.0.5/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base@17.0.5/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base@17.0.5/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) at java.base@17.0.5/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base@17.0.5/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base@17.0.5/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base@17.0.5/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base@17.0.5/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base@17.0.5/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base@17.0.5/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:246) at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:135) at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:171) at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:89) at com.github.dockerjava.api.DockerClientDelegate.listContainersCmd(DockerClientDelegate.java:188) at com.github.dockerjava.api.DockerClientDelegate.listContainersCmd(DockerClientDelegate.java:188) at com.maciejwalkowiak.just.core.DockerService.findContainersListeningOnPort(DockerService.java:22) at com.maciejwalkowiak.just.command.kill.KillCommand.stopDockerContainer(KillCommand.java:65) at com.maciejwalkowiak.just.command.kill.KillCommand.execute(KillCommand.java:41) at com.maciejwalkowiak.just.command.BaseCommand.call(BaseCommand.java:49) at com.maciejwalkowiak.just.command.BaseCommand.call(BaseCommand.java:16) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at com.maciejwalkowiak.just.PicoCliRunner.run(PicoCliRunner.java:24) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:767) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:751) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) at com.maciejwalkowiak.just.Just.runSpringApp(Just.java:60) at com.maciejwalkowiak.just.Just.main(Just.java:43)

My environment:

Just version: 0.12.0

Just sha256sum: sha256sum $(which just) f9e31fa632338a2af26493d9112cfee452ea17dbc41a6e9cf22fc62fe7f1e9d8 /usr/local/bin/just

Java version: openjdk version "11.0.17" 2022-10-18 OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu222.04) OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu222.04, mixed mode)

OS: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

Let me know if you need anything else.

maciejwalkowiak commented 1 year ago

Thanks a lot for reporting. This must be a Linux specific issue. I'll dig into it

maciejwalkowiak commented 1 year ago

Update: I ordered a PC to get proper testing setup on linux.