botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
66 stars 81 forks source link

Botpress NLU server is not working #1718

Closed waseelmufti closed 1 year ago

waseelmufti commented 1 year ago

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:


Hi, I am deploying botpress linux-binary to my Linux server for some learning purposes. But, the problem is that nlu server is not working. I deployed duckling and language servers on my hosting, also create reverse proxies to have access to these servers, also I updated the botpress version, and also try to run nlu server separately. But nothing working. following are the information related to environment: Node: v12.18.1 Linux: Oracle Linux Server 8.7 Botpress: v12.30.6

Error when I run Botpress

./bp 01/05/2023 13:55:18.391 Launcher =========================================================================== Botpress Server Version 12.30.6 - Build 20221207-0300_BIN - OS: linux red-hat

01/05/2023 13:55:18.393 Launcher App Data Dir: "/home/waseel/botpress" 01/05/2023 13:55:18.394 Launcher Using 11 modules ⦿ analytics ⦿ basic-skills ⦿ builtin ⦿ channel-web ⦿ code-editor ⦿ examples ⦿ hitlnext ⦿ misunderstood ⦿ nlu ⦿ testing ⦿ uipath ⊝ bot-improvement (disabled) ⊝ broadcast (disabled) ⊝ google-speech (disabled) ⊝ hitl (disabled) ⊝ libraries (disabled) ⊝ ndu (disabled) 01/05/2023 13:55:18.395 Server Running in DEVELOPMENT MODE 01/05/2023 13:55:19.459 Server Loaded 11 modules 01/05/2023 13:55:19.646 CMS Loaded 11 content types 01/05/2023 13:55:19.657 Server Botpress Pro must be enabled to use a custom theme and customize the branding. 01/05/2023 13:55:20.044 Server Discovered 0 bots 01/05/2023 13:55:20.046 Server Local Action Server will only run in experimental mode 01/05/2023 13:55:20.471 Server Started in 2076ms 01/05/2023 13:55:23.268 [NLU] Launcher =========================================================================== Botpress Standalone NLU Version 1.0.2 - Build 20220910-0140_BIN

01/05/2023 13:55:23.271 [NLU] Launcher Loading config from environment variables 01/05/2023 13:55:23.272 [NLU] Launcher limit: disabled (no protection - anyone can query without limitation) 01/05/2023 13:55:23.272 [NLU] Launcher duckling: enabled url=https://chatbot.pitb.gov.pk/duckling/ 01/05/2023 13:55:23.272 [NLU] Launcher lang server: url=https://chatbot.pitb.gov.pk/lang-server/ 01/05/2023 13:55:23.273 [NLU] Launcher body size: allowing HTTP requests body of size 2mb 01/05/2023 13:55:23.273 [NLU] Launcher models stored at "/home/waseel-seweb/botpress" 01/05/2023 13:55:23.273 [NLU] Launcher batch size: allowing up to 1 predictions in one call to POST /predict 01/05/2023 13:55:24.416 [NLU] Engine operation timed out after 1140 ms, 2 tries with error: Request failed with status code 503 STACK TRACE Error: operation timed out after 1140 ms, 2 tries with error: Request failed with status code 503 at /snapshot/nlu/node_modules/bluebird-retry/lib/bluebird-retry.js:109:35 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at /snapshot/nlu/node_modules/bluebird/js/release/catch_filter.js:24:41 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/snapshot/nlu/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/snapshot/nlu/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/snapshot/nlu/node_modules/bluebird/js/release/async.js:102:5) at Immediate._onImmediate (/snapshot/nlu/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:456:21) at process.topLevelDomainCallback (domain.js:137:15) 01/05/2023 13:55:24.418 [NLU] Engine Could not load Language Provider at https://chatbot.pitb.gov.pk/lang-server/: ETIMEDOUT 01/05/2023 13:55:24.419 [NLU] Engine Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:24.420 [NLU] Engine There was an error while initializing Engine tools. Check out the connection to your language and Duckling server. 01/05/2023 13:55:24.420 [NLU] Exit Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:24.421 [NLU] Exit NLU Server exits after an error occured. 01/05/2023 13:55:24.453 Cluster [nlu] Restarting process... 01/05/2023 13:55:24.571 [Messaging] Launcher =========================================================================== Botpress Messaging Version 1.2.7

01/05/2023 13:55:24.919 [Messaging] Launcher Messaging is listening at: http://localhost:3101 01/05/2023 13:55:26.437 [NLU] Launcher =========================================================================== Botpress Standalone NLU Version 1.0.2 - Build 20220910-0140_BIN

01/05/2023 13:55:26.441 [NLU] Launcher Loading config from environment variables 01/05/2023 13:55:26.442 [NLU] Launcher limit: disabled (no protection - anyone can query without limitation) 01/05/2023 13:55:26.443 [NLU] Launcher duckling: enabled url=https://chatbot.pitb.gov.pk/duckling/ 01/05/2023 13:55:26.443 [NLU] Launcher lang server: url=https://chatbot.pitb.gov.pk/lang-server/ 01/05/2023 13:55:26.443 [NLU] Launcher body size: allowing HTTP requests body of size 2mb 01/05/2023 13:55:26.444 [NLU] Launcher models stored at "/home/waseel-seweb/botpress" 01/05/2023 13:55:26.444 [NLU] Launcher batch size: allowing up to 1 predictions in one call to POST /predict 01/05/2023 13:55:27.628 [NLU] Engine operation timed out after 1177 ms, 2 tries with error: Request failed with status code 503 STACK TRACE Error: operation timed out after 1177 ms, 2 tries with error: Request failed with status code 503 at /snapshot/nlu/node_modules/bluebird-retry/lib/bluebird-retry.js:109:35 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at /snapshot/nlu/node_modules/bluebird/js/release/catch_filter.js:24:41 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/snapshot/nlu/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/snapshot/nlu/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/snapshot/nlu/node_modules/bluebird/js/release/async.js:102:5) at Immediate._onImmediate (/snapshot/nlu/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:456:21) at process.topLevelDomainCallback (domain.js:137:15) 01/05/2023 13:55:27.629 [NLU] Engine Could not load Language Provider at https://chatbot.pitb.gov.pk/lang-server/: ETIMEDOUT 01/05/2023 13:55:27.630 [NLU] Engine Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:27.631 [NLU] Engine There was an error while initializing Engine tools. Check out the connection to your language and Duckling server. 01/05/2023 13:55:27.631 [NLU] Exit Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:27.632 [NLU] Exit NLU Server exits after an error occured. 01/05/2023 13:55:27.661 Cluster [nlu] Restarting process... 01/05/2023 13:55:27.734 [Studio] Launcher =========================================================================== Botpress Studio Version 0.0.65 - Build 20221130-2127_BIN

01/05/2023 13:55:27.751 [Studio] Server Loaded 11 modules 01/05/2023 13:55:28.011 [Studio] CMS Loaded 11 content types 01/05/2023 13:55:28.206 [Studio] Server Discovered 0 bots 01/05/2023 13:55:28.207 [Studio] Server Started in 471ms 01/05/2023 13:55:28.208 [Studio] Launcher Studio is listening at: http://localhost:4000 01/05/2023 13:55:28.243 Launcher 01/05/2023 13:55:28.243 Launcher =========================================================================== 01/05/2023 13:55:28.244 Launcher --> Documentation is available at 📘 https://botpress.com/docs 01/05/2023 13:55:28.244 Launcher --> Ask your questions on 👥 https://forum.botpress.com 01/05/2023 13:55:28.244 Launcher =========================================================================== 01/05/2023 13:55:28.245 Launcher 01/05/2023 13:55:28.245 Launcher Botpress is ready. open the Studio in your favorite browser. 01/05/2023 13:55:28.245 Launcher Botpress is listening at http://localhost:3000 (browser) 01/05/2023 13:55:28.246 Launcher Botpress is exposed at https://chatbot.pitb.gov.pk 01/05/2023 13:55:29.315 [NLU] Launcher =========================================================================== Botpress Standalone NLU Version 1.0.2 - Build 20220910-0140_BIN

