jhipster / jhipster-registry

JHipster Registry, based on Spring Cloud Netflix Eureka and Spring Cloud Config
Apache License 2.0
699 stars 657 forks source link

Getting Error 500 on login #143

Closed MSaifAsif closed 7 years ago

MSaifAsif commented 7 years ago

I am running it via docker with the following command

[~]$ docker run -p 8761:8761 jhipster/jhipster-registry

Logs look fine to me


        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝

:: JHipster Registry :: Running Spring Boot 1.5.2.RELEASE ::
:: http://jhipster.github.io ::

2017-05-14 14:40:32.815  INFO 1 --- [           main] i.g.j.registry.JHipsterRegistryApp       : The following profiles are active: prod,native
2017-05-14 14:40:34.090  WARN 1 --- [           main] o.s.c.a.ConfigurationClassPostProcessor  : Cannot enhance @Configuration bean definition 'refreshScope' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2017-05-14 14:40:37.201  WARN 1 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-05-14 14:40:37.727  INFO 1 --- [           main] i.g.j.registry.config.WebConfigurer      : Web application configuration, using profiles: prod
2017-05-14 14:40:37.740  INFO 1 --- [           main] i.g.j.registry.config.WebConfigurer      : Web application fully configured
2017-05-14 14:40:39.761  INFO 1 --- [           main] com.netflix.discovery.DiscoveryClient    : Client configured to neither register nor query for data.
2017-05-14 14:40:39.781  INFO 1 --- [           main] com.netflix.discovery.DiscoveryClient    : Discovery Client initialized at timestamp 1494772839780 with initial instances count: 0
2017-05-14 14:40:40.129  INFO 1 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON encoding codec LegacyJacksonJson
2017-05-14 14:40:40.130  INFO 1 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using JSON decoding codec LegacyJacksonJson
2017-05-14 14:40:40.130  INFO 1 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML encoding codec XStreamXml
2017-05-14 14:40:40.131  INFO 1 --- [           main] c.n.d.provider.DiscoveryJerseyProvider   : Using XML decoding codec XStreamXml
2017-05-14 14:40:44.543  WARN 1 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-05-14 14:40:45.423  INFO 1 --- [           main] i.g.j.registry.JHipsterRegistryApp       : Started JHipsterRegistryApp in 15.149 seconds (JVM running for 15.818)
2017-05-14 14:40:45.425  INFO 1 --- [           main] i.g.j.registry.JHipsterRegistryApp       : 
----------------------------------------------------------
    Application 'jhipster-registry' is running! Access URLs:
    Local:      http://localhost:8761
    External:   http://172.17.0.2:8761
    Profile(s):     [prod, native]
----------------------------------------------------------
2017-05-14 14:40:46.791  WARN 1 --- [  XNIO-2 task-1] o.s.c.n.zuul.web.ZuulHandlerMapping      : No routes found from RouteLocator

but when I try to login with admin/admin credentials, I get an error. Attaching screenshot

screen shot 2017-05-14 at 4 48 12 pm
pascalgrimaud commented 7 years ago

You need probably to set the JHIPSTER_SECURITY_AUTHENTICATION_JWT_SECRET as environnement variable.

Can you try: docker run --rm --name registry -p 8761:8761 -e SPRING_PROFILES_ACTIVE=dev,native -e JHIPSTER_SECURITY_AUTHENTICATION_JWT_SECRET=xxxxxxx jhipster/jhipster-registry ?

jdubois commented 7 years ago

Yes that's the issue, I get it quite often, that's because you didn't configure your "native" or "git" profile correctly -> have a look at the documentation for this, I wrote it there

I agree we should have this easier on the first run.