Project

General

Profile

Redmine 4.1.0 installation works, but fails to upload attachments and delete comments, when launched from domain name, instead of IP

Added by Tadeusz Malinowski over 4 years ago

Hello,

I'm looking for some help, because I'm stuck, I'm out of ideas...

I've got an installation of Redmine 4.1.0.

It works flawlessly when calling it directly from an IP address. I can upload attachments and delete comments. This server is configured as HTTP on port 80, with Apache+Passenger on CentOS.

I've connected a domain name, with HTTPS and there also everything works, but beside two things:

1. I'm unable to delete comments. I can add new ones, but cannot delete anything.

In Chrome console I see only a message:

PUT https://example.com/journals/23439?journal%5Bnotes%5D= net::ERR_CONNECTION_RESET
S.ajax @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24
S.handleRemote @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24
(anonymous) @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24

There is completely no error messages in production.log and in error_log and redmine error log from Apache.

2. I'm unable to upload any attachments.

When trying to do so in ticket - just nothing is happening (if I'm updating ticket also with some comment - only comment content is visible, but files were not uploaded).

The only track I can see is in production.log (no visible error message in Redmine UI):

Started PATCH "/issues/4024" for xxx.xxx.xxx.xxx at 2020-01-02 21:01:58 +0100
Processing by IssuesController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"censored", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "project_id"=>"31", "tracker_id"=>"13", "subject"=>"censored", "description"=>"censored", "status_id"=>"1", "priority_id"=>"4", "assigned_to_id"=>"583", "category_id"=>"23", "fixed_version_id"=>"", "parent_issue_id"=>"", "start_date"=>"2019-12-31", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"1"=>"", "11"=>"", "12"=>"", "14"=>"censored", "15"=>"281570", "16"=>"1", "18"=>""}, "notes"=>"", "private_notes"=>"0", "lock_version"=>"33"}, "was_default_status"=>"1", "attachments"=>{"1"=>{"filename"=>"clock.jpg", "description"=>"", "token"=>""}}, "last_journal_id"=>"23439", "commit"=>"Send", "id"=>"4024"}
  Current user: censored (id=744)
Redirected to https://example.com/issues/4024
Completed 302 Found in 55ms (ActiveRecord: 14.7ms)
Started GET "/issues/4024" for xxx.xxx.xxx.xxx at 2020-01-02 21:01:58 +0100
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"4024"}
  Current user: censored (id=744)
  Rendering issues/show.html.erb within layouts/base
  Rendered issues/_action_menu.html.erb (2.1ms)
  Rendered attachments/_links.html.erb (4.1ms)
  Rendered issue_relations/_form.html.erb (0.9ms)
  Rendered issues/_relations.html.erb (1.4ms)
  Rendered issues/tabs/_history.html.erb (11.6ms)
  Rendered common/_tabs.html.erb (12.2ms)
  Rendered issues/_action_menu.html.erb (1.4ms)
  Rendered issues/_trackers_description.html.erb (0.4ms)
  Rendered issues/_form_custom_fields.html.erb (6.2ms)
  Rendered issues/_attributes.html.erb (23.6ms)
  Rendered issues/_form.html.erb (36.0ms)
  Rendered attachments/_form.html.erb (1.2ms)
  Rendered issues/_edit.html.erb (39.6ms)
  Rendered issues/_action_menu_edit.html.erb (41.3ms)
  Rendered issues/_sidebar.html.erb (1.3ms)
  Rendered watchers/_watchers.html.erb (2.2ms)
  Rendered issues/show.html.erb within layouts/base (83.6ms)
Completed 200 OK in 120ms (Views: 84.4ms | ActiveRecord: 20.1ms)

When I'm trying to do so from Files module, there is only an error message File is invalid. Nothing is stored on server side and in production.log i can see:

Started POST "/projects/censored/files" for xxx.xxx.xxx.xxx at 2020-01-02 21:07:21 +0100
Processing by FilesController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"censored", "version_id"=>"67", "attachments"=>{"1"=>{"filename"=>"clock.jpg", "description"=>"", "token"=>""}}, "commit"=>"Add", "project_id"=>"censored"}
  Current user: censored (id=744)
  Rendering files/new.html.erb within layouts/base
  Rendered attachments/_form.html.erb (1.3ms)
  Rendered files/new.html.erb within layouts/base (3.8ms)
Completed 200 OK in 29ms (Views: 16.5ms | ActiveRecord: 6.6ms)

Please help to track down the root cause of such weird issue. I feel, that maybe there is something wrong with redirections? I've tried to add ProxyPass to apache config, but (with rebooting apache and clearing tmp cache) that didn't help either.

Rights to save files are correct, anyway if they would be wrong - I would be unable to save files even calling Redmine installation from an IP address.

I feel that both - failures of comments deleting and files uploading have got the same root cause... But in other hand - why all other functionalities of Redmine are working correctly then? Why only deleting comments and uploading files give issues? Maybe this is a bug?

Please help to track this down.