Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: daemon dies unexpectedly - Error: read ECONNRESET #3398

Closed
unplugged216 opened this issue Sep 2, 2024 · 6 comments
Closed

bug: daemon dies unexpectedly - Error: read ECONNRESET #3398

unplugged216 opened this issue Sep 2, 2024 · 6 comments

Comments

@unplugged216
Copy link

unplugged216 commented Sep 2, 2024

Describe the bug

While running Haraka in daemon mode, after some time, hours, the daemon dies with a very short message.

Expected behavior

The expected behavior would be to not die... However, more clearly would be to log the issue and move along as in a daemon environment no human eyes are babysitting it to ensure it does stop.

Observed behavior

While the daemon is running, the daemon will die and post to the log the following output.

[CRIT] [-] [core] Error: read ECONNRESET
[CRIT] [-] [core]     at TCP.onStreamRead (node:internal/stream_base_commons:218:20)
[NOTICE] [-] [core] Shutting down
[NOTICE] [-] [core] Shutting down

Steps To Reproduce

Frankly, I enabled demonize in smtp.ini and ran it. I let it run over night and sometime in the evening it dies. This happens during the day as well. So far, every 6 hours or so.

System Info

Haraka | Haraka.js — Version: 3.0.4
 --- | :--- 
Node | v20.17.0
OS | Linux haraka 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
openssl | OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

Additional context

I would not be trying to run this as a daemon indefinitely if I could get the service to work. There is a whole lot of documentation missing from hark.service to drop it in and go lol. I am trying to work through it but omg this one is rough. Im likely missing something obvious but yeah.

@unplugged216 unplugged216 changed the title bug: daemon dies unexpectedly bug: daemon dies unexpectedly - Error: read ECONNRESET Sep 2, 2024
@msimerson
Copy link
Member

In smtp.ini, make sure to set nodes > 1, so that Haraka has a supervisory process that restarts workers after a crash / failure:

nodes=2

@unplugged216
Copy link
Author

Ah!

I'll give that a whack. Did I miss that in the documentation?

@unplugged216
Copy link
Author

In smtp.ini, make sure to set nodes > 1, so that Haraka has a supervisory process that restarts workers after a crash / failure:

nodes=2

Well,

that certainly made the logs barf out a ton of grit messages and then shut down lol. Troubleshooting that now.

@unplugged216
Copy link
Author

In smtp.ini, make sure to set nodes > 1, so that Haraka has a supervisory process that restarts workers after a crash / failure:

nodes=2

Well,

that certainly made the logs barf out a ton of grit messages and then shut down lol. Troubleshooting that now.

Ok, up and running. I keep forgetting with the daemon you have to remove the PID file. Maybe I'll write a wrapper to handle this.

Anyway, it's running, I'll report back what happens. Thank you for pointing me in this direction!

@msimerson
Copy link
Member

Did I miss that in the documentation?

I added a note in smtp.ini pointing to https://github.com/haraka/Haraka/wiki/Performance-Tuning, where this is documented.

Thank you for pointing me in this direction!

You're welcome.

@unplugged216
Copy link
Author

Did I miss that in the documentation?

I added a note in smtp.ini pointing to https://github.com/haraka/Haraka/wiki/Performance-Tuning, where this is documented.

Thank you for pointing me in this direction!

You're welcome.

Hello,

This did not solve the issue. Same exact error and notes in the log. Still monitoring to see if we can find out what's up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants