Good day Java and Wildfly Swarm Gurus,
I have a question.
I have built a microservice project in Eclipse using Wildfly Swarm and EJB.
The project is named TestProject and will build a TestProject.war.
When I run in the Terminal, using the command "mvn wildfly-swarm:run" it runs properly and will somewhat build the right war file. Below is a snippet when it runs:
2017-09-12 12:03:34,884 INFO [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.4.0.Final
2017-09-12 12:03:34,971 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0012: Started server default-server.
2017-09-12 12:03:35,056 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8080
2017-09-12 12:03:35,176 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Swarm 2017.3.3 (WildFly Core 2.2.1.CR1) started in 1140ms - Started 132 of 143 services (25 services are lazy, passive or on-demand)
2017-09-12 12:03:36,380 INFO [org.wildfly.swarm.runtime.deployer] (main) deploying TestProject.war
2017-09-12 12:03:36,398 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "TestProject.war" (runtime-name: "TestProject.war")
2017-09-12 12:03:37,779 WARN [org.jboss.as.dependency.private] (MSC service thread 1-2) WFLYSRV0018: Deployment "deployment.TestProject.war" is using a private module ("org.jboss.jts:main") which may be changed or removed in future versions without notice.
2017-09-12 12:03:38,114 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'ProductRestBean' in deployment unit 'deployment "TestProject.war"' are as follows:
java:global/TestProject/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:app/TestProject/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:module/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:global/TestProject/ProductRestBean
java:app/TestProject/ProductRestBean
java:module/ProductRestBean
When I run in in Eclipse IDE it will still run, but the war it created is different and is causing the bean loading and look up later, unable to load.
Below is a snippet on how it runs (problematic) in Eclipse:
[0m[0m2017-09-12 12:36:46,741 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.4.0.Final
[0m[0m2017-09-12 12:36:46,795 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0012: Started server default-server.
[0m[0m2017-09-12 12:36:46,871 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8080
[0m[0m2017-09-12 12:36:46,997 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Swarm 2017.3.3 (WildFly Core 2.2.1.CR1) started in 1197ms - Started 132 of 143 services (25 services are lazy, passive or on-demand)
[0m[0m2017-09-12 12:36:48,232 INFO [org.wildfly.swarm.runtime.deployer] (main) deploying 507ac020-cc98-4956-9c88-418869842dcf.war
[0m[0m2017-09-12 12:36:48,252 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "507ac020-cc98-4956-9c88-418869842dcf.war" (runtime-name: "507ac020-cc98-4956-9c88-418869842dcf.war")
[0m[33m2017-09-12 12:36:49,676 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) WFLYSRV0018: Deployment "deployment.507ac020-cc98-4956-9c88-418869842dcf.war" is using a private module ("org.jboss.jts:main") which may be changed or removed in future versions without notice.
[0m[0m2017-09-12 12:36:49,966 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-3) WFLYEJB0473: JNDI bindings for session bean named 'ProductRestBean' in deployment unit 'deployment "507ac020-cc98-4956-9c88-418869842dcf.war"' are as follows:
java:global/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:app/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:module/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:global/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean
java:app/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean
java:module/ProductRestBean
as we can observe, it creates the war file:
507ac020-cc98-4956-9c88-418869842dcf.war
instead of:
TestProject.war
I would be very delighted to have some insights on how to prevent Eclipse from creating the randomly named war file and use the intended war file name which is TestProject.war.
Thanks a lot!
And have a great day =)!
The solution is to add these lines in to the projects-default.yml of your project.
swarm:
app:
name: TestProject.war
Related
I am using Mariadb and Keycloak test containers for integration test , however , mariadb container starts , but Keycloak container fails to start . I am using MacBook Pro M1 and jAVA 11
Code
public abstract class IntegrationTest {
public static KeycloakContainer keycloakContainer = new KeycloakContainer("jboss/keycloak:15.0.2")
.withRealmImportFile("/test_realm.json");
#Autowired
public TransactionService transactionService;
#Autowired
public PaymentService paymentService;
ObjectMapper mapper = new ObjectMapper()
.registerModule(new JavaTimeModule());;
#LocalServerPort
static int port = 8088;
protected static String authToken;
#BeforeAll
public static void setUp() {
RestAssured.port = port;
RestAssured.baseURI = "http://localhost/";
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
assertTrue(keycloakContainer.isRunning());
String authServer = keycloakContainer.getAuthServerUrl();
System.out.println("authServer: " + authServer);
authToken = getAccessToken();
System.out.println("authToken: " + authToken);
}
#DynamicPropertySource
static void dynamicPropertySource(DynamicPropertyRegistry dynamicPropertyRegistry) {
MariaDBContainer<?> container = new MariaDBContainer<>("mariadb:10.6.4-focal")
.withDatabaseName("test")
.withUsername("test")
.withPassword("test");
dynamicPropertyRegistry.add("spring.datasource.url", container::getJdbcUrl);
dynamicPropertyRegistry.add("spring.datasource.username", container::getUsername);
dynamicPropertyRegistry.add("spring.datasource.password", container::getPassword);
dynamicPropertyRegistry.add("spring.datasource.driver-class", () -> "org.mariadb.jdbc.Driver");
dynamicPropertyRegistry.add("spring.jpa.database-platform", () -> "org.hibernate.dialect.MariaDBDialect");
dynamicPropertyRegistry.add("keycloak.auth-server-url", keycloakContainer::getAuthServerUrl);
container.start();
keycloakContainer.start();
System.out.println("Containers should be started.");
}
}
IDE logs :
Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
Docker host IP address is localhost
Connected to docker:
Server Version: 20.10.10
API Version: 1.41
Operating System: Docker Desktop
Total Memory: 1988 MB
Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
Checking the system...
✔︎ Docker server version should be at least 1.6.0
✔︎ Docker environment should have more than 2GB free disk space
Creating container for image: mariadb:10.6.4-focal
Starting container with ID: 4cb0ba7707f5cee202ae19aa177b7f2b7dbe5de93664263869935742e45c9f99
Container mariadb:10.6.4-focal is starting: 4cb0ba7707f5cee202ae19aa177b7f2b7dbe5de93664263869935742e45c9f99
Waiting for database connection to become available at jdbc:mariadb://localhost:55129/sympl using query 'SELECT 1'
Container is started (JDBC URL: jdbc:mariadb://localhost:55129/sympl)
Container mariadb:10.6.4-focal started in PT5.679875S
Creating container for image: jboss/keycloak:15.0.2
Starting container with ID: 8c8792df10e2da254dd7fe200feeff4a2b756b989aec51897f6a6faca21a7403
Container jboss/keycloak:15.0.2 is starting: 8c8792df10e2da254dd7fe200feeff4a2b756b989aec51897f6a6faca21a7403
/festive_bhabha: Waiting for 120 seconds for URL: http://localhost:55131/auth (where port 55131 maps to container port 8080)
after that it tries to reconnect again and fails after the timeout finish .
Container logs from docker :
Added 'admin' to
'/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json',
restart server to load user
Using Embedded H2 database
=========================================================================
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss/keycloak
JAVA: java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M
-XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED
=========================================================================
05:28:07,243 INFO [org.jboss.modules] (main) JBoss Modules version
1.11.0.Final 05:28:09,744 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final 05:28:09,890 INFO [org.jboss.threads] (main)
JBoss Threads version 2.4.0.Final 05:28:10,814 INFO [org.jboss.as]
(MSC service thread 1-2) WFLYSRV0049: Keycloak 15.0.2 (WildFly Core
15.0.1.Final) starting 05:28:11,475 INFO [org.jboss.vfs] (MSC service thread 1-4) VFS000002: Failed to clean existing content for temp file
provider of type temp. Enable DEBUG level log to find what caused this
05:28:14,209 INFO [org.wildfly.security] (ServerService Thread Pool
-- 20) ELY00001: WildFly Elytron version 1.15.3.Final 05:28:15,640 INFO [org.jboss.as.controller.management-deprecated] (ServerService
Thread Pool -- 11) WFLYCTL0033: Extension 'security' is deprecated and
may not be supported in future versions 05:28:16,882 INFO
[org.jboss.as.controller.management-deprecated] (Controller Boot
Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at
address '/core-service=management/management-interface=http-interface'
is deprecated, and may be removed in a future version. See the
attribute description in the output of the read-resource-description
operation to learn more about the deprecation. 05:28:17,062 INFO
[org.jboss.as.controller.management-deprecated] (ServerService Thread
Pool -- 23) WFLYCTL0028: Attribute 'security-realm' in the resource at
address
'/subsystem=undertow/server=default-server/https-listener=https' is
deprecated, and may be removed in a future version. See the attribute
description in the output of the read-resource-description operation
to learn more about the deprecation. 05:28:18,155 INFO
[org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating
http management service using socket-binding (management-http)
05:28:18,290 INFO [org.xnio] (MSC service thread 1-2) XNIO version
3.8.4.Final 05:28:18,332 INFO [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.8.4.Final 05:28:18,589 INFO
[org.wildfly.extension.health] (ServerService Thread Pool -- 36)
WFLYHEALTH0001: Activating Base Health Subsystem 05:28:18,664 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 37)
WFLYCLINF0001: Activating Infinispan subsystem. 05:28:18,689 INFO
[org.jboss.as.security] (ServerService Thread Pool -- 49) WFLYSEC0002:
Activating Security Subsystem 05:28:18,690 INFO [org.jboss.as.naming]
(ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming
Subsystem 05:28:18,666 WARN [org.jboss.as.txn] (ServerService Thread
Pool -- 51) WFLYTX0013: The node-identifier attribute on the
/subsystem=transactions is set to the default value. This is a danger
for environments running multiple servers. Please make sure the
attribute value is unique. 05:28:18,717 INFO [org.jboss.as.security]
(MSC service thread 1-4) WFLYSEC0001: Current PicketBox
version=5.0.3.Final-redhat-00007 05:28:18,816 INFO
[org.wildfly.extension.metrics] (ServerService Thread Pool -- 45)
WFLYMETRICS0001: Activating Base Metrics Subsystem 05:28:18,826 INFO
[org.jboss.as.connector] (MSC service thread 1-5) WFLYJCA0009:
Starting Jakarta Connectors Subsystem (WildFly/IronJacamar
1.4.27.Final) 05:28:18,790 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 38) WFLYIO001: Worker 'default' has
auto-configured to 8 IO threads with 64 max task threads based on your
4 available processors 05:28:18,887 INFO [org.jboss.remoting] (MSC
service thread 1-6) JBoss Remoting version 5.0.20.Final 05:28:19,009
INFO [org.jboss.as.naming] (MSC service thread 1-1) WFLYNAM0003:
Starting Naming Service 05:28:19,010 INFO
[org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001:
Bound mail session [java:jboss/mail/Default] 05:28:19,357 INFO
[org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003:
Undertow 2.2.5.Final starting 05:28:19,342 INFO
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread
Pool -- 31) WFLYJCA0004: Deploying JDBC-compliant driver class
org.h2.Driver (version 1.4) 05:28:19,398 INFO
[org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8)
WFLYJCA0018: Started Driver service with driver-name = h2 05:28:19,477
INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 39)
WFLYRS0016: RESTEasy version 3.15.1.Final 05:28:19,667 WARN
[org.wildfly.clustering.web.undertow] (ServerService Thread Pool --
52) WFLYCLWEBUT0007: No routing provider found for default-server;
using legacy provider based on static configuration 05:28:20,323 INFO
[org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0481: Strict pool
slsb-strict-max-pool is using a max instance size of 64 (per class),
which is derived from thread worker pool sizing. 05:28:20,323 INFO
[org.jboss.as.ejb3] (MSC service thread 1-5) WFLYEJB0482: Strict pool
mdb-strict-max-pool is using a max instance size of 16 (per class),
which is derived from the number of CPUs on this host. 05:28:20,527
INFO [org.wildfly.extension.undertow] (ServerService Thread Pool --
52) WFLYUT0014: Creating file handler for path
'/opt/jboss/keycloak/welcome-content' with options [directory-listing:
'false', follow-symlink: 'false', case-sensitive: 'true',
safe-symlink-paths: '[]'] 05:28:20,604 INFO
[org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012:
Started server default-server. 05:28:20,615 WARN
[org.wildfly.extension.elytron] (MSC service thread 1-1) WFLYELY00023:
KeyStore file
'/opt/jboss/keycloak/standalone/configuration/application.keystore'
does not exist. Used blank. 05:28:20,648 INFO
[org.wildfly.extension.undertow] (MSC service thread 1-3) Queuing
requests. 05:28:20,651 INFO [org.wildfly.extension.undertow] (MSC
service thread 1-3) WFLYUT0018: Host default-host starting
05:28:20,669 WARN [org.wildfly.extension.elytron] (MSC service thread
1-1) WFLYELY01084: KeyStore
/opt/jboss/keycloak/standalone/configuration/application.keystore not
found, it will be auto generated on first use with a self-signed
certificate for host localhost WARNING: An illegal reflective access
operation has occurred WARNING: Illegal reflective access by
org.wildfly.extension.elytron.SSLDefinitions
(jar:file:/opt/jboss/keycloak/modules/system/layers/base/org/wildfly/extension/elytron/main/wildfly-elytron-integration-15.0.1.Final.jar!/)
to method com.sun.net.ssl.internal.ssl.Provider.isFIPS() WARNING:
Please consider reporting this to the maintainers of
org.wildfly.extension.elytron.SSLDefinitions WARNING: Use
--illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be
denied in a future release 05:28:21,227 INFO
[org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006:
Undertow HTTP listener default listening on 0.0.0.0:8080 05:28:23,000
INFO [org.jboss.as.ejb3] (MSC service thread 1-7) WFLYEJB0493:
Jakarta Enterprise Beans subsystem suspension complete 05:28:23,843
INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-8) WFLYJCA0001: Bound data source
[java:jboss/datasources/KeycloakDS] 05:28:23,843 INFO
[org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
05:28:24,110 INFO [org.jboss.as.patching] (MSC service thread 1-4)
WFLYPAT0050: Keycloak cumulative patch ID is: base, one-off patches
include: none 05:28:24,192 WARN
[org.jboss.as.domain.management.security] (MSC service thread 1-3)
WFLYDM0111: Keystore
/opt/jboss/keycloak/standalone/configuration/application.keystore not
found, it will be auto generated on first use with a self signed
certificate for host localhost 05:28:24,286 INFO
[org.jboss.as.server.deployment.scanner] (MSC service thread 1-7)
WFLYDS0013: Started FileSystemDeploymentService for directory
/opt/jboss/keycloak/standalone/deployments 05:28:24,309 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027:
Starting deployment of "keycloak-server.war" (runtime-name:
"keycloak-server.war") 05:28:24,494 INFO
[org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006:
Undertow HTTPS listener https listening on 0.0.0.0:8443 05:28:28,673
INFO [org.infinispan.CONTAINER] (ServerService Thread Pool -- 54)
ISPN000128: Infinispan version: Infinispan 'Corona Extra' 11.0.9.Final
05:28:29,231 INFO [org.infinispan.CONFIG] (MSC service thread 1-7)
ISPN000152: Passivation configured without an eviction policy being
selected. Only manually evicted entities will be passivated.
05:28:29,250 INFO [org.infinispan.CONFIG] (MSC service thread 1-7)
ISPN000152: Passivation configured without an eviction policy being
selected. Only manually evicted entities will be passivated.
05:28:29,578 INFO [org.infinispan.PERSISTENCE] (ServerService Thread
Pool -- 55) ISPN000556: Starting user marshaller
'org.wildfly.clustering.infinispan.marshalling.jboss.JBossMarshaller'
05:28:29,581 INFO [org.infinispan.PERSISTENCE] (ServerService Thread
Pool -- 54) ISPN000556: Starting user marshaller
'org.wildfly.clustering.infinispan.spi.marshalling.InfinispanProtoStreamMarshaller'
05:28:30,523 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 54) WFLYCLINF0002: Started http-remoting-connector
cache from ejb container 05:28:30,675 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 54)
WFLYCLINF0002: Started offlineClientSessions cache from keycloak
container 05:28:30,675 INFO [org.jboss.as.clustering.infinispan]
(ServerService Thread Pool -- 58) WFLYCLINF0002: Started actionTokens
cache from keycloak container 05:28:30,675 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 61)
WFLYCLINF0002: Started work cache from keycloak container 05:28:30,686
INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool
-- 57) WFLYCLINF0002: Started sessions cache from keycloak container 05:28:30,675 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 62) WFLYCLINF0002: Started authenticationSessions cache
from keycloak container 05:28:30,726 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 59)
WFLYCLINF0002: Started loginFailures cache from keycloak container
05:28:30,726 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 67) WFLYCLINF0002: Started clientSessions cache from
keycloak container 05:28:30,726 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66)
WFLYCLINF0002: Started offlineSessions cache from keycloak container
05:28:30,953 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 63) WFLYCLINF0002: Started users cache from keycloak
container 05:28:30,953 INFO [org.jboss.as.clustering.infinispan]
(ServerService Thread Pool -- 60) WFLYCLINF0002: Started realms cache
from keycloak container 05:28:30,956 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 65)
WFLYCLINF0002: Started authorization cache from keycloak container
05:28:30,959 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 64) WFLYCLINF0002: Started keys cache from keycloak
container 05:28:31,726 WARN [org.jboss.as.server.deployment] (MSC
service thread 1-7) WFLYSRV0273: Excluded subsystem webservices via
jboss-deployment-structure.xml does not exist. 05:28:31,803 ERROR
[io.undertow] (MSC service thread 1-6) UT005024: Could not register
resource change listener for caching resource manager, automatic
invalidation of cached resource will not work:
java.lang.RuntimeException: java.io.IOException: Function not
implemented at
org.jboss.xnio.nio#3.8.4.Final//org.xnio.nio.WatchServiceFileSystemWatcher.(WatchServiceFileSystemWatcher.java:75)
at
org.jboss.xnio.nio#3.8.4.Final//org.xnio.nio.NioXnio.createFileSystemWatcher(NioXnio.java:241)
at
io.undertow.core#2.2.5.Final//io.undertow.server.handlers.resource.PathResourceManager.registerResourceChangeListener(PathResourceManager.java:262)
at
org.wildfly.extension.undertow#23.0.2.Final//org.wildfly.extension.undertow.deployment.ServletResourceManager.registerResourceChangeListener(ServletResourceManager.java:117)
at
io.undertow.core#2.2.5.Final//io.undertow.server.handlers.resource.CachingResourceManager.(CachingResourceManager.java:64)
at
org.wildfly.extension.undertow#23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:567)
at
org.wildfly.extension.undertow#23.0.2.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:276)
at
org.jboss.msc#1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at
org.jboss.msc#1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at
org.jboss.msc#1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at
org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at
org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at
org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at
org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:829) Caused by:
java.io.IOException: Function not implemented at
java.base/sun.nio.fs.LinuxWatchService.(LinuxWatchService.java:64)
at
java.base/sun.nio.fs.LinuxFileSystem.newWatchService(LinuxFileSystem.java:47)
at
org.jboss.xnio.nio#3.8.4.Final//org.xnio.nio.WatchServiceFileSystemWatcher.(WatchServiceFileSystemWatcher.java:73)
... 14 more
05:28:34,143 INFO [org.keycloak.services] (ServerService Thread Pool
-- 63) KC-SERVICES0001: Loading config from standalone.xml or domain.xml 05:28:34,422 WARN [org.keycloak.common.Profile]
(ServerService Thread Pool -- 63) Deprecated feature enabled:
upload_scripts 05:28:34,423 WARN [org.keycloak.common.Profile]
(ServerService Thread Pool -- 63) Preview feature enabled: scripts
05:28:34,569 INFO [org.keycloak.url.DefaultHostnameProviderFactory]
(ServerService Thread Pool -- 63) Frontend: , Admin:
, Backend: 05:28:37,112 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 63)
WFLYCLINF0002: Started realmRevisions cache from keycloak container
05:28:37,162 INFO [org.jboss.as.clustering.infinispan] (ServerService
Thread Pool -- 63) WFLYCLINF0002: Started userRevisions cache from
keycloak container 05:28:37,209 INFO
[org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 63)
WFLYCLINF0002: Started authorizationRevisions cache from keycloak
container 05:28:37,214 INFO
[org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory]
(ServerService Thread Pool -- 63) Node name: 8c8792df10e2, Site name:
null
A fatal error has been detected by the Java Runtime Environment:
SIGILL (0x4) at pc=0x0000004016607605, pid=343, tid=466
JRE version: OpenJDK Runtime Environment 18.9 (11.0.12+7) (build 11.0.12+7-LTS)
Java VM: OpenJDK 64-Bit Server VM 18.9 (11.0.12+7-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
Problematic frame:
J 5784 c1 liquibase.exception.ValidationErrors.checkRequiredField(Ljava/lang/String;Ljava/lang/Object;)V
(120 bytes) # 0x0000004016607605
[0x00000040166075c0+0x0000000000000045]
No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java
again
An error report file with more information is saved as:
/tmp/hs_err_pid343.log Compiled method (c1) 35858 6315 2 liquibase.sqlgenerator.core.CreateSequenceGenerator::validate (169
bytes) total in heap [0x00000040166ecb90,0x00000040166ee598] = 6664
relocation [0x00000040166ecd08,0x00000040166ece38] = 304 main
code [0x00000040166ece40,0x00000040166ee0a0] = 4704 stub code
[0x00000040166ee0a0,0x00000040166ee130] = 144 oops
[0x00000040166ee130,0x00000040166ee160] = 48 metadata
[0x00000040166ee160,0x00000040166ee178] = 24 scopes data
[0x00000040166ee178,0x00000040166ee2a8] = 304 scopes pcs
[0x00000040166ee2a8,0x00000040166ee528] = 640 dependencies
[0x00000040166ee528,0x00000040166ee530] = 8 nul chk table
[0x00000040166ee530,0x00000040166ee598] = 104 Could not load
hsdis-amd64.so; library not loadable; PrintAssembly is disabled
If you would like to submit a bug report, please visit:
https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%208&component=java-11-openjdk
qemu: uncaught target signal 6 (Aborted) - core dumped
*** JBossAS process (343) received ABRT signal ***
however, when I start the keycloack container and setExposedPort(8080)
keycloakContainer.setExposedPorts(List.of(8080));
keycloakContainer.start();
the container logs doesn't raise JVM error . here the logs are after exposing 8080 port
The jboss/keycloak images only support linux/amd64 architectures. See the tags inside Docker Hub.
With your M1, you have an arm64 processor that's not supported by the official Keycloak images. With Apple's Rosetta 2 emulation, Apple tries best effort to make an amd64 image work, but your Keycloak container fails during startup:
A fatal error has been detected by the Java Runtime Environment:
SIGILL (0x4) at pc=0x0000004016607605, pid=343, tid=466
You can use a community build that supports arm64:
https://github.com/richardjkendall/keycloak-arm
https://hub.docker.com/r/mihaibob/keycloak
public static KeycloakContainer keycloakContainer =
new KeycloakContainer("mihaibob/keycloak:14.0.0")
.withRealmImportFile("/test_realm.json");
You should also be able to build your own arm64 compatible Keycloak Docker image locally.
I start Keycloak 7.0.1 on new MySQL 5.7 database
This is the Kubernetes deployment
spec:
containers:
- env:
- name: KEYCLOAK_USER
value: admin
- name: KEYCLOAK_PASSWORD
value: password
- name: PROXY_ADDRESS_FORWARDING
value: "true"
- name: KEYCLOAK_LOGLEVEL
value: INFO
- name: DB_VENDOR
value: mysql
- name: DB_ADDR
value: db.rds.amazonaws.com
- name: DB_DATABASE
value: keycloak
- name: DB_SCHEMA
value: keycloak
- name: DB_PORT
value: "3306"
- name: DB_USER
value: keycloak
- name: DB_PASSWORD
value: 789
- name: JDBC_PARAMS
value: character_set_server=utf8mb4&useUnicode=true&verifyServerCertificate=false&useSSL=true&requireSSL=true&allowPublicKeyRetrieval=true&serverTimezone=Europe/Paris
image: jboss/keycloak:7.0.1
And the stackstrace
Added 'admin' to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json', restart server to load user
-b 0.0.0.0
=========================================================================
Using MySQL database
=========================================================================
19:29:43,163 INFO [org.jboss.modules] (CLI command executor) JBoss Modules version 1.9.1.Final
19:29:43,233 INFO [org.jboss.msc] (CLI command executor) JBoss MSC version 1.4.8.Final
19:29:43,241 INFO [org.jboss.threads] (CLI command executor) JBoss Threads version 2.3.3.Final
19:29:43,407 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) starting
19:29:43,483 INFO [org.jboss.vfs] (MSC service thread 1-2) VFS000002: Failed to clean existing content for temp file provider of type temp. Enable DEBUG level log to find what caused this
19:29:44,245 INFO [org.wildfly.security] (ServerService Thread Pool -- 19) ELY00001: WildFly Elytron version 1.9.1.Final
19:29:44,799 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:44,902 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:45,059 INFO [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: Keycloak cumulative patch ID is: base, one-off patches include: none
19:29:45,078 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore /opt/jboss/keycloak/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
19:29:45,169 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
19:29:45,170 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) started in 1998ms - Started 64 of 78 services (29 services are lazy, passive or on-demand)
The batch executed successfully
19:29:45,343 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) stopped in 18ms
19:29:46,892 INFO [org.jboss.modules] (CLI command executor) JBoss Modules version 1.9.1.Final
19:29:46,965 INFO [org.jboss.msc] (CLI command executor) JBoss MSC version 1.4.8.Final
19:29:46,984 INFO [org.jboss.threads] (CLI command executor) JBoss Threads version 2.3.3.Final
19:29:47,148 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) starting
19:29:47,232 INFO [org.jboss.vfs] (MSC service thread 1-1) VFS000002: Failed to clean existing content for temp file provider of type temp. Enable DEBUG level log to find what caused this
19:29:48,101 INFO [org.wildfly.security] (ServerService Thread Pool -- 22) ELY00001: WildFly Elytron version 1.9.1.Final
19:29:49,023 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:49,111 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:49,254 INFO [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: Keycloak cumulative patch ID is: base, one-off patches include: none
19:29:49,264 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore /opt/jboss/keycloak/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
19:29:49,365 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
19:29:49,370 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) started in 2467ms - Started 64 of 85 services (36 services are lazy, passive or on-demand)
The batch executed successfully
19:29:49,569 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) stopped in 20ms
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss/keycloak
JAVA: java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED
=========================================================================
19:29:50,369 INFO [org.jboss.modules] (main) JBoss Modules version 1.9.1.Final
19:29:50,895 INFO [org.jboss.msc] (main) JBoss MSC version 1.4.8.Final
19:29:50,906 INFO [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
19:29:51,047 INFO [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Keycloak 7.0.1 (WildFly Core 9.0.2.Final) starting
19:29:51,162 INFO [org.jboss.vfs] (MSC service thread 1-1) VFS000002: Failed to clean existing content for temp file provider of type temp. Enable DEBUG level log to find what caused this
19:29:51,978 INFO [org.wildfly.security] (ServerService Thread Pool -- 21) ELY00001: WildFly Elytron version 1.9.1.Final
19:29:52,813 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:52,885 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 29) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
19:29:53,069 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
19:29:53,093 INFO [org.xnio] (MSC service thread 1-2) XNIO version 3.7.2.Final
19:29:53,106 INFO [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.7.2.Final
19:29:53,153 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 39) WFLYCLINF0001: Activating Infinispan subsystem.
19:29:53,159 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 52) WFLYNAM0001: Activating Naming Subsystem
19:29:53,169 INFO [org.wildfly.extension.microprofile.config.smallrye._private] (ServerService Thread Pool -- 48) WFLYCONF0001: Activating WildFly MicroProfile Config Subsystem
19:29:53,170 INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 5.0.12.Final
19:29:53,175 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 57) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
19:29:53,170 INFO [org.jboss.as.jaxrs] (ServerService Thread Pool -- 41) WFLYRS0016: RESTEasy version 3.7.0.Final
19:29:53,224 INFO [org.wildfly.extension.microprofile.metrics.smallrye] (ServerService Thread Pool -- 50) WFLYMETRICS0001: Activating Eclipse MicroProfile Metrics Subsystem
19:29:53,250 INFO [org.jboss.as.security] (ServerService Thread Pool -- 55) WFLYSEC0002: Activating Security Subsystem
19:29:53,259 INFO [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 49) WFLYHEALTH0001: Activating Eclipse MicroProfile Health Subsystem
19:29:53,247 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 40) WFLYIO001: Worker 'default' has auto-configured to 2 core threads with 16 task threads based on your 1 available processors
19:29:53,267 INFO [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 43) WFLYCLJG0001: Activating JGroups subsystem. JGroups version 4.0.19
19:29:53,282 INFO [org.jboss.as.connector] (MSC service thread 1-2) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.16.Final)
19:29:53,328 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 34) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
19:29:53,450 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 34) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
19:29:53,482 INFO [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=5.0.3.Final
19:29:53,521 WARN [org.wildfly.clustering.web.undertow] (ServerService Thread Pool -- 58) WFLYCLWEBUT0007: No routing provider found for default-server; using legacy provider based on static configuration
19:29:53,576 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
19:29:53,598 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0003: Undertow 2.0.21.Final starting
19:29:53,598 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = mysql
19:29:53,648 INFO [io.smallrye.metrics] (MSC service thread 1-2) Converted [2] config entries and added [4] replacements
19:29:53,651 INFO [io.smallrye.metrics] (MSC service thread 1-2) Converted [3] config entries and added [18] replacements
19:29:53,640 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0014: Creating file handler for path '/opt/jboss/keycloak/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
19:29:53,685 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 4 (per class), which is derived from the number of CPUs on this host.
19:29:53,696 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 16 (per class), which is derived from thread worker pool sizing.
19:29:53,697 INFO [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
19:29:53,803 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
19:29:54,048 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0012: Started server default-server.
19:29:54,108 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
19:29:54,108 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow AJP listener ajp listening on 0.0.0.0:8009
19:29:54,112 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0018: Host default-host starting
19:29:54,154 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 60) MODCLUSTER000001: Initializing mod_cluster version 1.4.1.Final
19:29:54,167 INFO [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0493: EJB subsystem suspension complete
19:29:54,170 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 60) MODCLUSTER000032: Listening to proxy advertisements on /224.0.1.105:23364
19:29:54,270 INFO [org.jboss.as.patching] (MSC service thread 1-2) WFLYPAT0050: Keycloak cumulative patch ID is: base, one-off patches include: none
19:29:54,272 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
19:29:54,273 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/KeycloakDS]
19:29:54,287 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-1) WFLYDM0111:
...
...
WFLYCLINF0002: Started work cache from keycloak container
19:29:59,495 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0273: Excluded subsystem webservices via jboss-deployment-structure.xml does not exist.
19:30:00,077 INFO [org.keycloak.services] (ServerService Thread Pool -- 66) KC-SERVICES0001: Loading config from standalone.xml or domain.xml
19:30:00,086 DEBUG [org.keycloak.provider.ProviderManager] (ServerService Thread Pool -- 66) Provider loaders [org.keycloak.provider.DefaultProviderLoaderFactory#33f94f36, org.keycloak.provider.FileSystemProviderLoaderFactory#381df96, org.keycloak.provider.wildfly.ModuleProviderLoaderFactory#15544a2]
19:30:00,087 DEBUG [org.keycloak.provider.FileSystemProviderLoaderFactory] (ServerService Thread Pool [org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProviderFactory] (ServerService Thread Pool -- 66) Liquibase lock provider configured with lockWaitTime: 900 seconds
19:30:00,395 DEBUG [org.keycloak.models.sessions.infinispan.InfinispanStickySessionEncoderProviderFactory] (ServerService Thread Pool -- 66) Should attach route to the sticky session cookie: true
19:30:00,409 DEBUG [org.keycloak.services.DefaultKeycloakSessionFactory] (ServerService Thread Pool -- 66) SPI client-storage provider openshift-oauth-client disabled
19:30:00,411 DEBUG [org.keycloak.keys.infinispan.InfinispanPublicKeyStorageProviderFactory] (ServerService Thread Pool -- 66) minTimeBetweenRequests is 10
19:30:00,422 DEBUG [org.keycloak.services.DefaultKeycloakSessionFactory] (ServerService Thread Pool -- 66) Loaded SPI timer (provider = basic)
19:30:00,428 DEBUG [org.keycloak.services.DefaultKeycloakSessionFactory] (ServerService Thread Pool -- 66) Loaded SPI hostname (provider = request)
19:30:00,481 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66) WFLYCLINF0002: Started realmRevisions cache from keycloak container
19:30:00,487 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66) WFLYCLINF0002: Started userRevisions cache from keycloak container
19:30:00,499 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66) WFLYCLINF0002: Started authorizationRevisions cache from keycloak container
19:30:00,501 DEBUG [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (ServerService Thread Pool -- 66) Using container managed Infinispan cache container, lookup=java:jboss/infinispan/container/keycloak
19:30:00,502 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (ServerService Thread Pool -- 66) Node name: keycloak-7569d49d7d-sjpwf, Site name: null
19:30:00,520 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (ServerService Thread Pool -- 66) new JtaTransactionWrapper
19:30:00,520 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (ServerService Thread Pool -- 66) was existing? false
19:30:00,541 DEBUG [org.keycloak.connections.jpa.updater.liquibase.conn.DefaultLiquibaseConnectionProvider] (ServerService Thread Pool -- 66) Added package org.keycloak.connections.jpa.updater.liquibase.lock to liquibase
19:30:01,129 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (ServerService Thread Pool -- 66) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
at org.jboss.ironjacamar.jdbcadapters#1.4.16.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:345)
at org.jboss.ironjacamar.jdbcadapters#1.4.16.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:352)
at org.jboss.ironjacamar.jdbcadapters#1.4.16.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:287)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.createConnectionEventListener(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:1325)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:499)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:632)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:604)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:624)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:440)
at org.jboss.ironjacamar.impl#1.4.16.Final//org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:789)
at org.jboss.ironjacamar.jdbcadapters#1.4.16.Final//org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:151)
at org.jboss.as.connector#17.0.1.Final//org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:64)
at org.keycloak.keycloak-model-jpa#7.0.1//org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.getConnection(DefaultJpaConnectionProviderFactory.java:366)
at org.keycloak.keycloak-model-jpa#7.0.1//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.lazyInit(LiquibaseDBLockProvider.java:65)
at org.keycloak.keycloak-model-jpa#7.0.1//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.lambda$waitForLock$2(LiquibaseDBLockProvider.java:96)
at org.keycloak.keycloak-server-spi-private#7.0.1//org.keycloak.models.utils.KeycloakModelUtils.suspendJtaTransaction(KeycloakModelUtils.java:682)
at org.keycloak.keycloak-model-jpa#7.0.1//org.keycloak.connections.jpa.updater.liquibase.lock.LiquibaseDBLockProvider.waitForLock(LiquibaseDBLockProvider.java:94)
at org.keycloak.keycloak-services#7.0.1//org.keycloak.services.resources.KeycloakApplication$1.run(KeycloakApplication.java:144)
at org.keycloak.keycloak-server-spi-private#7.0.1//org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
at org.keycloak.keycloak-services#7.0.1//org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:137)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:152)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2784)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:364)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.spi.ResteasyDeployment.startInternal(ResteasyDeployment.java:277)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:89)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:119)
at org.jboss.resteasy.resteasy-jaxrs#3.7.0.Final//org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:303)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:143)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:583)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:554)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at io.undertow.servlet#2.0.21.Final//io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:596)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:97)
at org.wildfly.extension.undertow#17.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads#2.3.3.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 117 milliseconds ago. The last packet sent successfully to the server was 110 milliseconds ago.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:201)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4912)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1663)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2190)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2221)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2016)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at org.jboss.ironjacamar.jdbcadapters#1.4.16.Final//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
... 55 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
at java.base/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:169)
at java.base/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
at java.base/sun.security.ssl.TransportContext.kickstart(TransportContext.java:216)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:395)
at com.mysql.jdbc#5.1.46//com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:186)
... 71 more
19:30:01,145 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (ServerService Thread Pool -- 66) JtaTransactionWrapper rollback
19:30:01,150 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (ServerService Thread Pool -- 66) JtaTransactionWrapper end
19:30:01,158 INFO [org.jboss.as.server] (Thread-1) WFLYSRV0220: Server shutdown has been requested via an OS signal
Do you think there is a configuration I do not see ?
Since 7.0.1, Keycloak has switched to Redhat UBI base images (registry.access.redhat.com/ubi8-minimal). In the Dockerfile it install's a version of OpenJDK-11 (11.0.5 currently) which contains modified version of java.security file under /etc/alternatives/jre/conf/security/.
Switching to the standard OpenJDK-11 as the base image in https://github.com/keycloak/keycloak-containers/blob/7.0.1/server/Dockerfile fixes the issue:
FROM openjdk:11.0.5-jdk
ENV KEYCLOAK_VERSION 7.0.1
ENV JDBC_POSTGRES_VERSION 42.2.5
ENV JDBC_MYSQL_VERSION 5.1.46
ENV JDBC_MARIADB_VERSION 2.2.3
ENV JDBC_MSSQL_VERSION 7.4.1.jre8
ENV LAUNCH_JBOSS_IN_BACKGROUND 1
ENV PROXY_ADDRESS_FORWARDING false
ENV JBOSS_HOME /opt/jboss/keycloak
ENV LANG en_US.UTF-8
ARG GIT_REPO
ARG GIT_BRANCH
ARG KEYCLOAK_DIST=https://downloads.jboss.org/keycloak/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz
USER root
ADD tools /opt/jboss/tools
RUN /opt/jboss/tools/build-keycloak.sh
USER 1000
EXPOSE 8080
EXPOSE 8443
ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]
CMD ["-b", "0.0.0.0"]
However, the OpenJDK image is larger and image scanning (at least in Google Cloud registry) reveals several vulnerabilities.
An alternative is to copy java.security from the standard OpenJDK image to Keycloak image or to a new image based on Keycloak:
FROM openjdk:11.0.5-jdk as openjdk
FROM jboss/keycloak:7.0.1
COPY --from=openjdk /usr/local/openjdk-11/conf/security/java.security /etc/alternatives/jre/conf/security/
This is a quick workaround. A more security-aware approach would be to compare the 2 versions of the file and introduce only minimal changes.
For keycloak 12.0.1 you still experience this problem when the database uses anything weaker than TLSv1.2. I think the problem occurs, because the RedHat UBI 8 image does not accept anything less than TLSv1.2. For more information check https://access.redhat.com/articles/3642912.
Setting crypto-policy to LEGACY, as the article suggests, did not work for me. Unchanged, the image uses DEFAULT crypto-policy, you need to override the file /etc/crypto-policies/config with LEGACY. To check the contents execute:
docker run --rm -ti --entrypoint bash jboss/keycloak:12.0.1 \
-c 'cat /etc/crypto-policies/config'
What fixed it for me was the idea from John Georgladis's answer here. I am posting here a complete working version, as the code above did not work for me right away. Overriding java.security did not work as well, particularly because of the line:
security.useSystemPropertiesFile=true
To check the contents of java.security file you could use:
docker run --rm -ti --entrypoint bash jboss/keycloak:12.0.1 \
-c 'cat /etc/java/java-11-openjdk/java-11-openjdk-*/conf/security/java.security | grep -v ^# | grep -v ^$'
Using opnejdk as base image lowers the cryptographic expectations and allows TLSv1.0 or TLSv1.1. So, if you cannot upgrade your DB to use TLSv1.2 or above, then you could install and ship keycloak like below (for Keycloak 12.0.1).
Base for this script is taken from current Keycloak 12.0.1 Dockerfile
FROM jboss/keycloak:12.0.1 as keycloak
FROM /openjdk:11.0.9-jdk
ENV KEYCLOAK_VERSION 12.0.1
ENV JDBC_POSTGRES_VERSION 42.2.5
ENV JDBC_MYSQL_VERSION 8.0.22
ENV JDBC_MARIADB_VERSION 2.5.4
ENV JDBC_MSSQL_VERSION 8.2.2.jre11
ENV LAUNCH_JBOSS_IN_BACKGROUND 1
ENV PROXY_ADDRESS_FORWARDING false
ENV JBOSS_HOME /opt/jboss/keycloak
ENV LANG en_US.UTF-8
ARG GIT_REPO
ARG GIT_BRANCH
ARG KEYCLOAK_DIST=https://github.com/keycloak/keycloak/releases/download/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz
USER root
COPY --from=keycloak /opt/jboss/tools /opt/jboss/tools
RUN /opt/jboss/tools/build-keycloak.sh
USER 1000
EXPOSE 8080
EXPOSE 8443
ENTRYPOINT [ "/opt/jboss/tools/docker-entrypoint.sh" ]
CMD ["-b", "0.0.0.0"]
You will need to tweak java.security file. See similar issue for RDS Postgres keycloak - SSL error: Certificates do not conform to algorithm constraints
I am trying to debug a servlet. After setting the break point and launching jboss in debug mode, the application hangs and eventually times out and throws a set of errors.
00:00:57,692 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
00:00:58,404 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
00:00:58,569 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
00:01:01,251 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
00:01:01,252 INFO [org.xnio] XNIO Version 3.0.3.GA
00:01:01,290 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
00:01:01,321 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
00:01:01,392 INFO [org.jboss.as.configadmin] JBAS016200: Activating ConfigAdmin Subsystem
00:01:01,432 INFO [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.
00:01:01,431 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
00:01:01,491 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013101: Activating Security Subsystem
00:01:01,512 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension
00:01:01,588 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 36) JBAS011800: Activating Naming Subsystem
00:01:01,591 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 37) JBAS011940: Activating OSGi Subsystem
00:01:01,676 INFO [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
00:01:01,851 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
00:01:01,887 INFO [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: Starting Naming Service
00:01:01,913 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS015400: Bound mail session [java:jboss/mail/Default]
00:01:02,195 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 26) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
00:01:02,252 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 26) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
00:01:02,430 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-6) JBoss Web Services - Stack CXF Server 4.0.2.GA
00:01:02,527 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
00:01:03,542 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory C:\Utils\jboss-as-7.1.1.Final\jboss-as-7.1.1.Final\standalone\deployments
00:01:03,585 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on localhost/127.0.0.1:4447
00:01:03,590 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999
00:01:03,621 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found StudentManagementEJB.jar in deployment directory. To trigger deployment create a file called StudentManagementEJB.jar.dodeploy
00:01:03,623 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found BooksPoint.war in deployment directory. To trigger deployment create a file called BooksPoint.war.dodeploy
00:01:03,625 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found DynamicWebProject1.war in deployment directory. To trigger deployment create a file called DynamicWebProject1.war.dodeploy
00:01:03,628 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found StudentManagement.war in deployment directory. To trigger deployment create a file called StudentManagement.war.dodeploy
00:01:03,629 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found BooksPointEJB.jar in deployment directory. To trigger deployment create a file called BooksPointEJB.jar.dodeploy
00:01:03,631 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found HelloWorldSessionBean.jar in deployment directory. To trigger deployment create a file called HelloWorldSessionBean.jar.dodeploy
The errors given are:
00:02:04,464 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) Operation ("add") failed - address: ([("deployment" => "BooksPoint.war")]) - failure description: "Operation cancelled asynchronously"
00:02:04,466 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
00:02:04,475 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
00:02:04,481 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
00:02:04,486 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
00:02:04,492 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
I have a batch file that creates the required .dodeploy files:
deploy.bat
echo " " > HelloWorldSessionBean.jar.dodeploy && echo " " > StudentManagementEJB.jar.dodeploy && echo " " > DynamicWebProject1.war.dodeploy && echo " " > BooksPoint.war.dodeploy && echo " " > StudentManagement.war.dodeploy
The files are already created before launching the server. I have also tried increasing the deployment timeout as suggested here. The server, however, still hangs and eventually times out even with the extended timeout.
Is there any workaround to this issue?
Do you have an excessive number of breakpoints in Eclipse? Try removing some/all breakpoints.
I've been working through the instructions here: http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/h2-console/#deploy_the_h2_console/
However, I can't figure out what is meant by this line of the instructions: "Deploy the console by copying the QUICKSTART_HOME/h2-console/h2console.war to the $JBOSS_HOME/standalone/deployments directory."
After installing the greeter quickstart, I did not have an "h2console.war" anywhere. So I downloaded all of the quickstarts from here: http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/ after which I had that file.
I then copied that file to the suggested folder, but that didn't seem to do anything as the suggested localhost does not load the console.
I've searched high and low but the documentation on h2-console installation seems sketchy at best. What am I missing?
I test it with Wildfly8.Alpha4 and work as aspected.
When you copy the h2console.war in $JBOSS_HOME/standalone/deployments you must see:
12:17:11,279 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "h2console.war" (runtime-name: "h2console.war")
12:17:11,394 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) JBAS018210: Register web context: /h2console
12:17:11,472 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "h2console.war" (runtime-name : "h2console.war")
on the Application Server's server.log. After that you can use the console at http://localhost:8080/h2console/.
I have an error during deploy and I did not understand what that mean. Here is the log:
16:54:50,298 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/content/RQ.war/WEB-INF/lib/mail-1.4.jar" does not point to a valid jar for a Class-Path reference.
16:54:52,888 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 6379ms - Started 632 of 876 services (163 services failed or missing dependencies, 76 services are passive or on-demand)
In that log I can see only ONE ERROR and ONE WARN. And application does not deploys..
An oracle driver was not installed correctly. I re-installed it and it works fine now.