boostcampwm-2022 / web18-PRV

논문 인용관계를 밤하늘의 별 처럼 표시해보자 🌟-🌟
https://paperef.com
146 stars 3 forks source link

auto-complete나 search api 호출 시 간헐적으로 ERR_CONNECTION_REFUSED 오류가 발생하는 현상 #74

Closed Palwol closed 1 year ago

Palwol commented 1 year ago

이슈 내용

기대 결과

leesungbin commented 1 year ago

elasticsearch에서 나는 오류로 확인됩니다.

/app/node_modules/@elastic/transport/lib/Transport.js:525
                            : new errors_1.ConnectionError(error.message, result);
                              ^

ConnectionError: connect ECONNREFUSED 우리IP:9200
    at SniffingTransport.request (/app/node_modules/@elastic/transport/lib/Transport.js:525:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ElasticsearchService.IndexApi [as index] (/app/node_modules/@elastic/elasticsearch/lib/api/api/index.js:51:12)
    at async SearchService.putElasticSearch (/app/dist/search/search.service.js:86:16) {
  meta: {
    body: undefined,
    statusCode: 0,
    headers: {},
    meta: {
      context: null,
      request: {
        params: {
          method: 'PUT',
          path: '/papers/_doc/10.1007%2F978-1-4842-6464-5_1',
          body: '{"title":"Introduction to GitHub Actions","authors":["Chaminda Chandrasekara","Pushpa Herath"],"doi":"10.1007/978-1-4842-6464-5_1","publishedAt":"2021-02-22T09:08:04Z","citations":3,"references":0}',
          querystring: '',
          headers: {
            'user-agent': 'elastic-transport-js/8.2.0 (linux 4.15.0-118-generic-x64; Node.js v18.12.1)',
            accept: 'application/json',
            'content-type': 'application/json',
            'x-elastic-client-meta': 'es=8.5.0,js=18.12.1,t=8.2.0,hc=18.12.1',
            'content-length': '197'
          }
        },
        options: {},
        id: 2
      },
      name: 'elasticsearch-js',
      connection: HttpConnection {
        url: <ref *1> URL {
          [Symbol(context)]: URLContext {
            flags: 400,
            scheme: 'http:',
            username: '',
            password: '',
            host: 'elastic',
            port: 9200,
            path: [Array],
            query: null,
            fragment: null
          },
          [Symbol(query)]: URLSearchParams {
            [Symbol(query)]: [],
            [Symbol(context)]: [Circular *1]
          }
        },
        tls: null,
        id: 'http://elastic:9200/',
        timeout: 30000,
        headers: {
          authorization: 'Basic ZWxhc3RpYzpzZjlvdVJtSXIwTUxhd003N1NETA=='
        },
        deadCount: 0,
        resurrectTimeout: 0,
        _openRequests: 839,
        weight: 1000,
        agent: Agent {
          _events: [Object: null prototype] {
            free: [Function (anonymous)],
            newListener: [Function: maybeEnableKeylog]
          },
          _eventsCount: 2,
          _maxListeners: undefined,
          defaultPort: 80,
          protocol: 'http:',
          options: [Object: null prototype] {
            keepAlive: true,
            keepAliveMsecs: 1000,
            maxSockets: 256,
            maxFreeSockets: 256,
            scheduling: 'lifo',
            noDelay: true,
            path: null
          },
          requests: [Object: null prototype] { 'elastic:9200:': [Array] },
          sockets: [Object: null prototype] { 'elastic:9200:': [Array] },
          freeSockets: [Object: null prototype] {},
          keepAliveMsecs: 1000,
          keepAlive: true,
          maxSockets: 256,
          maxFreeSockets: 256,
          scheduling: 'lifo',
          maxTotalSockets: Infinity,
          totalSocketCount: 256,
          [Symbol(kCapture)]: false
        },
        makeRequest: [Function: request],
        [Symbol(status)]: 'alive',
        [Symbol(ca fingerprint)]: null,
        [Symbol(diagnostics)]: Diagnostic {
          _events: [Object: null prototype] {},
          _eventsCount: 0,
          _maxListeners: undefined,
          [Symbol(kCapture)]: false
        }
      },
      attempts: 3,
      aborted: false
    },
    warnings: [Getter]
  }
}
leesungbin commented 1 year ago