Need help installing ZeeQS with PostgreSQL via docker-compose

I want to include ZeeQS service with PostgreSQL DB in my own docker-compose.

PostgreSQL is well and running, but ZeeQS container crash and restart infinitely with this error:

madam_zeeqs.1.33rilbfuryst@z68-gen3    | 
madam_zeeqs.1.33rilbfuryst@z68-gen3    |     _/_/_/_/_/                                _/_/          _/_/_/
madam_zeeqs.1.33rilbfuryst@z68-gen3    |          _/          _/_/        _/_/      _/    _/      _/
madam_zeeqs.1.33rilbfuryst@z68-gen3    |       _/          _/_/_/_/    _/_/_/_/    _/  _/_/        _/_/
madam_zeeqs.1.33rilbfuryst@z68-gen3    |    _/            _/          _/          _/    _/            _/
madam_zeeqs.1.33rilbfuryst@z68-gen3    | _/_/_/_/_/        _/_/_/      _/_/_/      _/_/  _/    _/_/_/
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 
madam_zeeqs.1.33rilbfuryst@z68-gen3    | ==================================================================
madam_zeeqs.1.33rilbfuryst@z68-gen3    |                                   
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:22.563  INFO 1 --- [           main] io.zeebe.zeeqs.ZeeqlApplicationKt        : Starting ZeeqlApplicationKt on 0b3d426bc0dc with PID 1 (/app/classes started by root in /)
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:22.584  INFO 1 --- [           main] io.zeebe.zeeqs.ZeeqlApplicationKt        : No active profile set, falling back to default profiles: default
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:24.571  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:24.767  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 177ms. Found 13 JPA repository interfaces.
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:25.888  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9000 (http)
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:25.904  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:25.904  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:26.076  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:26.077  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3268 ms
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:28.011  WARN 1 --- [           main] g.kickstart.tools.SchemaClassScanner     : Root query resolver was provided but no methods on it were used in data fetchers for GraphQL type 'Query'!  Either remove the graphql.kickstart.tools.GraphQLQueryResolver interface from the resolver or remove the resolver entirely: io.zeebe.zeeqs.data.resolvers.VariableQueryResolver@30a9e3db
madam_zeeqs.1.33rilbfuryst@z68-gen3    | WARNING: An illegal reflective access operation has occurred
madam_zeeqs.1.33rilbfuryst@z68-gen3    | WARNING: Illegal reflective access by com.esotericsoftware.reflectasm.AccessClassLoader (file:/app/libs/reflectasm-1.11.9.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
madam_zeeqs.1.33rilbfuryst@z68-gen3    | WARNING: Please consider reporting this to the maintainers of com.esotericsoftware.reflectasm.AccessClassLoader
madam_zeeqs.1.33rilbfuryst@z68-gen3    | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
madam_zeeqs.1.33rilbfuryst@z68-gen3    | WARNING: All illegal access operations will be denied in a future release
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:29.103  INFO 1 --- [           main] g.k.s.w.b.GraphQLWebAutoConfiguration    : Building GraphQLObjectMapper including errorHandler: null
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:29.775  INFO 1 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:29.795  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.038  INFO 1 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.250  INFO 1 --- [         task-1] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.370  INFO 1 --- [           main] io.zeebe.zeeqs.ZeeqlApplication          : Connecting to Hazelcast: 'HazelcastProperties(connection=zeebe:5701, connectionTimeout=PT1M, ringbuffer=zeebe, connectionInitialBackoff=PT15S, connectionBackoffMultiplier=2.0, connectionMaxBackoff=PT30S)'
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.432  INFO 1 --- [         task-1] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.21.Final
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.681  INFO 1 --- [         task-1] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:30.863  INFO 1 --- [         task-1] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:31.900  INFO 1 --- [         task-1] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:31.934  INFO 1 --- [         task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:32.612  WARN 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 42P01
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:32.613 ERROR 1 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: relation "hazelcast_config" does not exist
madam_zeeqs.1.33rilbfuryst@z68-gen3    |   Position: 82
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 2020-12-09 22:49:32.634  INFO 1 --- [           main] o.h.e.internal.DefaultLoadEventListener  : HHH000327: Error performing load command
madam_zeeqs.1.33rilbfuryst@z68-gen3    | 
madam_zeeqs.1.33rilbfuryst@z68-gen3    | org.hibernate.exception.SQLGrammarException: could not extract ResultSet
madam_zeeqs.1.33rilbfuryst@z68-gen3    |        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:103) ~[hibernate-core-5.4.21.Final.jar:5.4.21.Final]

Logs in PostgreSQL display the same error of missing table:

madam_db.1.5n9z3i9a2pm0@z68-gen3    | 2020-12-09 19:12:11.767 UTC [63] ERROR:  relation "hazelcast_config" does not exist at character 82
madam_db.1.5n9z3i9a2pm0@z68-gen3    | 2020-12-09 19:12:11.767 UTC [63] STATEMENT:  select hazelcastc0_.id as id1_2_0_, hazelcastc0_.sequence as sequence2_2_0_ from hazelcast_config hazelcastc0_ where hazelcastc0_.id=$1

Why is this table missing? Is there a configuration I missed?

Hi @vtexier,

I guess that it is an issue with the configuration. It should create the database tables on startup.

Please have a look at the configuration page: https://github.com/zeebe-io/zeeqs#configuration

And check if the following property is set.

spring.jpa.hibernate.ddl-auto: create

Does this help you?

Best regards,
Philipp

1 Like

Thanks so much.

Mounting the postgresql config file in the container make it works!

But the image does not allow to see where to put the config file… (no sh or bash to navigate in the image folders).

So I explicitly tell java where is mounted the config file, with the command parameter:

  zeeqs:
    container_name: zeeqs
    image: camunda/zeeqs:latest
    environment:
      - zeebe.client.worker.hazelcast.connection=zeebe:5701
      - spring.datasource.url=jdbc:postgresql://db:5432/postgres
      - spring.datasource.username=postgres
      - spring.datasource.password=zeebe
      - spring.datasource.driverClassName=org.postgresql.Driver
      - spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
    configs:
      - source: "zeeqs_application"
        target: "/app/config/application.yaml"
    volumes:
      - /tmp/madam_setup/postgresql-42.2.18.jar:/app/libs/postgresql-42.2.18.jar
    ports:
      - "9000:9000"
    command: "--spring.config.location=/app/config/"
    depends_on:
      - db
    networks:
      - zeebe_network
1 Like