【问题标题】:Ruby - Redmine 3.0.3红宝石 - Redmine 3.0.3
【发布时间】:2017-05-04 22:39:21
【问题描述】:

我的 redmine 工作正常。但是,电子邮件通知不起作用。

我正在使用:

Environment:
Redmine version 3.0.3.stable
Ruby version 2.2.2-p95 (2015-04-13) [x86_64-linux]
Rails version 4.2.1
Environment production
Database adapter Mysql2
SCM:
Filesystem
Redmine plugins:
no plugin installed

configuration.yml:

default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
    address: "smtp.bsservices.com.br"
    port: 587
    domain: "smtp.bsservices.com.br"
    authentication: :login
    user_name: '<user>@bsservices.com.br'
    password: '<password>'
    openssl_verify_mode: 'none'

错误:

(权限被拒绝 - “smtp.bsservices.com.br”端口 587 的连接(2))

错误 2:

App 6529 标准错误:保存附件“/var/www/redmine/files/2016/12/161223114939_app_creator.PNG”(79469 字节) 应用程序 6529 标准错误:在 18 毫秒内完成 500 内部服务器错误(ActiveRecord:2.5 毫秒) 应用 6529 标准错误: 应用程序 6529 标准错误:Errno::EACCES(权限被拒绝 @ rb_sysopen - /var/www/redmine/files/2016/12/161223114939_app_creator.PNG): 应用程序 6529 标准错误:app/models/attachment.rb:109:in initialize' App 6529 stderr: app/models/attachment.rb:109:inopen' 应用 6529 标准错误:app/models/attachment.rb:109:in files_to_final_location' App 6529 stderr: app/controllers/attachments_controller.rb:90:inupload'

我已经授予文件夹的所有权限 (777)。

有什么帮助吗?

【问题讨论】:

  • (1) 您发布的 YAML 语法无效。请编辑您的问题并确保缩进与原始文件中的缩进完全相同。 (2) YAML 文件中配置的主机名与错误消息中的主机名不匹配。您实际使用的是哪一个?
  • 霍尔格...我的错。我修正了描述。

标签: ruby email redmine


【解决方案1】:

问题的根本原因是 Redmine 无法连接到邮件服务器以实际发送邮件。这可能是多种原因之一:

  • 可能是您在操作系统上启用了 SELinux,但尚未授予 Redmine 连接到 smtp 服务器的权限。您可以尝试禁用 SELinux 来验证这一理论。
  • 可能是您的服务器只能通过 IPv6 访问,因此无法使用其 IPv4 地址访问 smtp 服务器。
  • 可能有防病毒或防火墙阻止 Redmine 访问 smtp 服务器

【讨论】:

  • 霍尔格。首先感谢您的提示。但是,我寻找这种情况:我尝试禁用 SELinux 并且错误继续。机器中没有防火墙或防病毒软件,服务器具有 IPV4 地址。我认为这可能是 SELinux 中的一些 ruby​​ 权限。即使禁用了 SELinux,我也必须运行 sudo chcon -R -h -t httpd_sys_content_t / path-to-your-app 以便进程可以写入 /var/www/redmine /。 (对不起英语)
  • App 5821 stderr: /bin/bash: /home/www-data/.bash_profile: Permission denied App 5821 stdout: App 5821 stderr: /usr/local/lib/ruby/gems/2.2.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot" App 5821 stderr: Rails Error: Unable to access log file. Please ensure that /var/www/redmine/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /var/www/redmine/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
猜你喜欢
  • 2019-08-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-09-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多