Error running on Docker, Ubuntu

Hi.

I`am new to OpenRemote, Docker and Ubuntu :sweat_smile:

I have set up a Ubuntu 20.04 machine with Docker 20.10.18 installed.
When i follow the installation procedure from: [openremote/README.md at master 路 openremote/openremote 路 GitHub] I get ann error when running the KeyCloak container. Please see attached log.

2022-10-05 08:53:44,105 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) 77b1ed293708-27672: no members discovered after 2002 ms: creating cluster as coordinator
2022-10-05 08:53:44,111 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [77b1ed293708-27672|0] (1) [77b1ed293708-27672]
2022-10-05 08:53:44,114 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel ISPN local address is 77b1ed293708-27672, physical addresses are [172.19.0.3:49287]
2022-10-05 08:53:51,254 WARN [io.agroal.pool] (agroal-11) Datasource 鈥樷: The connection attempt failed.
2022-10-05 08:53:51,257 WARN [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread: keycloak-default) HHH000342: Could not obtain connection to query metadata: org.postgresql.util.PSQLException: The connection attempt failed.

  • at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:331)*
  • at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)*
  • at org.postgresql.jdbc.PgConnection.(PgConnection.java:223)*
  • at org.postgresql.Driver.makeConnection(Driver.java:400)*
  • at org.postgresql.Driver.connect(Driver.java:259)*
  • at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)*
  • at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)*
  • at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:103)*
  • at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:49)*
  • at org.postgresql.xa.PGXADataSource.getXAConnection(PGXADataSource.java:35)*
  • at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:216)*
  • at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:513)*
  • at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:494)*
  • at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)*
  • at io.agroal.pool.util.PriorityScheduledExecutor.beforeExecute(PriorityScheduledExecutor.java:75)*
  • at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1126)*
  • at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)*
  • at java.base/java.lang.Thread.run(Thread.java:829)*
    Caused by: java.net.SocketTimeoutException: connect timed out
  • at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)*
  • at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)*
  • at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)*
  • at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)*
  • at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)*
  • at java.base/java.net.Socket.connect(Socket.java:609)*
  • at org.postgresql.core.PGStream.createSocket(PGStream.java:241)*
  • at org.postgresql.core.PGStream.(PGStream.java:98)*
  • at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:109)*
  • at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)*

So I`m not able to run the OpenRemote.

Does anyone have a tip how to fix this error.

Thanks in advanced

Hi,

That log suggests that Keycloak cannot reach the postgres database; are you using the docker compose file referenced in the wiki also?

1 Like

Hi.

Thanks for reply.

I use the yaml. Fil from the wiki also.

Can you show the status of all the containers:

docker ps -a
1 Like

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
77b1ed293708 openremote/keycloak:latest 鈥/bin/sh -c '/opt/ke鈥︹ 7 days ago Up 2 seconds (health: starting) 8080/tcp, 8443/tcp openremote_keycloak_1
4c6f350c182f portainer/portainer-ce 鈥/portainer鈥 7 days ago Up 6 days 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp, 9443/tcp portainer
9607fa01a6bb openremote/postgresql:latest 鈥渄ocker-entrypoint.s鈥︹ 7 days ago Up 6 days (healthy) 5432/tcp openremote_postgresql_1