WFLYCTL0348: TimeoutException while running Keycloak in a Docker container with an external database (MariaDB)

WFLYCTL0348 TimeoutException while running Keycloak in a Docker container with an external database (MariaDB)

I tried to start Keycloak in a Docker container with an external database (MariaDB) as described in the documentation of jboss/keycloak: docker run –rm –name=keycloak \ -e KEYCLOAK_USER=admin \ -e KEYCLOAK_PASSWORD=admin123 \ -e DB_VENDOR=mariadb \ -e DB_ADDR=192.168.178.143 \ -e DB_PORT=3306 \ -e DB_DATABASE=keycloak \ -e DB_USER=keycloak \ -e DB_PASSWORD=keycloak \ jboss/keycloak Unfortunately, I got this … Read more

Automatically reconnect to a database after a failure in JBoss EAP 7

My JBoss EAP 7 server couldn’t cope with a failing database. After a database restart or failure, e.g. due to maintenance, it simply would not connect to the database again automatically. The application simply stopped working as soon as the database was unavailable for a short period of time. JBoss’s server.log was full of (not … Read more

How to enable access logging (accesslog) in JBoss EAP 7

Configuring JBoss EAP 7 to write an access log (e.g. like Apache webserver) is quite easy with the CLI: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add If you need any additional configuration, take a look at this: Wildfly 10.0.0.Final Model Reference. For example, to change the prefix of the log’s file name: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:write-attribute(name=prefix, value=”my_access”) Alternatively, you could change the configuration in … Read more

How to test a REST API with Arquillian

Testing a REST API on a real application server with Arquillian is easy – if you know what you need to do 😉 I have this simple REST service, that authenticates a user: @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response authenticateUser(final UserData userData) { … return Response .status(401) .entity(false) .build(); } Let’s write a test for this … Read more

How to test JBoss EAP 7 with Arquillian

It took me quite some time to get my Arquillian tests running against a remote JBoss EAP 7.0.0.Beta1 application server, so I thought I’d share my configuration. At the time of this writing, there was no Arquillian container adapter for JBoss EAP 7 available. So I had to use the Arquillian Chameleon Container. However, it … Read more