Where is openremote log file?

Hi,

I am using the latest docker images (manager) and I can’t find the openremote log file any more. It used to be under the deployment folder. Is it disabled? How can I enable the log file back?

And also I was trying to configure the basic identity but failed. I changed the docker-compose.yml to have a line:

IDENTITY_PROVIDER: basic

But the docker manager container failed to start. And I couldn’t find what went wrong, I had no log file to look at.

Any help? Thanks.

Docker logs are available through docker logs container_name command.

Thanks Michal,

By using the docker logs command, I was able to find out what went wrong. The mapped deployment folder didn’t have permission to let the manager container to write the log file.

And also by looking at the log, there is an error when I switch to IDENTITY_PROVIDER: basic.

Using logging configuration on classpath: logging.properties
2022-01-18 19:15:11.025 INFO [main ] org.openremote.container.Container : >>> Starting runtime container…
2022-01-18 19:15:11.118 INFO [main ] .openremote.manager.syslog.SyslogService : Syslog service enabled
2022-01-18 19:15:11.151 INFO [main ] .manager.security.ManagerIdentityService : Enabling basic identity provider
2022-01-18 19:15:11.182 INFO [main ] container.persistence.PersistenceService : Preparing persistence service for database: POSTGRES
2022-01-18 19:15:11.222 INFO [main ] container.persistence.PersistenceService : Opening database connection: jdbc:postgresql://postgresql:5432/openremote?currentSchema=openremote
2022-01-18 19:15:12.759 INFO [main ] ydb.core.internal.license.VersionPrinter : Flyway Community Edition 6.4.3 by Redgate
2022-01-18 19:15:13.043 INFO [main ] b.core.internal.database.DatabaseFactory : Database: jdbc:postgresql://postgresql:5432/openremote (PostgreSQL 14.1)
2022-01-18 19:15:13.107 WARNING [main ] ydb.core.internal.database.base.Database : Flyway upgrade recommended: PostgreSQL 14.1 is newer than this version of Flyway and support has not been tested. The latest supported version of PostgreSQL is 12.
2022-01-18 19:15:13.327 WARNING [main ] ydb.core.internal.database.base.Database : Flyway upgrade recommended: PostgreSQL 14.1 is newer than this version of Flyway and support has not been tested. The latest supported version of PostgreSQL is 12.
2022-01-18 19:15:13.418 WARNING [main ] ydb.core.internal.database.base.Database : Flyway upgrade recommended: PostgreSQL 14.1 is newer than this version of Flyway and support has not been tested. The latest supported version of PostgreSQL is 12.
2022-01-18 19:15:13.466 SEVERE [main ] org.openremote.container.Container : >>> Runtime container startup failed
org.flywaydb.core.api.FlywayException: Validate failed:
Detected resolved migration not applied to database: 20191202.00

    at org.flywaydb.core.Flyway.doValidate(Flyway.java:285)
    at org.flywaydb.core.Flyway.access$100(Flyway.java:74)
    at org.flywaydb.core.Flyway$1.execute(Flyway.java:167)
    at org.flywaydb.core.Flyway$1.execute(Flyway.java:159)
    at org.flywaydb.core.Flyway.execute(Flyway.java:530)
    at org.flywaydb.core.Flyway.migrate(Flyway.java:159)
    at org.openremote.container.persistence.PersistenceService.prepareSchema(PersistenceService.java:491)
    at org.openremote.container.persistence.PersistenceService.init(PersistenceService.java:275)
    at org.openremote.container.Container.start(Container.java:164)
    at org.openremote.container.Container.startBackground(Container.java:209)
    at org.openremote.manager.Main.main(Main.java:31)

How can I resolve this issue?

Please try the latest manager docker image, it is recommended to clear docker volumes between docker-compose up/down commands, unless you specifically want to preserve data.

Thanks Rich,

I update manager’s image to the latest, and clear all the volumes and start the dockers again with IDENTITY: basic and I have new issue:

2022-01-19 12:45:02.409 INFO [main ] er.security.ManagerBasicIdentityProvider : Creating master tenant and admin user
2022-01-19 12:45:02.478 INFO [main ] er.security.ManagerBasicIdentityProvider : Creating user: org.openremote.model.security.User{realm=‘null’, id=‘null’, username=‘admin’, firstName=‘null’, lastName=‘null’, email=‘null’, secret=‘null’, enabled=null}
2022-01-19 12:45:02.540 WARN [main ] rnate.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 42703
2022-01-19 12:45:02.541 ERROR [main ] rnate.engine.jdbc.spi.SqlExceptionHelper : ERROR: column excluded.pasword does not exist
Hint: Perhaps you meant to reference the column “excluded.password”.
Position: 216
2022-01-19 12:45:02.559 SEVERE [main ] org.openremote.container.Container : >>> Runtime container startup failed
org.hibernate.exception.SQLGrammarException: error executing work
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:311)
at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1084)
at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1071)
at org.openremote.manager.security.ManagerBasicIdentityProvider.lambda$createUpdateUser$3(ManagerBasicIdentityProvider.java:112)
at org.openremote.container.persistence.PersistenceService.lambda$doTransaction$3(PersistenceService.java:364)
at org.openremote.container.persistence.PersistenceService.doReturningTransaction(PersistenceService.java:374)
at org.openremote.container.persistence.PersistenceService.doTransaction(PersistenceService.java:363)
at org.openremote.manager.security.ManagerBasicIdentityProvider.createUpdateUser(ManagerBasicIdentityProvider.java:112)
at org.openremote.manager.security.ManagerBasicIdentityProvider.start(ManagerBasicIdentityProvider.java:76)
at org.openremote.container.security.IdentityService.start(IdentityService.java:68)
at org.openremote.container.Container.start(Container.java:168)
at org.openremote.container.Container.startBackground(Container.java:209)
at org.openremote.manager.Main.main(Main.java:31)
Caused by: org.postgresql.util.PSQLException: ERROR: column excluded.pasword does not exist
Hint: Perhaps you meant to reference the column “excluded.password”.
Position: 216
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at org.openremote.manager.security.ManagerBasicIdentityProvider.lambda$createUpdateUser$2(ManagerBasicIdentityProvider.java:125)
at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:37)
at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$1(AbstractSharedSessionContract.java:1068)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:306)
… 12 more

Hi,

Sorry for the delayed response. There was a bug in the IDENTITY_PROVIDER basic code which prevented start-up, it has now been resolved (try a manager image newer than this post).

A word of caution though, the basic identity provider has very limited functionality and is not really supported any more as keycloak can be run on arm as well as intel\amd

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.