01/05/2023 13:55:29.318 [NLU] Launcher Loading config from environment variables 01/05/2023 13:55:29.319 [NLU] Launcher limit: disabled (no protection - anyone can query without limitation) 01/05/2023 13:55:29.319 [NLU] Launcher duckling: enabled url=https://chatbot.pitb.gov.pk/duckling/ 01/05/2023 13:55:29.319 [NLU] Launcher lang server: url=https://chatbot.pitb.gov.pk/lang-server/ 01/05/2023 13:55:29.320 [NLU] Launcher body size: allowing HTTP requests body of size 2mb 01/05/2023 13:55:29.320 [NLU] Launcher models stored at "/home/waseel-seweb/botpress" 01/05/2023 13:55:29.320 [NLU] Launcher batch size: allowing up to 1 predictions in one call to POST /predict 01/05/2023 13:55:30.451 [NLU] Engine operation timed out after 1129 ms, 2 tries with error: Request failed with status code 503 STACK TRACE Error: operation timed out after 1129 ms, 2 tries with error: Request failed with status code 503 at /snapshot/nlu/node_modules/bluebird-retry/lib/bluebird-retry.js:109:35 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at /snapshot/nlu/node_modules/bluebird/js/release/catch_filter.js:24:41 at tryCatcher (/snapshot/nlu/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/snapshot/nlu/node_modules/bluebird/js/release/promise.js:725:18) at _drainQueueStep (/snapshot/nlu/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/snapshot/nlu/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/snapshot/nlu/node_modules/bluebird/js/release/async.js:102:5) at Immediate._onImmediate (/snapshot/nlu/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:456:21) at process.topLevelDomainCallback (domain.js:137:15) 01/05/2023 13:55:30.453 [NLU] Engine Could not load Language Provider at https://chatbot.pitb.gov.pk/lang-server/: ETIMEDOUT 01/05/2023 13:55:30.454 [NLU] Engine Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:30.455 [NLU] Engine There was an error while initializing Engine tools. Check out the connection to your language and Duckling server. 01/05/2023 13:55:30.455 [NLU] Exit Cannot read property 'dim' of undefined STACK TRACE TypeError: Cannot read property 'dim' of undefined at RemoteLanguageProvider.computeVersionHash (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.computeCacheFilesPaths (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at RemoteLanguageProvider.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/language/language-provider.js) at async initializeLanguageProvider (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Object.initializeTools (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/initialize-tools.js) at async Engine.initialize (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/engine/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-engine/dist/index.js) at async Object.makeEngine (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-engine.js) at async Object.makeApplication (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/bootstrap/make-application.js) at async Object.run (/snapshot/nlu/node_modules/@botpress/nlu-server/dist/index.js) 01/05/2023 13:55:30.457 [NLU] Exit NLU Server exits after an error occured. 01/05/2023 13:55:30.470 Cluster [nlu] Exceeded the maximum number of automatic reboot (2). Set the "BP_MAX_SERVER_REBOOT" environment variable to change that

nlu.json

{ "$schema": "bp://types/modules/nlu/config.schema.json", "nluServer": { "autoStart": true }, "ducklingURL": "https://mysite.com/duckling/", "ducklingEnabled": true, "preloadModels": true, "languageSources": [ { "endpoint": "https://mysite.com/lang-server/" } ], "modelCacheSize": "850mb", "maxTrainingPerInstance": 1, "queueTrainingOnBotMount": false, "legacyElection": false }

sebburon commented 1 year ago

Looks like an issue with how you are starting your language server Here is a link to help you setup a language server with local language models http://botpress-docs.s3-website-us-east-1.amazonaws.com/docs/infrastructure/hosting/#installing-a-language-library

nathanc91 commented 1 year ago

Hello @waseelmufti, were you able to get this working? I have same issue when I tried to use my proxy url as the language server.

sebburon commented 1 year ago

Hey @nathanc91 A good way to check if your language server works is to GET on the /info route Here is an example of what you should see https://lang-01.botpress.io/info

nathanc91 commented 1 year ago

Thank you, @sebburon! This will help me test further on this issue :)