question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker implementation fails when /enigma-bbs/art is mounted to an external folder

See original GitHub issue

Describe the Bug this bug happens to me while configuring and running enigma for the first time. while using docker set-up instructions as documented in this project and with the image directly from dockerhub. combining with my own changes (partly in order to fix the documentation which currently lacks db persistency)

To Reproduce steps

docker run --rm -it \
-v "{HOME}/enigma-bbs/config:/enigma-bbs/config" \
-v "{HOME}/enigma-bbs/db:/enigma-bbs/db" \
-v "{HOME}/enigma-bbs/logs:/enigma-bbs/logs" \
-v "{HOME}/enigma-bbs/filebase:/enigma-bbs/filebase" \
-v "{HOME}/enigma-bbs/art:/enigma-bbs/art" \
enigmabbs/enigma-bbs:latest \
oputil.js config new

configure your board and now start it (due to --rm - was used to make sure no residue is left - along with prune before every test)

docker run --rm -d -p 8888:8888 \
-v "/share/Container/enigma-bbs/config:/enigma-bbs/config" \
-v "/share/Container/enigma-bbs/db:/enigma-bbs/db" \
-v "/share/Container/enigma-bbs/logs:/enigma-bbs/logs" \
-v "/share/Container/enigma-bbs/filebase:/enigma-bbs/filebase" \
-v "/share/Container/enigma-bbs/art:/enigma-bbs/art" \
enigmabbs/enigma-bbs:latest

Expected Behavior bbs should accept connections in 8080

Actual Behavior

bbs is unable to serve connections due to missing files in art folder (see environment section)

Screenshots error message

{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"nodeId":1,"sessionId":"vnUpYvxbzbn","level":30,"remoteAddress":"::ffff:10.100.102.58","serverName":"Telnet","isSecure":false,"msg":"Client connected","time":"2022-01-24T22:00:06.500Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"nodeId":1,"sessionId":"vnUpYvxbzbn","level":50,"err":{"message":"Object does not exist: No menu entry for \"telnetConnected\"","name":"EnigError","stack":"EnigError: Object does not exist: No menu entry for \"telnetConnected\"\n    at Object.DoesNotExist (/enigma-bbs/core/enig_error.js:31:52)\n    at locateMenuConfig (/enigma-bbs/core/menu_util.js:32:40)\n    at nextTask (/enigma-bbs/node_modules/async/dist/async.js:4576:27)\n    at Object.waterfall (/enigma-bbs/node_modules/async/dist/async.js:4587:9)\n    at Object.awaitable [as waterfall] (/enigma-bbs/node_modules/async/dist/async.js:208:32)\n    at getMenuConfig (/enigma-bbs/core/menu_util.js:24:11)\n    at getMenuConfiguration (/enigma-bbs/core/menu_util.js:60:17)\n    at nextTask (/enigma-bbs/node_modules/async/dist/async.js:4576:27)\n    at Object.waterfall (/enigma-bbs/node_modules/async/dist/async.js:4587:9)\n    at Object.awaitable [as waterfall] (/enigma-bbs/node_modules/async/dist/async.js:208:32)","code":-33002},"msg":"Object does not exist: No menu entry for \"telnetConnected\"","time":"2022-01-24T22:00:07.165Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"level":40,"error":"write after end","msg":"Failed writing to socket","time":"2022-01-24T22:00:07.170Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"level":40,"error":"Cannot call write after a stream was destroyed","msg":"Failed writing to socket","time":"2022-01-24T22:00:07.171Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"level":40,"error":"Cannot call write after a stream was destroyed","msg":"Failed writing to socket","time":"2022-01-24T22:00:07.171Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"level":30,"connectionCount":0,"nodeId":1,"msg":"Client disconnected","time":"2022-01-24T22:00:07.173Z","v":0}
{"name":"ENiGMA½ BBS","hostname":"23814a6ec4dd","pid":19,"level":40,"modInfo":{"name":"Telnet","desc":"Telnet Server v2","author":"NuSkooler","isSecure":false,"packageName":"codes.l33t.enigma.telnet.server.v2"},"error":"write after end","msg":"Client socket error","time":"2022-01-24T22:00:07.174Z","v":0}

