ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
16.46k stars 1.54k forks source link

[BUG] perplexica-132-perplexica-backend-1 shutdown unexpectly. #103

Closed wwjCMP closed 6 months ago

wwjCMP commented 6 months ago

Describe the bug

perplexica-132-perplexica-backend-1 shutdown unexpectly.

To Reproduce

I use ollama serve that was deployed on another computer in the local network.

Expected behavior

Screenshots

2024-05-09 04:49:58 yarn run v1.22.19 2024-05-09 04:49:58 $ node dist/app.js 2024-05-09 04:49:59 info: WebSocket server started on port 3011 2024-05-09 04:49:59 info: Server is running on port 3011 2024-05-09 04:53:38 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2024-05-09 04:54:20 yarn run v1.22.19 2024-05-09 04:54:20 $ node dist/app.js 2024-05-09 04:54:20 info: WebSocket server started on port 3011 2024-05-09 04:49:59 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-09 04:49:59 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-09 04:53:38 node:internal/process/promises:289 2024-05-09 04:53:38 triggerUncaughtException(err, true / fromPromise /); 2024-05-09 04:53:38 ^ 2024-05-09 04:53:38 2024-05-09 04:53:38 APIConnectionError: Connection error. 2024-05-09 04:53:38 at OpenAI.makeRequest (/home/perplexica/node_modules/openai/core.js:292:19) 2024-05-09 04:53:38 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-09 04:53:38 at async /home/perplexica/node_modules/@langchain/openai/dist/chat_models.cjs:684:29 2024-05-09 04:53:38 at async RetryOperation._fn (/home/perplexica/node_modules/p-retry/index.js:50:12) { 2024-05-09 04:53:38 status: undefined, 2024-05-09 04:53:38 headers: undefined, 2024-05-09 04:53:38 error: undefined, 2024-05-09 04:53:38 code: undefined, 2024-05-09 04:53:38 param: undefined, 2024-05-09 04:53:38 type: undefined, 2024-05-09 04:53:38 cause: FetchError: request to http://localhost:8005/v1/chat/completions failed, reason: connect ECONNREFUSED 127.0.0.1:8005 2024-05-09 04:53:38 at ClientRequest. (/home/perplexica/node_modules/node-fetch/lib/index.js:1501:11) 2024-05-09 04:53:38 at ClientRequest.emit (node:events:520:28) 2024-05-09 04:53:38 at Socket.socketErrorListener (node:_http_client:502:9) 2024-05-09 04:53:38 at Socket.emit (node:events:532:35) 2024-05-09 04:53:38 at emitErrorNT (node:internal/streams/destroy:170:8) 2024-05-09 04:53:38 at emitErrorCloseNT (node:internal/streams/destroy:129:3) 2024-05-09 04:53:38 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { 2024-05-09 04:53:38 type: 'system', 2024-05-09 04:53:38 errno: 'ECONNREFUSED', 2024-05-09 04:53:38 code: 'ECONNREFUSED' 2024-05-09 04:53:38 }, 2024-05-09 04:53:38 attemptNumber: 7, 2024-05-09 04:53:38 retriesLeft: 0 2024-05-09 04:53:38 } 2024-05-09 04:53:38 2024-05-09 04:53:38 Node.js v22.1.0 2024-05-09 04:53:38 error Command failed with exit code 1. 2024-05-09 04:54:20 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-09 04:54:20 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-09 04:54:20 info: Server is running on port 3011 2024-05-09 04:56:40 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2024-05-09 09:32:30 yarn run v1.22.19 2024-05-09 09:32:30 $ node dist/app.js 2024-05-09 09:32:31 info: WebSocket server started on port 3011 2024-05-09 09:32:31 info: Server is running on port 3011 2024-05-09 13:24:09 yarn run v1.22.19 2024-05-09 13:24:09 $ node dist/app.js 2024-05-09 13:24:11 info: WebSocket server started on port 3011 2024-05-09 13:24:11 info: Server is running on port 3011 2024-05-09 14:53:16 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2024-05-09 14:55:34 yarn run v1.22.19 2024-05-09 14:55:34 $ node dist/app.js 2024-05-09 14:55:35 info: WebSocket server started on port 3011 2024-05-09 14:55:35 info: Server is running on port 3011 2024-05-10 12:13:04 yarn run v1.22.19 2024-05-10 12:13:04 $ node dist/app.js 2024-05-10 12:13:06 info: WebSocket server started on port 3011 2024-05-10 12:13:06 info: Server is running on port 3011 2024-05-10 21:59:34 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2024-05-10 22:04:03 yarn run v1.22.19 2024-05-10 22:04:04 $ node dist/app.js 2024-05-10 22:04:04 info: WebSocket server started on port 3011 2024-05-10 22:04:04 info: Server is running on port 3011 2024-05-10 22:33:36 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2024-05-10 22:34:57 yarn run v1.22.19 2024-05-10 22:34:57 $ node dist/app.js 2024-05-10 22:34:57 info: WebSocket server started on port 3011 2024-05-10 22:34:57 info: Server is running on port 3011 2024-05-09 04:56:40 node:internal/process/promises:289 2024-05-09 04:56:40 triggerUncaughtException(err, true / fromPromise /); 2024-05-09 04:56:40 ^ 2024-05-09 04:56:40 2024-05-09 04:56:40 APIConnectionError: Connection error. 2024-05-09 04:56:40 at OpenAI.makeRequest (/home/perplexica/node_modules/openai/core.js:292:19) 2024-05-09 04:56:40 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-09 04:56:40 at async /home/perplexica/node_modules/@langchain/openai/dist/chat_models.cjs:684:29 2024-05-09 04:56:40 at async RetryOperation._fn (/home/perplexica/node_modules/p-retry/index.js:50:12) { 2024-05-09 04:56:40 status: undefined, 2024-05-09 04:56:40 headers: undefined, 2024-05-09 04:56:40 error: undefined, 2024-05-09 04:56:40 code: undefined, 2024-05-09 04:56:40 param: undefined, 2024-05-09 04:56:40 type: undefined, 2024-05-09 04:56:40 cause: FetchError: request to http://localhost:8006/v1/chat/completions failed, reason: connect ECONNREFUSED 127.0.0.1:8006 2024-05-09 04:56:40 at ClientRequest. (/home/perplexica/node_modules/node-fetch/lib/index.js:1501:11) 2024-05-09 04:56:40 at ClientRequest.emit (node:events:520:28) 2024-05-09 04:56:40 at Socket.socketErrorListener (node:_http_client:502:9) 2024-05-09 04:56:40 at Socket.emit (node:events:532:35) 2024-05-09 04:56:40 at emitErrorNT (node:internal/streams/destroy:170:8) 2024-05-09 04:56:40 at emitErrorCloseNT (node:internal/streams/destroy:129:3) 2024-05-09 04:56:40 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { 2024-05-09 04:56:40 type: 'system', 2024-05-09 04:56:40 errno: 'ECONNREFUSED', 2024-05-09 04:56:40 code: 'ECONNREFUSED' 2024-05-09 04:56:40 }, 2024-05-09 04:56:40 attemptNumber: 7, 2024-05-09 04:56:40 retriesLeft: 0 2024-05-09 04:56:40 } 2024-05-09 04:56:40 2024-05-09 04:56:40 Node.js v22.1.0 2024-05-09 04:56:40 error Command failed with exit code 1. 2024-05-09 09:32:31 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-09 09:32:31 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-09 13:24:11 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-09 13:24:11 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-09 14:53:16 node:internal/process/promises:289 2024-05-09 14:53:16 triggerUncaughtException(err, true / fromPromise /); 2024-05-09 14:53:16 ^ 2024-05-09 14:53:16 2024-05-09 14:53:16 APIConnectionError: Connection error. 2024-05-09 14:53:16 at OpenAI.makeRequest (/home/perplexica/node_modules/openai/core.js:292:19) 2024-05-09 14:53:16 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-09 14:53:16 at async /home/perplexica/node_modules/@langchain/openai/dist/chat_models.cjs:684:29 2024-05-09 14:53:16 at async RetryOperation._fn (/home/perplexica/node_modules/p-retry/index.js:50:12) { 2024-05-09 14:53:16 status: undefined, 2024-05-09 14:53:16 headers: undefined, 2024-05-09 14:53:16 error: undefined, 2024-05-09 14:53:16 code: undefined, 2024-05-09 14:53:16 param: undefined, 2024-05-09 14:53:16 type: undefined, 2024-05-09 14:53:16 cause: FetchError: request to http://localhost:8006/v1/chat/completions failed, reason: connect ECONNREFUSED 127.0.0.1:8006 2024-05-09 14:53:16 at ClientRequest. (/home/perplexica/node_modules/node-fetch/lib/index.js:1501:11) 2024-05-09 14:53:16 at ClientRequest.emit (node:events:520:28) 2024-05-09 14:53:16 at Socket.socketErrorListener (node:_http_client:502:9) 2024-05-09 14:53:16 at Socket.emit (node:events:532:35) 2024-05-09 14:53:16 at emitErrorNT (node:internal/streams/destroy:170:8) 2024-05-09 14:53:16 at emitErrorCloseNT (node:internal/streams/destroy:129:3) 2024-05-09 14:53:16 at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { 2024-05-09 14:53:16 type: 'system', 2024-05-09 14:53:16 errno: 'ECONNREFUSED', 2024-05-09 14:53:16 code: 'ECONNREFUSED' 2024-05-09 14:53:16 }, 2024-05-09 14:53:16 attemptNumber: 7, 2024-05-09 14:53:16 retriesLeft: 0 2024-05-09 14:53:16 } 2024-05-09 14:53:16 2024-05-09 14:53:16 Node.js v22.1.0 2024-05-09 14:53:16 error Command failed with exit code 1. 2024-05-09 14:55:35 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-09 14:55:35 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-10 12:13:06 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-10 12:13:06 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-10 21:59:34 /home/perplexica/dist/agents/webSearchAgent.js:85 2024-05-10 21:59:34 const documents = res.results.map((result) => new documents_1.Document({ 2024-05-10 21:59:34 ^ 2024-05-10 21:59:34 2024-05-10 21:59:34 TypeError: Cannot read properties of undefined (reading 'map') 2024-05-10 21:59:34 at RunnableLambda.func (/home/perplexica/dist/agents/webSearchAgent.js:85:43) 2024-05-10 21:59:34 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-10 21:59:34 at async /home/perplexica/node_modules/@langchain/core/dist/runnables/base.cjs:1385:33 2024-05-10 21:59:34 2024-05-10 21:59:34 Node.js v22.1.0 2024-05-10 21:59:34 error Command failed with exit code 1. 2024-05-10 22:04:04 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-10 22:04:04 (Use node --trace-deprecation ... to show where the warning was created) 2024-05-10 22:33:36 /home/perplexica/dist/agents/webSearchAgent.js:85 2024-05-10 22:33:36 const documents = res.results.map((result) => new documents_1.Document({ 2024-05-10 22:33:36 ^ 2024-05-10 22:33:36 2024-05-10 22:33:36 TypeError: Cannot read properties of undefined (reading 'map') 2024-05-10 22:33:36 at RunnableLambda.func (/home/perplexica/dist/agents/webSearchAgent.js:85:43) 2024-05-10 22:33:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-05-10 22:33:36 at async /home/perplexica/node_modules/@langchain/core/dist/runnables/base.cjs:1385:33 2024-05-10 22:33:36 2024-05-10 22:33:36 Node.js v22.1.0 2024-05-10 22:33:36 error Command failed with exit code 1. 2024-05-10 22:34:57 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. 2024-05-10 22:34:57 (Use node --trace-deprecation ... to show where the warning was created)

Additional context

ItzCrazyKns commented 6 months ago

Just restart the container. We're working on adding better error handling that would fix the issue.