jfqd / redmine_helpdesk

Lightweight helpdesk plugin for redmine.
MIT License
192 stars 102 forks source link

Running redmine in docker getting ssl error, any ideas what might be the issue? #164

Closed rafaelteb closed 2 years ago

rafaelteb commented 3 years ago

Hi there! I would appreciate any sort of help a lot ;) Not getting much further with installing this nice redmine plugin.

Here are the two problems:

  1. SSL issues
  2. No mailbox error

1. SSL issues When I turn of ssl with some dirty script, the plugin is sort of working (but still getting errors). Here is the script, located in /usr/src/redmine/config/initializers/bypass_ssl_verification_for_open_uri.rb:

require 'openssl'
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

Any ideas? I allready connect with openssl s_client -connect to my email provider, it says it connects:

CONNECTED(00000003)

I also tried adding it to .bash_profile with exort SSL_FILE=/user/../../cacert.epm (did not work)

Here is info about my current system:

RAILS_ENV=production rake about

About your application's environment
Rails version             5.2.4.2
Ruby version              2.6.6-p146 (x86_64-linux)
RubyGems version          3.0.3
Rack version              2.2.3
Middleware                Rack::ContentLength, Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::Callbacks, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper, RequestStore::Middleware, Module
Application root          /usr/src/redmine
Environment               production
Database adapter          mysql2
Database schema version   20180923091603

2. No mailbox error Like I said, the plugin is sort of working: It gets me 1 email (and 1 only, not the rest thats in the remote mailbox) and shows a lot of error messages:

root@58ef1682cf62:/usr/src/redmine# rake redmine:email:receive_imap RAILS_ENV="production" host=xxx.xxxx.com port=993 username=xxxx@xxxx.com password=xxxx ssl=true project=testproject folder=INBOX move_on_success=processed move_on_failure=failed no_permission_check=1 unknown_user=accept --trace
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
W, [2021-03-30T13:19:40.473259 #659]  WARN -- : Creating scope :system. Overwriting existing method Enumeration.system.
/usr/src/redmine/config/initializers/bypass_ssl_verification_for_open_uri.rb:2: warning: already initialized constant OpenSSL::SSL::VERIFY_PEER
** Execute redmine:email:receive_imap
W, [2021-03-30T13:19:41.709025 #659]  WARN -- : Creating scope :sorted. Overwriting existing method Group.sorted.
W, [2021-03-30T13:19:41.732305 #659]  WARN -- : Creating scope :sorted. Overwriting existing method User.sorted.
I, [2021-03-30T13:19:42.304152 #659]  INFO -- : MailHandler: issue #5 created by Anonymous
E, [2021-03-30T13:19:42.347518 #659] ERROR -- : MailHandler: an unexpected error occurred when receiving email: undefined method `value' for nil:NilClass
rake aborted!
Net::IMAP::NoResponseError:  Mailbox doesn't exist: failed (0.001 + 0.029 + 0.028 secs).
/usr/local/lib/ruby/2.6.0/net/imap.rb:1219:in `get_tagged_response'
/usr/local/lib/ruby/2.6.0/net/imap.rb:1273:in `block in send_command'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/lib/ruby/2.6.0/net/imap.rb:1255:in `send_command'
/usr/local/lib/ruby/2.6.0/net/imap.rb:1459:in `copy_internal'
/usr/local/lib/ruby/2.6.0/net/imap.rb:859:in `uid_copy'
/usr/src/redmine/lib/redmine/imap.rb:49:in `block in check'
/usr/src/redmine/lib/redmine/imap.rb:36:in `each'
/usr/src/redmine/lib/redmine/imap.rb:36:in `check'
/usr/src/redmine/lib/tasks/email.rake:121:in `block (4 levels) in <top (required)>'
/usr/src/redmine/app/models/mailer.rb:612:in `with_synched_deliveries'
/usr/src/redmine/lib/tasks/email.rake:120:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-13.0.3/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<main>'
Tasks: TOP => redmine:email:receive_imap

I guess I have to add a mailbox somewhere, I tried adding folder INBOX to the root of the app, but that did not help.

Any help would be very much appreceated!

Best regards

rafaelteb commented 3 years ago

Ok my bad. Mailserver had issues. Got another wierd error now though:

 ERROR -- : MailHandler: an unexpected error occurred when receiving email: undefined method `value' for nil:NilClass
rake aborted!
Net::IMAP::NoResponseError:  No folder failed (Failure)

Any idea what that is about? Also appeared here 5 years ago ;) : https://www.redmine.org/issues/13485

jfqd commented 2 years ago

You should follow the readme to get a working installation.