Environment dockerfile - latest from master noticed difference in file structure - when building with external art volume tree is :

art:
total 16
drwxr-xr-x 7 admin administrators 4096 2022-01-24 23:59 ../
drwxr-xr-x 2 admin administrators 4096 2022-01-24 23:59 themes/
drwxr-xr-x 2 admin administrators 4096 2022-01-24 23:59 general/
drwxr-xr-x 4 admin administrators 4096 2022-01-24 23:59 ./

art/themes:
total 8
drwxr-xr-x 4 admin administrators 4096 2022-01-24 23:59 ../
drwxr-xr-x 2 admin administrators 4096 2022-01-24 23:59 ./

art/general:
total 8
drwxr-xr-x 4 admin administrators 4096 2022-01-24 23:59 ../
drwxr-xr-x 2 admin administrators 4096 2022-01-24 23:59 ./

however when it stays as an internal volume you can find missing additional ANSI files etc’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
davestephenscommented, Jan 25, 2022

Expanding the json logging so it’s nicely formatted will help you:

{
    "name": "ENiGMA½ BBS",
    "hostname": "23814a6ec4dd",
    "pid": 19,
    "nodeId": 1,
    "sessionId": "vnUpYvxbzbn",
    "level": 50,
    "err": {
        "message": "Object does not exist: No menu entry for \"telnetConnected\"",
        "name": "EnigError",
        "stack": "EnigError: Object does not exist: No menu entry for \"telnetConnected\"\n    
                    at Object.DoesNotExist (/enigma-bbs/core/enig_error.js:31:52)\n    
                    at locateMenuConfig (/enigma-bbs/core/menu_util.js:32:40)\n    
                    at nextTask (/enigma-bbs/node_modules/async/dist/async.js:4576:27)\n    
                    at Object.waterfall (/enigma-bbs/node_modules/async/dist/async.js:4587:9)\n    
                    at Object.awaitable [as waterfall] (/enigma-bbs/node_modules/async/dist/async.js:208:32)\n    
                    at getMenuConfig (/enigma-bbs/core/menu_util.js:24:11)\n    
                    at getMenuConfiguration (/enigma-bbs/core/menu_util.js:60:17)\n    
                    at nextTask (/enigma-bbs/node_modules/async/dist/async.js:4576:27)\n    
                    at Object.waterfall (/enigma-bbs/node_modules/async/dist/async.js:4587:9)\n    
                    at Object.awaitable [as waterfall] (/enigma-bbs/node_modules/async/dist/async.js:208:32)",
        "code": -33002
    },
    "msg": "Object does not exist: No menu entry for \"telnetConnected\"",
    "time": "2022-01-24T22:00:07.165Z",
    "v": 0
}

tl;dr; this doesn’t look related to the art volume, it looks like you’ve messed up your menus (they live in the config mount).

WRT to the “db isn’t persisted” comment; the quick start docs are exactly that - just a quick start to get ENiGMA running Dockerised. Not the full detail on what to copy where, what you need in the volumes etc. There’s obviously a lot more to running ENiGMA via Docker - PRs always welcomed to beef docs 😃

1reaction
abutbulcommented, Jan 24, 2022

I think I may have enough to try and find the problematic code myself but just putting it here in case any one has a quick fix for this from previous experience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bind mounts - Docker Documentation
Bind mounts have limited functionality compared to volumes. When you use a bind mount, a file or directory on the host machine is...
Read more >
docker - How to mount a single file in a volume - Stack Overflow
With the mounted volume, I see that upload gets created. But then it fails with: /var/www/html/config.php\" caused \"not a directory\"" ...
Read more >
Use kaniko to build Docker images - GitLab Documentation
kaniko is a tool to build container images from a Dockerfile, inside a container or ... If you receive this error, it might...
Read more >
Understanding Docker Volumes - Earthly Blog
The purpose of using Docker volumes is to persist data outside the ... Unlike bind mount, where you can mount any directory from...
Read more >
Running Docker Commands - CircleCI
Mounting folders. It is not possible to mount a volume from your job space into a container in Remote Docker (and vice versa)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found