eclipse-arrowhead / core-java-spring

Eclipse Public License 2.0
28 stars 51 forks source link

Docker, Core system name SERVICEREGISTRY is not recognized. #361

Closed uessrodriguez closed 1 year ago

uessrodriguez commented 2 years ago

Hello

Trying deploy a docker enviroment from docker path directory https://github.com/eclipse-arrowhead/core-java-spring/tree/master/docker

Following the steps.

Plus: I've removed a space at the end, in file https://github.com/eclipse-arrowhead/core-java-spring/blob/master/docker/core_system_config/serviceregistry.properties in line core_system_name=SERVICEREGISTRY

With all AMD versions, with database created and filled

I can't start the SERVICEREGISTRY

main] e.a.c.s.ServiceRegistryMain              : Starting ServiceRegistryMain v4.3.0 on 53927d823100 with PID 9 (/serviceregistry/arrowhead-serviceregistry.jar started by root in /serviceregistry)
2021-11-15 11:01:30.050  INFO 53927d823100 --- [           main] e.a.c.s.ServiceRegistryMain              : No active profile set, falling back to default profiles: default
2021-11-15 11:01:58.791  WARN 53927d823100 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceRegistryApplicationInitListener': Unsatisfied dependency expressed through field 'coreSystemRegistrationProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'coreSystemRegistrationProperties': Invocation of init method failed; nested exception is java.util.ServiceConfigurationError: Core system name SERVICEREGISTRY is not recognized.
2021-11-15 11:01:58.982 ERROR 53927d823100 --- [           main] o.s.b.SpringApplication                  : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serviceRegistryApplicationInitListener': Unsatisfied dependency expressed through field 'coreSystemRegistrationProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'coreSystemRegistrationProperties': Invocation of init method failed; nested exception is java.util.ServiceConfigurationError: Core system name SERVICEREGISTRY is not recognized.
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)

Others container runs well, ORCHESTRATOR as example

2021-11-15 11:02:09.386  INFO 38669133a74d --- [           main] e.a.c.ApplicationInitListener            : Core system name: ORCHESTRATOR
2021-11-15 11:02:09.387  INFO 38669133a74d --- [           main] e.a.c.ApplicationInitListener            : Server mode: NOT SECURED

But all infraestructure depends of SERVICEREGISTRY :(

What I can be doing wrong?

TIA

tsvetlin commented 2 years ago

Hello!

Could you solve the issue, or the issue is still relevant?

uessrodriguez commented 2 years ago

Yes, it's solved compiling and using the jar created in docker.

Thanks

tsvetlin commented 2 years ago

If I understand correctly, did you build your own docker image?

uessrodriguez commented 2 years ago

Really we change the Jar in the docker image, but yes, we build a new docker image changing a bit the docker compose.

Thanks.

tsvetlin commented 2 years ago

If your docker compose is public, could you please share it, so I can update the images?

uessrodriguez commented 2 years ago

HI, its not public :( sorry, but the only change was: add another entry in volumen section with link to our compiled JAR.

As you see is a fix to use our compiled JAR, I Think that Service JAR SERVICEREGISTRY in docker image is wrong or something...

dorinelfilip commented 2 years ago

I have run into the same problem. Recompiling the jar and recreating the Docker image with the new asset was the solution for me.

esen96 commented 2 years ago

@dorinelfilip Would you mind giving a more detailed description on how you did it? I have the same issue and am new to docker so I don't understand the steps you took to solve it

hebomstr commented 1 year ago

@esen96 I managed to resolve this issue by changing the core_system_config/serviceregistry.properties file from

core_system_name=SERVICEREGISTRY

into

core_system_name=SERVICE_REGISTRY

Seems to be a typo in the properties file. Hope this helps.

borditamas commented 1 year ago

Hello,

we have just released the v4.6.1, where a more flexible docker approach has been taken and bug fixes were managed. Take a look and please open a new issue if you still runs into some error.