spinnaker: local docker-compose up fails to start gate: Binding to target com.netflix.spinnaker.gate.config.ServiceConfiguration failed

Description

Ran DOCKER_IP=docker.local docker-compose up -d in experimental/docker-compose, but the gate container fails to start.

First error: Binding to target com.netflix.spinnaker.gate.config.ServiceConfiguration@7540160e failed: Property: target.services[ORCA_HOST] Value: orca ... Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]': no matching editors or conversion strategy found.

Steps to Reproduce

git clone git@github.com:spinnaker/spinnaker.git cd spinnaker/experimental/docker-compose DOCKER_IP=docker.local docker-compose up -d docker-compose ps

Additional Details

This is quay.io/spinnaker/gate:master, digest: sha256:d00de31fe30409cd8379c8cc0572678f9bcc12432adb17970f6708c93e5cbe8a.

Spring configuration:

$ docker-compose run gate bash
root@4ebc4e7674d9:/workdir# head /opt/gate/config/gate.yml 
server:
  port: 8084

services:
  deck:
    baseUrl: http://localhost:9000
  orca:
    baseUrl: http://localhost:8083
  front50:
    canaryConfigStore: false

Full error log:

$ docker-compose run gate
Starting front50 ... 

Starting redis ... done
Starting clouddriver ... done
Starting rosco ... done
Starting igor ... done
Starting orca ... done

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.4.RELEASE)

