有时当我启动 Jhipster 注册表时,我会收到此错误。
C:\DEV\GITLAB\docker.compose>docker-compose -f jhipster-registry.yml up
Starting dockercompose_jhipster-registry_1 ... error
ERROR: for dockercompose_jhipster-registry_1 Cannot start service jhipster-registry: b'driver failed programming external connectivity on endpoint dockercompose_jhipster-registry_1 (4d7fb5c0e58ffbe825abc1d6ec7fa07ff19d61916647b8b74e82cf90437da7aa): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8761:tcp:172.19.0.2:8761: input/output error'
ERROR: for jhipster-registry Cannot start service jhipster-registry: b'driver failed programming external connectivity on endpoint dockercompose_jhipster-registry_1 (4d7fb5c0e58ffbe825abc1d6ec7fa07ff19d61916647b8b74e82cf90437da7aa): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8761:tcp:172.19.0.2:8761: input/output error'
ERROR: Encountered errors while bringing up the project.
看起来它不会启动,因为端口已被占用。所以我用多个程序查看了这个
尝试:
Netstat / Resource monitor / TCPvie w 但他们都看不到占用该端口的任何东西。
docker-compose down
它是通过重新启动窗口临时修复的。它也可以通过重新启动 docker 来修复。
jhipster-registry.yml:
version: '2'
services:
jhipster-registry:
image: jhipster/jhipster-registry:v3.2.4
volumes:
- ./central-server-config:/central-config
# By default the JHipster Registry runs with the "dev" and "native"
# Spring profiles.
# "native" profile means the filesystem is used to store data, see
# http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html
environment:
- SPRING_PROFILES_ACTIVE=dev,native
- SECURITY_USER_PASSWORD=something
- JHIPSTER_REGISTRY_PASSWORD=something
- JHIPSTER_LOGGING_LOGSTASH_ENABLED=true
- JHIPSTER_LOGGING_LOGSTASH_HOST=jhipster-logstash
- JHIPSTER_METRICS_LOGS_ENABLED=true
- JHIPSTER_METRICS_LOGS_REPORTFREQUENCY=60
# - GIT_URI=https://github.com/jhipster/jhipster-registry/
# - GIT_SEARCH_PATHS=central-config
ports:
- 8761:8761