nodebb-plugin-solr icon indicating copy to clipboard operation
nodebb-plugin-solr copied to clipboard

This plugin cause ACP hang after upgrade from 1.18.6 to 1.19.0

Open 0312birdzhang opened this issue 3 years ago • 12 comments

Reference: https://github.com/NodeBB/NodeBB/issues/10166

0312birdzhang avatar Jan 18 '22 02:01 0312birdzhang

Okay, i tested on a clean nodebb(on windows), and error logs when click Admin :

NodeBB v1.19.0 Copyright (C) 2013-2022 NodeBB Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions.
For the full license, please visit: http://www.gnu.org/copyleft/gpl.html

Clustering enabled: Spinning up 1 process(es).

2022-01-19T08:39:49.610Z [4567/8156] - info: Initializing NodeBB v1.19.0 http://192.168.2.204:4567
2022-01-19T08:39:51.941Z [4567/8156] - info: [socket.io] Restricting access to origin: http://192.168.2.204:*
2022-01-19T08:39:53.064Z [4567/8156] - info: [api] Adding 3 route(s) to `api/v3/plugins`
2022-01-19T08:39:53.071Z [4567/8156] - info: [router] Routes added
2022-01-19T08:39:53.075Z [4567/8156] - info: NodeBB Ready
2022-01-19T08:39:53.076Z [4567/8156] - info: Enabling 'trust proxy'
2022-01-19T08:39:53.078Z [4567/8156] - info: NodeBB is now listening on: 0.0.0.0:4567
2022-01-19T08:40:33.120Z [4567/8156] - error: uncaughtException: connect ECONNREFUSED 127.0.0.1:8983
Error: connect ECONNREFUSED 127.0.0.1:8983
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {"date":"Wed Jan 19 2022 16:40:33 GMT+0800 (中国标准时间)","error":{"address":"127.0.0.1","code":"ECONNREFUSED","errno":-4078,"port":8983,"syscall":"connect"},"exception":true,"os":{"loadavg":[0,0,0],"uptime":631228},"process":{"argv":["F:\\Program Files\\nodejs\\node.exe","G:\\code\\nodebb\\app.js"],"cwd":"G:\\code\\nodebb","execPath":"F:\\Program Files\\nodejs\\node.exe","gid":null,"memoryUsage":{"arrayBuffers":230730,"external":2533134,"heapTotal":99143680,"heapUsed":81850384,"rss":139522048},"pid":8156,"uid":null,"version":"v16.13.2"},"stack":"Error: connect ECONNREFUSED 127.0.0.1:8983\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)\n    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)","trace":[{"column":16,"file":"node:net","function":"TCPConnectWrap.afterConnect [as oncomplete]","line":1161,"method":"afterConnect [as oncomplete]","native":false},{"column":17,"file":"node:internal/async_hooks","function":"TCPConnectWrap.callbackTrampoline","line":130,"method":"callbackTrampoline","native":false}]}
2022-01-19T08:40:33.121Z [4567/8156] - error: Error: connect ECONNREFUSED 127.0.0.1:8983
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
2022-01-19T08:40:33.121Z [4567/8156] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2022-01-19T08:40:33.123Z [4567/8156] - info: [app] Web server closed to connections.
2022-01-19T08:40:33.132Z [4567/8156] - info: [app] Live analytics saved.
2022-01-19T08:40:33.134Z [4567/8156] - info: [app] Database connection closed.
2022-01-19T08:40:33.134Z [4567/8156] - info: [app] Shutdown complete.
[cluster] Child Process (8156) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
2022-01-19T08:40:34.090Z [4567/13724] - info: Initializing NodeBB v1.19.0 http://192.168.2.204:4567
2022-01-19T08:40:35.747Z [4567/13724] - info: [app] Restarting...
[cluster] Restarting...
Clustering enabled: Spinning up 1 process(es).

[cluster] Child Process (13724) has exited (code: null, signal: SIGTERM)
2022-01-19T08:40:36.702Z [4567/20220] - info: Initializing NodeBB v1.19.0 http://192.168.2.204:4567
2022-01-19T08:40:39.092Z [4567/20220] - info: [socket.io] Restricting access to origin: http://192.168.2.204:*

0312birdzhang avatar Jan 19 '22 08:01 0312birdzhang

Error: connect ECONNREFUSED 127.0.0.1:8983 Seems like plugin isn't able to connect to the solr instance and that error is crashing nodebb.

barisusakli avatar Jan 19 '22 15:01 barisusakli

Error: connect ECONNREFUSED 127.0.0.1:8983 Seems like plugin isn't able to connect to the solr instance and that error is crashing nodebb.

Yeah, this plugin should be disabled as i haven't config it, but it use the default config to connect solr.

0312birdzhang avatar Jan 20 '22 02:01 0312birdzhang

👍 thanks for reporting

julianlam avatar Jan 24 '22 12:01 julianlam

Hi @0312birdzhang -- I looked into this issue and I think it is due to the underlying Solr dependency throwing an error when Solr.client.ping() is called. The exception is not caught, and the method is not awaitable, so it is up to them to resolve it.

julianlam avatar Jan 30 '22 18:01 julianlam

https://github.com/lbdremy/solr-node-client/issues/337

julianlam avatar Jan 30 '22 18:01 julianlam

Thank you very much 👍

0312birdzhang avatar Feb 02 '22 10:02 0312birdzhang

非常感谢👍

请问有后续是如何解决该问题的,目前在nodebb-v1.19.4上也遇到了相同问题。

并且在尝试将solr-client源码中默认的core修改为已有的core名称后,Solr.client.ping()并不会报错,但nodebb中solr配置页面依然无法访问。

fishros avatar Mar 15 '22 08:03 fishros

@fishros revert nodebb-plugin-solr and solr-node-client to old version (months ago), it works at least on v1.19.0, not sure about v1.19.4

0312birdzhang avatar Mar 15 '22 08:03 0312birdzhang

@fishros revert nodebb-plugin-solr and solr-node-client to old version (months ago), it works at least on v1.19.0, not sure about v1.19.4

十分感谢,这个信息对我非常有帮助。

fishros avatar Mar 15 '22 08:03 fishros

解决了吗? 也卡这里了

mozii-org avatar Jun 15 '22 09:06 mozii-org

Running nodebb version v1.19.8 Also having same issue with nodebb-plugin-solr 5.3.1 Compatible with solr-client 0.6.0 and nodebb-plugin-solr 5.2.10

zylim97 avatar Jun 23 '22 09:06 zylim97