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

GlassFish 8 starts Derby but GlassFish fails with Unable to start database. #25164

Open
scottmarlow opened this issue Sep 27, 2024 · 3 comments

Comments

@scottmarlow
Copy link
Member

I'm trying to test https://github.com/scottmarlow/jakartaee-tck/tree/persistence-platform-tck-runner changes via:

mvn clean verify -Pstaging -Dts.home=/home/smarlow/tck/tck10/jakartaeetck -Dtck.descriptor.path=/home/smarlow/tck/cts-11-mods/resources 2>&1 | tee tck.log
[INFO] Cache configuration is not available at configured path /home/smarlow/tck/platformtck/.mvn/maven-build-cache-config.xml, cache is enabled with defaults
[INFO] Using XX hash algorithm for cache
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for jakarta:glassfish.jpa-platform-tck:jar:11.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-dependency-plugin @ line 302, column 21
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-antrun-plugin @ line 349, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -----------------< jakarta:glassfish.jpa-platform-tck >-----------------
[INFO] Building glassfish.jpa-platform-tck 11.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ glassfish.jpa-platform-tck ---
[INFO] Deleting /home/smarlow/tck/platformtck/glassfish-runner/jpa-platform-tck/target
[INFO] Going to calculate checksum for project [groupId=jakarta, artifactId=glassfish.jpa-platform-tck]
[INFO] Scanning plugins configurations to find input files. Probing is enabled, values will be checked for presence in file system
[INFO] Found 349 input files. Project dir processing: 4, plugins: 12 millis
[INFO] Project inputs calculated in 53 ms. XX checksum [85e7b32a6ecfce62] calculated in 738 ms.
[INFO] Attempting to restore project jakarta:glassfish.jpa-platform-tck from build cache
[INFO] Remote cache is incomplete or missing, trying local build for jakarta:glassfish.jpa-platform-tck
[INFO] Local build was not found by checksum 85e7b32a6ecfce62 for jakarta:glassfish.jpa-platform-tck
[INFO]
[INFO] --- enforcer:3.0.0:enforce (enforce-maven) @ glassfish.jpa-platform-tck ---
[INFO]
[INFO] --- spotless:2.36.0:check (check-spotless-poms) @ glassfish.jpa-platform-tck ---
[INFO] Index file does not exist. Fallback to an empty index
[INFO] Sorting file /tmp/pom3050530324178184068.xml
[INFO] Pom file is already sorted, exiting
[INFO] Spotless.Pom is keeping 1 files clean - 0 needs changes to be clean, 1 were already clean, 0 were skipped because caching determined they were already clean
[INFO]
[INFO] --- dependency:3.7.1:unpack (001-unpack) @ glassfish.jpa-platform-tck ---
[INFO] Configured Artifact: org.glassfish.main.distributions:glassfish:8.0.0-JDK17-M7:zip
[INFO]
[INFO] --- dependency:3.7.1:copy (003-copy-protocol-lib) @ glassfish.jpa-platform-tck ---
[INFO] Configured Artifact: jakarta.tck.arquillian:arquillian-protocol-lib:1.0.0-M15:jar
[INFO] Copying artifact 'jakarta.tck.arquillian:arquillian-protocol-lib:jar:1.0.0-M15' (/home/smarlow/.m2/repository/jakarta/tck/arquillian/arquillian-protocol-lib/1.0.0-M15/arquillian-protocol-lib-1.0.0-M15.jar) to /home/smarlow/tck/platformtck/glassfish-runner/jpa-platform-tck/target/protocol/protocol.jar
[INFO]
[INFO] --- antrun:3.0.0:run (002-asadmin-permission) @ glassfish.jpa-platform-tck ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ glassfish.jpa-platform-tck ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO]
[INFO] --- exec:3.2.0:exec (004-StartDatabase) @ glassfish.jpa-platform-tck ---
Starting database in Network Server mode on host 0.0.0.0 and port 1527.

Unable to start database. Please check log in /home/smarlow/tck/platformtck/glassfish-runner/jpa-platform-tck/target/glassfish8/glassfish/databases/derby.log.
Command start-database failed.
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:355)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:253)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:884)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:844)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:450)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:569)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27:04 min
[INFO] Finished at: 2024-09-27T13:49:54-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.2.0:exec (004-StartDatabase) on project glassfish.jpa-platform-tck: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

cat target/glassfish8/glassfish/databases/derby.log
Fri Sep 27 13:25:06 EDT 2024 : Apache Derby Network Server - 10.15.2.0 - (1873585) started and ready to accept connections on port 1527

@scottmarlow
Copy link
Member Author

I'm running Fedora 40 locally. The following is the output of ifconfig:

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 1384942 bytes 621744834 (592.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1384942 bytes 621744834 (592.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1360
inet 10.22.8.206 netmask 255.255.248.0 destination 10.22.8.206
inet6 fe80::3019:8cbe:7b9f:59e prefixlen 64 scopeid 0x20
inet6 fd10:22:8:1::10cd prefixlen 64 scopeid 0x0
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 36961 bytes 20028028 (19.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47324 bytes 19414365 (18.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:c5:aa:44 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.35 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::8b8b:b7d6:7897:534f prefixlen 64 scopeid 0x20
inet6 2601:18c:80:50b0:d27f:20d8:2412:33d prefixlen 64 scopeid 0x0
inet6 2601:18c:80:50b0::8d6d prefixlen 128 scopeid 0x0
ether e6:c2:9f:79:89:b4 txqueuelen 1000 (Ethernet)
RX packets 409183 bytes 346112705 (330.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 258563 bytes 140123331 (133.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

@scottmarlow
Copy link
Member Author

scottmarlow commented Sep 27, 2024

My ask is to enhance Derby integration to be able to skip performing the database ping after starting derby. Instead consider checking the glassfish8/glassfish/databases/derby.log which in my case contains success:

Thu Sep 26 18:16:55 EDT 2024 : Apache Derby Network Server - 10.15.2.0 - (1873585) started and ready to accept connections on port 1527

Or just skip the ping would be a nice option as well.

@arjantijms
Copy link
Contributor

Maybe the ping itself vs reading the log is not the source of the problem. Rather, I suspect it's the relatively short time for the checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants