Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fido2-server is not accept because Error creating bean with name 'embeddedRedisServerConfig': Invocation of init method failed; nested exception is java.lang.RuntimeException: Can't start redis server. #45

Closed
subkaitaku opened this issue Jun 19, 2023 · 3 comments

Comments

@subkaitaku
Copy link

Thank you for the great project.
I would like to set up a fido2-server with M1 Macbook and Docker.
I have followed the following steps to compose Docker but fido2-server does not start up because it seems not to start redis.
I can access rp-server(:8080),but I can't access fido2-server(:8081).
Is there anything I should set up?

$ docker build -t build-image .   
$ docker compose build
$ docker compose up
...
fido2-server  | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
fido2-server  | 2023-06-19 14:59:13.785 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
fido2-server  | 
fido2-server  | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedRedisServerConfig': Invocation of init method failed; nested exception is java.lang.RuntimeException: Can't start redis server. Check logs for details.
fido2-server  | 	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) ~[spring-beans-5.3.4.jar!/:5.3.4]
fido2-server  | 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:422) ~[spring-beans-5.3.4.jar!/:5.3.4]

Environment

Apple M1
Ventura 13.4
docker desktop 4.20.1

@gebogebogebo
Copy link

I had the same problem with my Apple M2, but the following measures solved the problem.

/server/Dockerfile

before -> Can't start redis server

FROM openjdk:8-jdk-slim

after

FROM --platform=linux/amd64 openjdk:8-jdk-slim

@yedidyas
Copy link

yedidyas commented Jun 21, 2023

@gebogebogebo what a coincidence, I just had the same issue few minutes after you commented, that solved it. thanks

@subkaitaku
Copy link
Author

subkaitaku commented Jun 21, 2023

@gebogebogebo
Thank you!
I was able to reproduce the same way and access the h2 console.

  1. fix /server/Dockerfile: FROM --platform=linux/amd64 openjdk:8-jdk-slim
  2. docker compose build
  3. docker compose up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants