Added by Oliver Jakobi over 8 years ago
On a fresh install with email configured, openproject fails to send emails with error Message
Invalid :protocol option: ""
From my production log, I found
F, [2016-09-28T14:27:31.676129 #21788] FATAL -- : ArgumentError (Invalid :protocol option: ""): app/mailers/user_mailer.rb:232:in `message_posted' app/models/message_observer.rb:37:in `block in after_create' app/models/message_observer.rb:36:in `each' app/models/message_observer.rb:36:in `after_create' app/controllers/messages_controller.rb:82:in `create' app/middleware/reset_current_user.rb:47:in `call' app/middleware/params_parser_with_exclusion.rb:40:in `call'
The mentioned line of code reads:
@message_url = topic_url(@message.root, r: @message.id, anchor: "message-#{@message.id}")
Since this error occurs on versions 5 and 6, I hardly believe this to be a bug.
Did I miss anything configuration-wise?
Best,
Oliver
Replies (4)
Solved!
Sending the Message failed, because the hostname in “System Settings” -> “General” was not set.
Adding the IP/fqdn did the trick.
Hi Oliver,
we’ve seen this issue a few times before, and it appears to be failing to set the hostname from the packager installation. Did you use the
Apache installation
step of the packager wizard,or did you skip it?
In the latter case, I suspect that a hostname will not be automatically set (because it does not know the actual value), and cause these type of errors.
Best,
Oliver
Hi Oliver,
I installed OpenProject behind Nginx, so the
Apache installation
was skipped.For these cases, if OpenProject is installed behind a webserver other than Apache, wouldn’t it be more convenient to let the installer ask for the hostname?
Best,
Oliver
Hi Oliver,
yes, exactly that. I’ll create a ticket.
Thanks for your quick reply.
Best,
Oliver