Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new devui config assumes certain files present #37743

Closed
maxandersen opened this issue Dec 14, 2023 · 12 comments
Closed

new devui config assumes certain files present #37743

maxandersen opened this issue Dec 14, 2023 · 12 comments
Labels
area/dev-ui area/jbang Issues related to when using jbang.dev with Quarkus kind/bug Something isn't working

Comments

@maxandersen
Copy link
Member

Describe the bug

git clone https://github.com/maxandersen/javaadvent-2023-quarkus-ai-scripting/blob/main/devhelper.java

run jbang --fresh -Dquarkus.dev -Dquarkus.console.enabled=false devhelper.java

now goto http://localhost:8080/q/dev-ui and try use the configuration view.

It will look like its frozen.

eventually in logs/errors you get:

2023-12-14 14:46:45,562 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-0) HTTP Request to /q/dev-ui/devui-data.js?1702561605554 failed, error id: 02c0a6fc-3068-4e43-8b25-fa2a1686b046-3 [Error Occurred After Shutdown]: java.nio.file.ClosedFileSystemException
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.ensureOpen(ZipFileSystem.java:1628)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.checkAccess(ZipFileSystem.java:560)
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.checkAccess(ZipPath.java:892)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.checkAccess(ZipFileSystemProvider.java:172)
	at java.base/java.nio.file.Files.exists(Files.java:2527)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.sendStatic(FileSystemStaticHandler.java:133)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.handle(FileSystemStaticHandler.java:86)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.handle(FileSystemStaticHandler.java:32)
	at io.quarkus.vertx.http.runtime.webjar.WebJarStaticHandler.handle(WebJarStaticHandler.java:94)
	at io.quarkus.vertx.http.runtime.webjar.WebJarStaticHandler.handle(WebJarStaticHandler.java:18)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1286)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:200)
	at io.quarkus.vertx.http.runtime.cors.CORSFilter.handle(CORSFilter.java:138)
	at io.quarkus.devui.runtime.DevUICORSFilter.handle(DevUICORSFilter.java:50)
	at io.quarkus.devui.runtime.DevUICORSFilter.handle(DevUICORSFilter.java:17)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1286)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:200)
