Giter VIP home page Giter VIP logo

Comments (5)

shumvgolove avatar shumvgolove commented on July 30, 2024 1

Hey @samsapti

Yeah, you're right. Since docker logs is the proper way to log (duh) output of containers, I'll remove the redirection to the file in the entrypoint. Thanks for investigating.

from simplexmq.

shumvgolove avatar shumvgolove commented on July 30, 2024

Please specify exact steps to reproduce the issue.

from simplexmq.

mrg358 avatar mrg358 commented on July 30, 2024

Sure. I tried to reproduce again fresh. Same results.

Step 1.

docker run -d -e addr="smp1.example.net" -p 5223:5223 -v $HOME/simplex/config:/etc/opt/simplex:z -v $HOME/simplex/logs:/var/opt/simplex:z --name simplexmq simplexchat/simplexmq
--name simplexmq simplexchat/simplexmq
0aa8c59aac27456c14bbd5f24c80e8ab667306f0779dfbc1d24a3aabcdef455b

Step 2.

docker logs -f simplexmq
Signature ok
subject=CN = smp1.example.net
Getting CA Private Key
Server initialized, you can modify configuration in /etc/opt/simplex/smp-server.ini.
Run `smp-server start` to start server.
----------
You should store CA private key securely and delete it from the server.
If server TLS credential is compromised this key can be used to sign a new one, keeping the same server identity and established connections.
CA private key location:
/etc/opt/simplex/ca.key
----------
SMP server v4.3.1
Fingerprint: IJzSOqjnrF-dsybOHO0DVSRY3oXq5abFZ3M347htB5g=
Server address: smp://[email protected]

fresh start with newly created volumes looks ok.

Step 3.

docker stop simplexmq && docker rm simplexmq

Step 4.

docker run -d -e addr="smp1.example.net" -p 5223:5223 -v $HOME/simplex/config:/etc/opt/simplex:z -v $HOME/simplex/logs:/var/opt/simplex:z --name simplexmq simplexchat/simplexmq
--name simplexmq simplexchat/simplexmq
31c5d07de2b307ac011b1c9ab5f473194b0e6cb17ac486e06e51440e546e837a

Step 5.

docker logs -f simplexmq
 

docker logs empty, no status.

Step 6.

sudo tail -f /home/ubuntu/simplex/logs/smp-server.log
SMP server v4.3.1
Fingerprint: IJzSOqjnrF-dsybOHO0DVSRY3oXq5abFZ3M347htB5g=
Server address: smp://[email protected]
Store log: /var/opt/simplex/smp-server-store.log
Listening on port 5223 (TLS)...
not expiring inactive clients
creating new queues allowed
[INFO 2023-02-16 14:00:45 +0000 src/Simplex/Messaging/Server.hs:739] restoring messages from file /var/opt/simplex/smp-server-messages.log
[INFO 2023-02-16 14:00:45 +0000 src/Simplex/Messaging/Server.hs:749] messages restored

i can confirm simplexmq runs and functions ok, but docker fails to output smp-server.log file after container re-creation.

from simplexmq.

samsapti avatar samsapti commented on July 30, 2024

@mrg358 the reason there's no output in docker logs, is probably due to the last line in entrypoint:

exec smp-server start > "$logd"/smp-server.log 2>&1

It redirects all output to smp-serverlog instead of stdout/stderr. Now, the reason it's printed the first time SimpleXMQ is run, is due to line 19 in entrypoint:

smp-server init -y -l "$@"

This is the first time initialization of the SMP server (hence it only outputs info on first run), notice that the output is not redirected to a file, so it prints to stdout/stderr, which is why it's catched by docker logs.

from simplexmq.

shumvgolove avatar shumvgolove commented on July 30, 2024

Should be fixed with 605970f . Please pull recent image from simplexchat/smp-server.

from simplexmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.