无法使用openshift部署jhipster-registry

时间:2017-09-18 08:26:21

标签: docker openshift jhipster docker-image

我在openshift中使用jhipster处理微服务应用程序。 我尝试使用现有的jhipster-registry docker镜像部署并从github存储库中提取。

当我部署图像时导致此错误:

2017-09-18 08:16:24.233 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.IllegalStateException: Logback configuration error detected: 
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/target/jhipster-registry.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(target/jhipster-registry.log,true) call failed. java.io.FileNotFoundException: target/jhipster-registry.log (No such file or directory)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:162)
    at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:81)
    at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:59)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:115)
    at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:303)
    at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:276)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
    at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:212)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
    at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)
    at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)
    at io.github.jhipster.registry.JHipsterRegistryApp.main(JHipsterRegistryApp.java:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)

有人可以帮我解决这个问题吗?

2 个答案:

答案 0 :(得分:0)

看起来您的泊坞窗图片无法找到给定的文件或目录。根据{{​​3}},如果您希望将应用程序停靠,则应将其作为mvn package docker:build运行。这将生成一个docker镜像,然后您可以将其推送到内部OpenShift注册表,然后从OpenShift部署该镜像。

答案 1 :(得分:0)

这似乎与issue with jhipster-registry Docker image

有关

我在OpenShift中使用jhipster-registry:v4.0.4,并且可以正常工作。