...
 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-0) HTTP Request to /q/dev-ui/devui-data.js?1702561605554 failed, error id: 02c0a6fc-3068-4e43-8b25-fa2a1686b046-3 [Error Occurred After Shutdown]: java.nio.file.ClosedFileSystemException
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.ensureOpen(ZipFileSystem.java:1628)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.checkAccess(ZipFileSystem.java:560)
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.checkAccess(ZipPath.java:892)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.checkAccess(ZipFileSystemProvider.java:172)
	at java.base/java.nio.file.Files.exists(Files.java:2527)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.sendStatic(FileSystemStaticHandler.java:133)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.handle(FileSystemStaticHandler.java:86)
	at io.quarkus.vertx.http.runtime.devmode.FileSystemStaticHandler.handle(FileSystemStaticHandler.java:32)
	at io.quarkus.vertx.http.runtime.webjar.WebJarStaticHandler.handle(WebJarStaticHandler.java:94)
	at io.quarkus.vertx.http.runtime.webjar.WebJarStaticHandler.handle(WebJarStaticHandler.java:18)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1286)
	at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
	at io.vertx.ext.web.impl.RoutingContextWrapper.next(RoutingContextWrapper.java:200)
	at io.quarkus.vertx.http.runtime.cors.CORSFilter.handle(CORSFilter.java:138)
	at io.quarkus.devui.runtime.DevUICORSFilter.handle(DevUICORSFilter.java:50)
	at io.quarkus.devui.runtime.DevUICORSFilter.handle(DevUICORSFilter.java:17)
	at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1286)```

funny enough the devui config will try turn that exception into a table of values.

Expected behavior

dont fail when running with jbang.
dont treat errors as valid input when rendering config ui.

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@maxandersen maxandersen added the kind/bug Something isn't working label Dec 14, 2023
@quarkus-bot quarkus-bot bot added area/dev-ui area/jbang Issues related to when using jbang.dev with Quarkus labels Dec 14, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 14, 2023

/cc @cescoffier (devui), @phillip-kruger (devui), @quarkusio/devtools (jbang)

@phillip-kruger
Copy link
Member

Hi @maxandersen - when I try to run the reproducer I get:

 (main) Failed to start application (with profile [prod]): java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed:
        SRCFG00014: The config property quarkus.langchain4j.openai.api-key is required but it could not be found in any config source
        at io.quarkiverse.langchain4j.openai.runtime.OpenAiRecorder.chatModel(OpenAiRecorder.java:25)
        at io.quarkus.deployment.steps.OpenAiProcessor$generateBeans750318895.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.OpenAiProcessor$generateBeans750318895.deploy(Unknown Source)
        ... 6 more

@maxandersen
Copy link
Member Author

Set that key in a .env file.

If still fails remove the call to answer() and rerun.

@phillip-kruger
Copy link
Member

Closing here, please reopen if you get this again .

@ozangunalp
Copy link
Contributor

@phillip-kruger We always have that error log when quitting the dev mode with Dev UI opened with Quarkus 3.2.x and 3.7. It is described in SolaceLabs/solace-quarkus#46.

Shall we re-open this issue?

@phillip-kruger
Copy link
Member

Yes, if I know how to reproduce I can have a look

@ozangunalp
Copy link
Contributor

The https://github.com/SolaceLabs/solace-quarkus/ project builds 2 extensions and has 2 sample projects.

  • Build the project locally with mvn clean install -DskipTests
  • Run dev mode with quarkus dev on the /samples/hello-connector-solace project.
  • (A little bit patience, it'll spin up a Solace dev service)
  • Once it starts, open the Dev UI with 'd' from console.
  • Quit the application with ctrl-c
  • The exception will be logged to the console.

@phillip-kruger
Copy link
Member

Thanks @ozangunalp . However when I run the sample app, the test container can not start :

2024-02-05 14:38:05,349 INFO  [org.tes.DockerClientFactory] (build-3) Checking the system...
2024-02-05 14:38:05,350 INFO  [org.tes.DockerClientFactory] (build-3) ✔︎ Docker server version should be at least 1.6.0
2024-02-05 14:38:05,419 INFO  [org.tes.uti.ImageNameSubstitutor] (build-3) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2024-02-05 14:38:06,191 INFO  [tc.solace/solace-pubsub-standard:latest] (build-3) Pulling docker image: solace/solace-pubsub-standard:latest. Please be patient; this may take some time but only needs to be done once.
2024-02-05 14:38:25,785 INFO  [tc.solace/solace-pubsub-standard:latest] (build-3) Creating container for image: solace/solace-pubsub-standard:latest
2024-02-05 14:38:26,390 INFO  [tc.solace/solace-pubsub-standard:latest] (build-3) Container solace/solace-pubsub-standard:latest is starting: 59f7337fcd754795fa3fceeda28a3ed95bb3f4a909b332b67840db3aa358253b
2024-02-05 14:38:27,738 ERROR [tc.solace/solace-pubsub-standard:latest] (build-3) Could not start container: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"cause":"OCI runtime error","message":"crun: the requested cgroup controller `cpuset` is not available: OCI runtime error","response":500}

        at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
        at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.post(DefaultInvocationBuilder.java:102)
        at org.testcontainers.shaded.com.github.dockerjava.core.exec.StartContainerCmdExec.execute(StartContainerCmdExec.java:31)
        at org.testcontainers.shaded.com.github.dockerjava.core.exec.StartContainerCmdExec.execute(StartContainerCmdExec.java:13)
        at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
        at org.testcontainers.shaded.com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
        at org.testcontainers.shaded.com.github.dockerjava.core.command.StartContainerCmdImpl.exec(StartContainerCmdImpl.java:43)
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:441)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.lambda$startContainer$1(DevServicesSolaceProcessor.java:160)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.startContainer(DevServicesSolaceProcessor.java:181)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.startSolaceContainer(DevServicesSolaceProcessor.java:84)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)


2024-02-05 14:38:27,764 ERROR [tc.solace/solace-pubsub-standard:latest] (build-3) There are no stdout/stderr logs available for the failed container
2024-02-05 14:38:27,770 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2024-02-05 14:38:28,036 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step com.solace.quarkus.deployment.DevServicesSolaceProcessor#startSolaceContainer threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image solace/solace-pubsub-standard:latest
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.startSolaceContainer(DevServicesSolaceProcessor.java:101)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:840)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image solace/solace-pubsub-standard:latest
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:349)
        at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:322)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.lambda$startContainer$1(DevServicesSolaceProcessor.java:160)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.startContainer(DevServicesSolaceProcessor.java:181)
        at com.solace.quarkus.deployment.DevServicesSolaceProcessor.startSolaceContainer(DevServicesSolaceProcessor.java:84)
        ... 11 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
        at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
        ... 16 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
        at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:553)
        at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:344)
        at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
        ... 17 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"cause":"OCI runtime error","message":"crun: the requested cgroup controller `cpuset` is not available: OCI runtime error","response":500}

I am using podman - could be that ?

@ozangunalp
Copy link
Contributor

@phillip-kruger I think so. We need to remove the ulimit and cpuset instructions from this devservice.

@phillip-kruger
Copy link
Member

@ozangunalp - how urgent is this ? Can I wait until the podman issue is solved so that I can look at this, or do I need to install docker to get this reproduced ?

@ozangunalp
Copy link
Contributor

It is not urgent, but it reliably reproduces this issue. I'll check the dev service provided in this extension to work on podman. Then we can take a look.

@ozangunalp
Copy link
Contributor

I don't have much hope work making the Solace dev service work on Podman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev-ui area/jbang Issues related to when using jbang.dev with Quarkus kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants