I have just recently built relayd on another instance of OPNsense 17.7.8 and have noticed that the relayd configuration file /var/etc/relayd.conf was incorrectly generated which prevents relayd from starting.
opnsense-patch -c plugins cfda7cdName: SMTP
Mode: Manual Failover
Port: 25
Monitor: SMTP
Server IP Address: 10.0.0.1
Name: SMTP
IP Address: 192.168.0.1
Port: 25
Mode: Relay
log updates
timeout 1000
table <SMTP> {
10.0.0.1
}
protocol "tcp" {
tcp { nodelay, socket buffer 65536 }
}
relay "SMTP" {
listen on 192.168.0.1 port 25
protocol "tcp"
forward to <> port
}
log updates
timeout 1000
table <SMTP> {
10.0.0.1
}
redirect "SMTP" {
listen on 192.168.0.1 port 25
forward to <SMTP> port 25 check send "" expect "220 *"
}
log updates
timeout 1000
table <SMTP> {
10.0.0.1
}
protocol "tcp" {
tcp { nodelay, socket buffer 65536 }
}
relay "SMTP" {
listen on 192.168.0.1 port 25
protocol "tcp"
forward to <SMTP> port 25 check send "" expect "220 *"
}
It's true that relayd fails to start in step 5, but it also prompts to apply the configuration after which it seemed to work without doing 7 and 9 ?
BTW, why are you not using the better maintained HAProxy plugin? :)
Cheers,
Franco
Hmm, I could not get it to work after applying the configuration, I applied when prompted so maybe that caused the issue? I will need to check my own steps to replicate.
This is not the first time I have seen this problem, I saw it on my other test box where I found the first problem.
I actually started to use relayd for three reasons:
I can change to HAProxy if recommended.
Sorry when I mean "caused the issue", should I make all the config changes and then apply the configuration rather than apply them every time prompted?
It looks like it did not save correctly for another reason in the form, maybe the configuration wasn't written correctly, but that seems to be a problem of the GUI page, not a problem of the code writing the config file with invalid data. That would explain why I did not see it and saving again from your end helped as well. But what triggered the faulty save in the form is not clear?
I only maintain this because it used to be core functionality and we wanted to remove it there but still keep it around for users. There are no plans to modernise the code or add new features, but all bug reports are still welcome.
I agree on the lean, clean and secure front. It's perfectly viable for use, just want to note that this plugin is not something that will make huge leaps forward anymore without a maintainer who uses it in real world deployments.
For anyone reading this now or in the future: If anybody wants the job, just let me know. :)
Cheers,
Franco
Sorry when I mean "caused the issue", should I make all the config changes and then apply the configuration rather than apply them every time prompted?
It doesn't matter. It probably saves a bit of time to not hit apply until all is done, but that's it. :)
Thanks for the tips.
I think I will stick with relayd as it fits my requirements as HAProxy is way overkill when I just tested it out.
I might have to fire up a few VMs and test a bit more as this was the second time I saw this and the resolution I performed was the same.
@shezzski when you hit this issue, please go to System: Configuration: History and try to diff the last changes made in the virtual server page. It will give hints as to if the settings were written correctly to the config.xml prior to reload.
@shezzski
I have heard that someone is going to rewrite relayd in MVC in 2018, which would make this issue obsolete.
Did this happen again? Should we close?
For reference: #451
Hi @fichtner I have seen this happen again, but have had not time to fully debug, due to the Holiday Season. I am happy for it to be closed due to the pending rewrite of relayd.
@shezzski thanks for the follow-up. @fbrendel will take good care of relayd in the future :)
A new version is on the way #492 :smile: