求助!关于docker安装Hydro无法启动
  • 板块灌水区
  • 楼主diyanqi
  • 当前回复2
  • 已保存回复2
  • 发布时间2021/8/4 22:08
  • 上次更新2023/11/4 11:58:45
查看原帖
求助!关于docker安装Hydro无法启动
222419
diyanqi楼主2021/8/4 22:08

首先,是安装成功的

RT,在安装成功的前提下:

root@ubuntu:/home/ubuntu/Hydro/install/docker# docker-compose up -d
oj-mongo is up-to-date
oj-minio is up-to-date
oj-backend is up-to-date
oj-judge is up-to-date

然后oj-mongo一直restarting

利用docker ps -a命令:

root@ubuntu:/home/ubuntu/Hydro/install/docker# docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED             STATUS                            PORTS                    NAMES
60ab66cc8b0b   mongo               "docker-entrypoint.s…"   About an hour ago   Restarting (132) 41 seconds ago                            oj-mongo
cc328caa9ab3   docker_oj-judge     "/bin/sh -c /root/en…"   9 hours ago         Up 9 hours                                                 oj-judge
02625b642d7f   docker_oj-backend   "/bin/sh -c /root/en…"   9 hours ago         Up 9 hours                        0.0.0.0:2350->8888/tcp   oj-backend
4e3aed012734   minio/minio         "/usr/bin/docker-ent…"   9 hours ago         Up 9 hours                        9000/tcp                 oj-minio

(原图片:) image.png

oj-mongo没有输出日志。

oj-judge输出日志:

[I] judge [localhost] Updating session
Error: connect ECONNREFUSED 172.18.0.3:8888
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '172.18.0.3',
  port: 8888,
  config: {
    url: 'login',
    method: 'post',
    data: '{"uname":"root","password":"rootroot","rememberme":"on"}',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      cookie: '',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 56
    },
    baseURL: 'http://oj-backend:8888/',
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 30000,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false
    },
    _events: [Object: null prototype] {
      response: [Array],
      error: [Function: handleRequestError],
      socket: [Function: destroyOnTimeout]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/login',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'oj-backend',
      port: '8888',
      nativeProtocols: [Object],
      pathname: '/login'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 56,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /login HTTP/1.1\r\n' +
        'Accept: application/json\r\n' +
        'Content-Type: application/json\r\n' +
        'cookie: \r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 56\r\n' +
        'Host: oj-backend:8888\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/login',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'oj-backend',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'http://oj-backend:8888/login',
    _timeout: Timeout {
      _idleTimeout: -1,
      _idlePrev: null,
      _idleNext: null,
      _idleStart: 2091,
      _onTimeout: null,
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: true,
      [Symbol(refed)]: true,
      [Symbol(kHasPrimitive)]: false,
      [Symbol(asyncId)]: 73,
      [Symbol(triggerId)]: 69
    },
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
Unhandled Rejection at: Promise  Promise {
  <rejected> Error: connect ECONNREFUSED 172.18.0.3:8888
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) {
    errno: -111,

oj-backend输出日志:

MongoServerSelectionError: getaddrinfo EAI_AGAIN oj-mongo
    at Timeout._onTimeout (/usr/local/share/.config/yarn/global/node_modules/mongodb/lib/core/sdam/topology.js:437:30)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7) {
  reason: TopologyDescription {
    type: 'Single',
    setName: null,
    maxSetVersion: null,
    maxElectionId: null,
    servers: Map(1) { 'oj-mongo:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    compatibilityError: null,
    logicalSessionTimeoutMinutes: null,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    commonWireVersion: null
  }
}
2021-08-04T14:05:02: PM2 log: App [hydrooj:0] exited with code [1] via signal [SIGINT]
2021-08-04T14:05:02: PM2 log: App [hydrooj:0] starting in -fork mode-
2021-08-04T14:05:02: PM2 log: App [hydrooj:0] online
Transformed 14 files. (561ms)

貌似是因为mongo无法正常启动导致其他容器也无法启动了。


bdfswg。加载页面时会拒绝连接。求解决方案。

2021/8/4 22:08
加载中...