Redmine. Puma::HttpParserError: Invalid HTTP format, parsing fails

34 Views Asked by At

I encountered this problem in Redmine 5.1.1 Redmine 5.1.1 (docker)

Environment:
  Redmine version                5.1.1.stable
  Ruby version                   3.2.3-p157 (2024-01-18) [x86_64-linux]
  Rails version                  6.1.7.6
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Tw-style (includes JavaScript)
SCM:
  Subversion                     1.14.2
  Mercurial                      6.3.2
  Bazaar                         3.3.2
  Git                            2.39.2
  Filesystem                     
  Gitlab                         4.14.0
Redmine plugins:
  redmine_agile                  1.6.6
  redmine_checklists             3.1.22
  redmine_gitlab_adapter         0.2.0
  redmine_hourglass              1.3.0-dev
  redmine_resources              2.0.0
  redmine_wysiwyg_editor         0.32.0
  redmineup_tags                 2.0.13

I have a php script (PHP 8.2, via Redmine RestAPI) that closes tasks in Redmine based on a certain status and tracker. After updating Redmine to v. 5.1.1 (old. v. 4.1.5) when I run this script I get an error:

2024-02-27T08:13:14.382534085Z 2024-02-27 10:13:14 +0200 HTTP parse error, malformed request ("GET /issues.json" - (-)): #<Puma::HttpParserError: Invalid HTTP format, parsing fails. Are you trying to open an SSL connection to a non-SSL Puma?>
2024-02-27T08:13:14.384183564Z 2024-02-27 10:13:14 +0200 HTTP parse error, malformed request ("GET /issues.json" - (-)): #<Puma::HttpParserError: Invalid HTTP format, parsing fails. Are you trying to open an SSL connection to a non-SSL Puma?>
2024-02-27T08:13:14.385722548Z 2024-02-27 10:13:14 +0200 HTTP parse error, malformed request ("GET /issues.json" - (-)): #<Puma::HttpParserError: Invalid HTTP format, parsing fails. Are you trying to open an SSL connection to a non-SSL Puma?>
2024-02-27T08:13:14.387330008Z 2024-02-27 10:13:14 +0200 HTTP parse error, malformed request ("GET /issues.json" - (-)): #<Puma::HttpParserError: Invalid HTTP format, parsing fails. Are you trying to open an SSL connection to a non-SSL Puma?>

I'm using nginx reverse proxy on another server to use Redmine over https. The previous version of Redmine 4.1.5 (without Puma) worked perfectly when running my on php script. Tell me what I should fix in the configuration to eliminate this error. Thank you in advance.

changed the php script configuration from https to http.

1

There are 1 best solutions below

0
aseques On

There was recently a change in the issues API endpoint to make it more consistent, if you are expecting stuff like "status=" (without any value) it might be broken. See the related ticket here

To start you should try with 5.1.2 where they improved the behavior of this endpoint so you can check if the issue is on puma side.