tolgee-platform icon indicating copy to clipboard operation
tolgee-platform copied to clipboard

Using docker to start an error for the first time

Open liuliang opened this issue 1 year ago • 9 comments

Using docker to start an error for the first time docker version: Docker version 24.0.2, build cb74dfc docker-compose.yaml

version: '3'

services:
  app:
    image: tolgee/tolgee
    volumes:
      - ./data:/data
    ports:
      - '25432:25432' # if you would like to access the DB
      - '8080:8080'

Error message

o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'jwtTokenFilter' defined in URL [jar:file:/app/lib/api-plain.jar!/io/tolgee/security/JwtTokenFilter.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jwtTokenProviderImpl' defined in URL [jar:file:/app/lib/api-plain.jar!/io/tolgee/security/JwtTokenProviderImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userAccountService' defined in URL [jar:file:/app/lib/data-v3.24.1-plain.jar!/io/tolgee/service/security/UserAccountService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAccountRepository' defined in io.tolgee.repository.UserAccountRepository defined in @EnableJpaRepositories declared on Application: Cannot create inner bean '(inner bean)#51f412e6' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#51f412e6': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ee-liquibase' defined in class path resource [io/tolgee/ee/configuration/EeLiquibaseConfiguration.class]: Unsatisfied dependency expressed through method 'liquibase' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getDataSource' defined in class path resource [io/tolgee/configuration/PostgresAutoStartConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'getDataSource' threw exception; nested exception is io.tolgee.fixtures.WaitNotSatisfiedException

liuliang avatar Aug 02 '23 14:08 liuliang

Hi! Is there any other configuration, you're using?

JanCizmar avatar Aug 02 '23 14:08 JanCizmar

@JanCizmar No other configuration, All settings are default

liuliang avatar Aug 03 '23 02:08 liuliang

Well I've just tried to run latest tolgee/tolgee, and it normally boots. You need to provide more information about the version you use and the full server log.

JanCizmar avatar Aug 03 '23 04:08 JanCizmar

@JanCizmar I put the full log here https://gist.github.com/liuliang/52d86cfdfab992d1d3e17ab25345f688 It will only report an error when you run it for the first time, that is, when the data directory is empty Thanks

liuliang avatar Aug 03 '23 05:08 liuliang

Having a similar issue here's my full log if it helps, nothing changed just the default. Using tolgee/tolgee:latest, Docker Docker version 24.0.5, build ced0996600, Linux Kernel 6.4.7-arch1-3 https://gist.github.com/WildEgo/22d189f275be994f5846c9ce9ef42f56

WildEgo avatar Aug 04 '23 22:08 WildEgo

OK, so we've got an workaround! Run it twice. I'll look into that.

JanCizmar avatar Aug 07 '23 07:08 JanCizmar

Although the second attempt seems successful, some configurations may fail,eg: initial-password, initial-user, only "no auth user"

liuliang avatar Aug 08 '23 16:08 liuliang

I don't know what you mean by "fail".

JanCizmar avatar Aug 09 '23 12:08 JanCizmar

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 09 '23 01:09 github-actions[bot]