botpress / v12

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

Docker compose deploy error with "Error: getaddrinfo ENOTFOUND postgres" #1699

Closed moranno closed 1 year ago

moranno commented 1 year ago

I'm trying to deploy following the https://github.com/botpress/botpress/tree/master/examples/docker-compose

but I always got the following error:

botpress-nlu            | STACK TRACE
botpress-nlu            | Error: getaddrinfo ENOTFOUND postgres
botpress-nlu            |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
botpress-nlu            | 11/24/2022 14:47:31.086 [NLU] Exit NLU Server exits after an error occured.
botpress-nlu exited with code 0
botpress-server         | Error starting botpress
botpress-server         | Error: getaddrinfo ENOTFOUND postgres
botpress-server         |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {
botpress-server         |   errno: 'ENOTFOUND',
botpress-server         |   code: 'ENOTFOUND',
botpress-server         |   syscall: 'getaddrinfo',
botpress-server         |   hostname: 'postgres'
botpress-server         | }
botpress-server         | getaddrinfo ENOTFOUND postgres
botpress-server         | ---STACK---
botpress-server         | Error: getaddrinfo ENOTFOUND postgres
botpress-server         |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
botpress-server         | Error starting botpress
botpress-server         | [Error: EACCES: permission denied, mkdir '/botpress/data/locks'] {
botpress-server         |   errno: -13,
botpress-server         |   code: 'EACCES',
botpress-server         |   syscall: 'mkdir',
botpress-server         |   path: '/botpress/data/locks'
botpress-server         | }
botpress-server         | EACCES: permission denied, mkdir '/botpress/data/locks'
botpress-server         | ---STACK---
botpress-server         | Error: EACCES: permission denied, mkdir '/botpress/data/locks'

any ideas?

System: debian 11 with aws ec2

moranno commented 1 year ago

another try with none root user:

botpress-lang           | 11/24/2022 15:04:22.109 [LANG] lang:service [ZH] Error loading language. It will be unavailable.
botpress-nlu            | 11/24/2022 15:04:22.239 [NLU]  Syncing data/global/ to database
botpress-nlu            | 11/24/2022 15:04:22.245 [NLU]  Syncing data/bots/ to database
botpress-nlu            | 11/24/2022 15:04:22.277 [NLU] Launcher NLU Server is ready at http://localhost:3200/. Make sure this URL is not publicly available.
botpress-server         | Error starting botpress
botpress-server         | [Error: EACCES: permission denied, mkdir '/botpress/data/locks'] {
botpress-server         |   errno: -13,
botpress-server         |   code: 'EACCES',
botpress-server         |   syscall: 'mkdir',
botpress-server         |   path: '/botpress/data/locks'
botpress-server         | }
botpress-server         | EACCES: permission denied, mkdir '/botpress/data/locks'
botpress-server         | ---STACK---
botpress-server         | Error: EACCES: permission denied, mkdir '/botpress/data/locks'
botpress-server         | Error starting botpress
botpress-server         | VError: [Disk Storage] Error upserting file "data/botpress.config.schema.json": EACCES: permission denied, open '/botpress/data/botpress.config.schema.json'
botpress-server         |     at DiskStorageDriver.upsertFile (/snapshot/botpress/packages/bp/dist/core/bpfs/drivers/disk-driver.js) {
botpress-server         |   jse_shortmsg: '[Disk Storage] Error upserting file "data/botpress.config.schema.json"',
botpress-server         |   jse_cause: [Error: EACCES: permission denied, open '/botpress/data/botpress.config.schema.json'] {
botpress-server         |     errno: -13,
botpress-server         |     code: 'EACCES',
botpress-server         |     syscall: 'open',
botpress-server         |     path: '/botpress/data/botpress.config.schema.json'
botpress-server         |   },
botpress-server         |   jse_info: {}
botpress-server         | }
botpress-server         | [Disk Storage] Error upserting file "data/botpress.config.schema.json": EACCES: permission denied, open '/botpress/data/botpress.config.schema.json'
botpress-server         | ---STACK---
botpress-server         | VError: [Disk Storage] Error upserting file "data/botpress.config.schema.json": EACCES: permission denied, open '/botpress/data/botpress.config.schema.json'
botpress-server         |     at DiskStorageDriver.upsertFile (/snapshot/botpress/packages/bp/dist/core/bpfs/drivers/disk-driver.js)
bassamtantawi-botpress commented 1 year ago

Hi @moranno ,

Can you check this release notes? https://github.com/botpress/botpress/releases/tag/v12.30.0