Open bramhoven opened 1 year ago
Hello! I found a solution for this "bug".
If you're looking into the /var/log/rspamd/rspamd.log file you can see rspamd has to generate some TLDs but this takes way too long. So I updated the resource limits:
resources:
limits:
cpu: 600m
memory: 500Mi
requests:
cpu: 500m
memory: 500Mi
Now its working :)
@marxlnfcs great to hear that! Do you know what the average rspamd usages are, or usages under high load?
@bramhoven I haven't checked the current usage or the usage under high load yet because I'm unable to get Haraka to work. If Haraka is running, I'll stress test rspamd :)
@marxlnfcs what is the issue with Haraka? I eventually got everything up and running after a lot of debugging and testing! Maybe I can help you out
@bramhoven Haraka is unable to connect to wildduck...
Fri, Feb 3 2023 1:31:48 pm | [CRIT] [-] [server] Plugin wildduck timed out on hook init_master - make sure it calls the callback
Fri, Feb 3 2023 1:31:48 pm | [INFO] [-] [server] hook=init_master plugin=wildduck function=init_wildduck_shared params="" retval=DENYSOFT msg="plugin timeout"
Fri, Feb 3 2023 1:31:48 pm | [ERROR] [-] [server] init_master returned error: plugin timeout
Fri, Feb 3 2023 1:31:48 pm | [NOTICE] [-] [core] Shutting down
I edited your chart a bit and added resources like MongoDB, Redis and NGINX for load balancing. I probably forgot to put something somewhere
@marxlnfcs Have you checked wildduck itself? Is it up and running? Else maybe the correct ports or urls
Btw if you think those changes should be in the base chart, feel free to create a PR :)
@bramhoven I checked wildduck already but could not find any issue there. I've also created a ubuntu sidecar container for haraka to test the connection to wildduck. Everything is working :(
I will create a PR if everything is working correctly but I've changed alot... And i mean "alot" :D
@marxlnfcs Did you check mongodb? I think Haraka just connects to mongo and redis
Haha would love to see what you have changed, hopefully I can learn a bit from those changes!
@bramhoven Thats right. I've checked the haraka-plugin-wildduck thats implemented in the image but anything should work. MongoDB is up and running (Tested with mongo-express) and redis too... I've no clue :D
Did you create the databases in mongodb manually? Which did you create?
I'm messing around with helm because thats the first time i'm "manipulating" a chart haha :P
@marxlnfcs I was struggling at first to get a normal "working" MongoDB instance using helm... I could not get that working after trying for weeks. Finally ended up just creating a new deployment myself with a mongodb image.
I have created a root user and logged in using that. I then created the wildduck
, wildduck-webmail
& zone-mta
collections.
Then I added users to each of them so a wildduck
user, a wildduck-webmail
user and a zone-mta
user. The wildduck
user has access to the wildduck
and the zone-mta
collection, since haraka and wildduck use these two collections. And the zone-mta
user can also access both collections.
@bramhoven Thats almost the same as I did...
I tried to use the redis plugin by haraka and filled out all connection info... The plugin runs in a timeout either... So its probably an problem between the connection of haraka and redis...
@bramhoven I found the problem but no solution yet ... There is some DNS problem because if I'm using the hostname of the redis server (wildduck-redis.wildduck.svc.cluster.local) I'm running in a timeout. But If I use the ClusterIP of the redis-server it works...
Strange behavior :D
@marxlnfcs glad to hear you managed to find the problem! That is a strange bug though... I'm not that familiar with kubernetes to know what causes that
@bramhoven I fixed this error too but it seems to be the connection to mongodb... Which version of mongodb did you use?
@bramhoven I'm going to cry... I found the mistake. I named the wildduck config from Haraka "wildduck.yml" and not "wildduck.yaml" :')
@marxlnfcs oh damn... Good find though! I made a lot of those mistakes setting this helm chart up, and it took me quite a while to get everything in working order.
Glad to hear it is working now!
@bramhoven Yes.... I rebuilt the Haraka image and added some debug logs to the Haraka Wildduck plugin. Then I came up with it and now I'm ashamed :D
@marxlnfcs Don't be! Could happen to anyone :D
Would love to hear the results if you get the chance to stress test it!
@bramhoven Thats true :D
I created a repository with my revised chart. Feel free to take a look and if you want I can also do a PR when I'm completely done :)
@bramhoven There are some features like ingress and additionalAccounts, that are not implemented yet :D
@marxlnfcs yeah, im not that familiar with all this stuff yet. If you have other things that are not implemented yet, let me know. I want to create a helm chart that supports any feature wildduck supports
@bramhoven Me neither but thats how I learn it. :)
I would like to have a full-featured helm chart for wildduck!
No reason found yet