Nodebb on a Docker Container error -122
-
Hello everyone I have made this docker compose file to install Nodebb (ignore the database part as i know it will not be created on startup)
services: nodebb: image: ghcr.io/nodebb/nodebb:${NODEBB_TAG} volumes: - nodebb-docker:/usr/src/app/public/uploads restart: ${RESTART_POLICY} ports: - '${DOMAIN}:${APP_PORT}:${APP_PORT}' depends_on: - mongodb mongodb: image: docker.io/bitnami/mongodb:${MONGODB_VER} volumes: - mongo-nodebb:/bitnami/mongodb restart: always expose: - ${MONGODB_PORT_NUMBER} environment: - MONGO_INITDB_ROOT_USERNAME - MONGO_INITDB_ROOT_PASSWORD - MONGODB_PORT_NUMBER - MONGODB_ENABLE_JOURNAL - MONGODB_INITDB_DATABASE volumes: nodebb-docker: mongo-nodebb:
Then problem I am facing is that when using
docker compose up -d
The nodebb container keeps restarting and when looking on that container logs with
docker logs --tail 50 --follow --timestamps $nodebbContainer
I get this errors stack:
2023-06-21T15:34:19.014965127Z 2023-06-21T15:34:19.012Z [24] - info: Launching web installer on port 4567 2023-06-21T15:34:19.651341251Z 2023-06-21T15:34:19.642Z [24] - error: Error: Unknown system error -122: Unknown system error -122, copyfile '/usr/src/app/node_modules/bootstrap/dist/css/bootstrap.min.css' -> '/usr/src/app/public/bootstrap.min.css' 2023-06-21T15:34:20.118998933Z 2023-06-21T15:34:20.099Z [24] - error: Unable to compile SASS: 2023-06-21T15:34:20.119040369Z Error: Unknown system error -122: Unknown system error -122, open '/usr/src/app/public/installer.css'
I have already used this compose file on my homelab and ran without uses
domain is 127.0.0.1
on problematic server nodebb is 3.1.6 and mongodb is 5.0
on homelab nodebb is 3.1.6 and mongodb is 4.4 -
That error message, points to the below code.
async function compileSass() { try { const installSrc = path.join(__dirname, '../public/scss/install.scss'); const style = await fs.promises.readFile(installSrc); const scssOutput = sass.compileString(String(style), { loadPaths: [ path.join(__dirname, '../public/scss'), ], }); await fs.promises.writeFile(path.join(__dirname, '../public/installer.css'), scssOutput.css.toString()); } catch (err) { winston.error(`Unable to compile SASS: \n${err.stack}`); throw err; } }
Seems like it is having problems loading the file from
public/scss/install.scss
is the file there and readable? -
Hello, thanks for answering. I am not sure as how to respond to you. I am using the docker compose and that error happens as soon as i start the container. I am using the 3.1.6 version and have not touched anything inside the container apart of the configuration on the compose.yml file. How can i check that?
-
I am lost. I have another compose.yml on another folder for openproject and when one is running the other (nodebb) starts to fail. I had to run docker system prune -a when both of those composers where down and now i can start nodebb, any suggestion on where to look for info about that problem? I believe that both nodebb and openproject run nodejs. The error on the openproject containers is chown disk quota exceeded. I know nodebb is not related to openprojects but I thought that someone could point me on the right direction about the inconvenience when running both composer files and containers
-
I finally solved the problem, is not related to neither docker, nodebb nor openproject. It was a quota for a "virtual server" on virtualmin. After resetting that specific quota the problem seems to go away! I will mark this thread as solved
-
-
So for anyone wondering
SOLUTION: Finally after searching and looking on my server configurations I saw that a virtualhost on virtualmin was 0.33 GB over its 1GB quota. I did not think that the issue was related but after changing that Quota and restarting the container the problem seems to go away. So for other people facing a similar problem check for you user Quotas and usage even if it seems unrelated