Hey all,
I’m working on initializing the dcc-portal-server in it’s own Docker container, which communicates to the portal-ui and elasticsearch outside of the container. The Dockerfile is as follows:
FROM java:8-jre
ENV DCC_HOME /opt/dcc
RUN useradd -m dcc && mkdir -p $DCC_HOME
ENV RELEASE=4.3.27
WORKDIR $DCC_HOME
ADD https://artifacts.oicr.on.ca/artifactory/dcc-release/org/icgc/dcc/dcc-portal-server/${RELEASE}/dcc-portal-server-${RELEASE}-dist.tar.gz $DCC_HOME
RUN tar xf dcc-portal-server-${RELEASE}-dist.tar.gz && \
rm dcc-portal-server-${RELEASE}-dist.tar.gz
RUN sed -i.bak s/spring.profiles.active=.*$/spring.profiles.active=ohsu-dev/ ${DCC_HOME}/dcc-portal-server-${RELEASE}/conf/wrapper.conf
RUN cat dcc-portal-server-${RELEASE}/conf/wrapper.conf
COPY conf/portal.yml ${DCC_HOME}/dcc-portal-server-${RELEASE}/conf/application.yml
WORKDIR $DCC_HOME/dcc-portal-server-${RELEASE}
EXPOSE 9000 9200 9300
CMD bin/dcc-portal-server start && tail -F logs/dcc-portal-server.log
And I am starting it in compose like this:
# run DCC-portal-server
server:
container_name: server
build:
context: services/server
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
- 9200:9200
- 9300:9300
volumes:
- "./.resource_data:/resource"
But I am continually getting an error that looks like this:
Unsatisfied dependency expressed through field 'hazelcast':
Error creating bean with name 'hazelcastProperties' defined in class path resource [org/icgc/dcc/portal/server/config/ServerConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.icgc.dcc.portal.server.config.ServerProperties$HazelcastProperties]:
Factory method 'hazelcastProperties' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'properties':
Could not bind properties to ServerProperties (prefix=, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException:
org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult:
1 errors
Field error in object 'target' on field 'release':
rejected value [4.3.27]; codes [typeMismatch.target.release,typeMismatch.release,typeMismatch.org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable:
codes [target.release,release]; arguments []; default message [release]]; default message [Failed to convert property value of type [java.lang.String] to required type [org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties] for property 'release'; nested exception is java.lang.IllegalStateException:
Cannot convert value of type [java.lang.String] to required type [org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties] for property 'release':
no matching editors or conversion strategy found]; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'hazelcastProperties' defined in class path resource [org/icgc/dcc/portal/server/config/ServerConfig.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.icgc.dcc.portal.server.config.ServerProperties$HazelcastProperties]:
Factory method 'hazelcastProperties' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'properties':
Could not bind properties to ServerProperties (prefix=, ignoreInvalidFields=false, ignoreUnknownFields=true, ignoreNestedProperties=false); nested exception is org.springframework.validation.BindException:
org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult:
1 errors
Field error in object 'target' on field 'release':
rejected value [4.3.27]; codes [typeMismatch.target.release,typeMismatch.release,typeMismatch.org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable:
codes [target.release,release]; arguments []; default message [release]]; default message [Failed to convert property value of type [java.lang.String] to required type [org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties] for property 'release'; nested exception is java.lang.IllegalStateException:
Cannot convert value of type [java.lang.String] to required type [org.icgc.dcc.portal.server.config.ServerProperties$ReleaseProperties] for property 'release':
no matching editors or conversion strategy found]
"
Action:
Review the stack trace and configuration
What’s confusing is the same set-up and configuration, I don’t have this problem on bare metal. Is it possible I have some networking error in connecting to elastic or something? Maybe there’s a dependency missing from my Dockerfile? I’m using the test-application.yml conf file.
Thanks,
Georgia