2017-11-29 18:45:11.078  INFO 1 --- [           main] com.netflix.spinnaker.gate.Main          : Starting Main v4.13.0-SNAPSHOT on 8317422a40ef with PID 1 (/opt/gate/lib/gate-web-4.13.0-SNAPSHOT.jar started by root in /workdir)
2017-11-29 18:45:11.081  INFO 1 --- [           main] com.netflix.spinnaker.gate.Main          : The following profiles are active: test,local
2017-11-29 18:45:11.137  INFO 1 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@61d9efe0: startup date [Wed Nov 29 18:45:11 UTC 2017]; root of context hierarchy
2017-11-29 18:45:12.438  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2017-11-29 18:45:12.976  INFO 1 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2017-11-29 18:45:13.149  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'pollingScheduler' of type [com.netflix.config.FixedDelayPollingScheduler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-11-29 18:45:13.152  INFO 1 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'polledConfigurationSource' of type [com.netflix.spinnaker.kork.archaius.SpringEnvironmentPolledConfigurationSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2017-11-29 18:45:13.168  WARN 1 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2017-11-29 18:45:13.168  INFO 1 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2017-11-29 18:45:13.599  INFO 1 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8084 (http)
2017-11-29 18:45:13.609  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2017-11-29 18:45:13.610  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.15
2017-11-29 18:45:13.712  INFO 1 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2017-11-29 18:45:13.713  INFO 1 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2579 ms
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Properties configuration failed validation
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[ORCA_HOST]': rejected value [orca]; codes [typeMismatch.target.services[ORCA_HOST],typeMismatch.target.services,typeMismatch.services[ORCA_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ORCA_HOST],services[ORCA_HOST]]; arguments []; default message [services[ORCA_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[ECHO_HOST]': rejected value [echo]; codes [typeMismatch.target.services[ECHO_HOST],typeMismatch.target.services,typeMismatch.services[ECHO_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ECHO_HOST],services[ECHO_HOST]]; arguments []; default message [services[ECHO_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[IGOR_HOST]': rejected value [igor]; codes [typeMismatch.target.services[IGOR_HOST],typeMismatch.target.services,typeMismatch.services[IGOR_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[IGOR_HOST],services[IGOR_HOST]]; arguments []; default message [services[IGOR_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[CLOUDDRIVER_HOST]': rejected value [clouddriver]; codes [typeMismatch.target.services[CLOUDDRIVER_HOST],typeMismatch.target.services,typeMismatch.services[CLOUDDRIVER_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[CLOUDDRIVER_HOST],services[CLOUDDRIVER_HOST]]; arguments []; default message [services[CLOUDDRIVER_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[ROSCO_HOST]': rejected value [rosco]; codes [typeMismatch.target.services[ROSCO_HOST],typeMismatch.target.services,typeMismatch.services[ROSCO_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ROSCO_HOST],services[ROSCO_HOST]]; arguments []; default message [services[ROSCO_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.005 ERROR 1 --- [ost-startStop-1] o.s.b.b.PropertiesConfigurationFactory   : Field error in object 'target' on field 'services[FRONT50_HOST]': rejected value [front50]; codes [typeMismatch.target.services[FRONT50_HOST],typeMismatch.target.services,typeMismatch.services[FRONT50_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[FRONT50_HOST],services[FRONT50_HOST]]; arguments []; default message [services[FRONT50_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.006 ERROR 1 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter    : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'gateConfig': Unsatisfied dependency expressed through field 'eurekaLookupService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaLookupService': Unsatisfied dependency expressed through field 'serviceConfiguration'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceConfiguration': Could not bind properties to ServiceConfiguration (prefix=, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 6 errors
Field error in object 'target' on field 'services[ORCA_HOST]': rejected value [orca]; codes [typeMismatch.target.services[ORCA_HOST],typeMismatch.target.services,typeMismatch.services[ORCA_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ORCA_HOST],services[ORCA_HOST]]; arguments []; default message [services[ORCA_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]': no matching editors or conversion strategy found]
Field error in object 'target' on field 'services[ECHO_HOST]': rejected value [echo]; codes [typeMismatch.target.services[ECHO_HOST],typeMismatch.target.services,typeMismatch.services[ECHO_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ECHO_HOST],services[ECHO_HOST]]; arguments []; default message [services[ECHO_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]': no matching editors or conversion strategy found]
Field error in object 'target' on field 'services[IGOR_HOST]': rejected value [igor]; codes [typeMismatch.target.services[IGOR_HOST],typeMismatch.target.services,typeMismatch.services[IGOR_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[IGOR_HOST],services[IGOR_HOST]]; arguments []; default message [services[IGOR_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]': no matching editors or conversion strategy found]
Field error in object 'target' on field 'services[CLOUDDRIVER_HOST]': rejected value [clouddriver]; codes [typeMismatch.target.services[CLOUDDRIVER_HOST],typeMismatch.target.services,typeMismatch.services[CLOUDDRIVER_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[CLOUDDRIVER_HOST],services[CLOUDDRIVER_HOST]]; arguments []; default message [services[CLOUDDRIVER_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]': no matching editors or conversion strategy found]
Field error in object 'target' on field 'services[ROSCO_HOST]': rejected value [rosco]; codes [typeMismatch.target.services[ROSCO_HOST],typeMismatch.target.services,typeMismatch.services[ROSCO_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[ROSCO_HOST],services[ROSCO_HOST]]; arguments []; default message [services[ROSCO_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]': no matching editors or conversion strategy found]
Field error in object 'target' on field 'services[FRONT50_HOST]': rejected value [front50]; codes [typeMismatch.target.services[FRONT50_HOST],typeMismatch.target.services,typeMismatch.services[FRONT50_HOST],typeMismatch.services,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [target.services[FRONT50_HOST],services[FRONT50_HOST]]; arguments []; default message [services[FRONT50_HOST]]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]': no matching editors or conversion strategy found]
2017-11-29 18:45:14.029  WARN 1 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2017-11-29 18:45:14.041  INFO 1 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-11-29 18:45:14.045 ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Binding to target com.netflix.spinnaker.gate.config.ServiceConfiguration@7540160e failed:

    Property: target.services[ORCA_HOST]
    Value: orca
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ORCA_HOST]': no matching editors or conversion strategy found

    Property: target.services[ECHO_HOST]
    Value: echo
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ECHO_HOST]': no matching editors or conversion strategy found

    Property: target.services[IGOR_HOST]
    Value: igor
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[IGOR_HOST]': no matching editors or conversion strategy found

    Property: target.services[CLOUDDRIVER_HOST]
    Value: clouddriver
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[CLOUDDRIVER_HOST]': no matching editors or conversion strategy found

    Property: target.services[ROSCO_HOST]
    Value: rosco
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[ROSCO_HOST]': no matching editors or conversion strategy found

    Property: target.services[FRONT50_HOST]
    Value: front50
    Reason: Failed to convert property value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.netflix.spinnaker.gate.config.Service' for property 'services[FRONT50_HOST]': no matching editors or conversion strategy found


Action:

Update your application's configuration

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 8
  • Comments: 18

Most upvoted comments

+1 any idea how to solve this issue ?

+1. Was there any resolution on this?

EDIT:

After uncommenting the following in gate.yml under …/…/config,

Circular references since we’re already using ‘services’

services: clouddriver: baseUrl: ${services.clouddriver.baseUrl:localhost:7002} orca: baseUrl: ${services.orca.baseUrl:localhost:8083} front50: baseUrl: ${services.front50.baseUrl:localhost:8080} #optional services: echo: enabled: ${services.echo.enabled:true} baseUrl: ${services.echo.baseUrl:8089} flapjack: enabled: ${services.flapjack.enabled:false} igor: enabled: ${services.igor.enabled:true} baseUrl: ${services.igor.baseUrl:8088}

The gate pod is up and running and does not crash:

localhost% docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e3fd62752d25 quay.io/spinnaker/gate:master “/opt/gate/bin/gate” 3 minutes ago Up 3 minutes 0.0.0.0:8084->8084/tcp gate

Still the site is stuck on the Hello page.

Solution

The issue was that the environment variable that was getting set in the docker-compose.yml file for gate was causing the issue. Once you remove those variables and in the gate.yml file instead of baseURL for all the services which is pointing to localhost, make them point to the DOCKER MACHINE IP address, the gate container will come up and the page does not get stuck in the Hello Page.