Redmine - Unable to save the issue: Unexpected status code - 404

Marian Marcincak, modified 10 Years ago.

Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
Hello.
I have successfully configured the connection to my local Redmine server and I'm able to fully use the "Link Issues" and "Issues by Test Case functionality". However, when I try to create a new issue, I receive an error (see the attached screenshot).

I suspect that the cause could be in my configuration:
Klaros v3.8.2 + Redmine 2.3.3 / Redmine Redmine-Mylyn-Connector/WS-API Plugin 2.8.2.stable.
I'm aware of the fact, that according to the user manual (3.10.2 Redmine Configuration), this combination (with RM 2.3.3) was not tested but it is expected to work. My Redmine settings are set as instructed = Authentication Required + Enable REST Web Service checkbox checked.

The attached logs from Redmine (the section after clicking the Save button) might help.
They show the "Can't verify CSRF token authenticity" warnings when posting.

What is the problem here?
Could you help me, please?
If the current Redmine 2.3.3 is not supported, do you have some plans for this support?
Thank you.
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Marian,

Just to make sure: Is your user authorized to create issues in the project you have configured?

If not: Can you please attach the klaros log (logs/catalina.out as well)?

Regards,

Torsten
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hello Marian,

we did some investigation on this issue and it seems that you are stumbling over something similar to the following issue: https://github.com/danmunn/redmine_dmsf/issues/99.

Does the suggested solution (Adding config.action_controller.allow_forgery_protection = false to config/application.rb) resolve your problem?

Regards,

Torsten
Marian Marcincak, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
Thank you for your help, Torsten.

1) Yes. The user is authorized to create issues in the project (role Manager). The issues can be created directly in Redmine.

2) I have added the "config.action_controller.allow_forgery_protection = false" line to config/application.rb. I do not get the CSRF warning anymore.
However, the issue is still present (see the attached part of the log; compared to the old one, it's the same - just without the CSRF warning). It logs "Filter chain halted as :find_project rendered or redirected".
The Redmine project should be set correctly in Klaros.
Do you have any idea?
Could it be some change in the Redmine's REST API when looking up projects or creating issues?

Marian.
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Marian,

we will try to setup a test environment for this, I know of no changes in the REST API that may cause this.

To me it looks like the project you have specified could not be found and you are being redirected to the find project page.

You already stated otherwise but just to make sure: Did you double-check that the project key you have entered is valid (The 'Validate URL' button does check this)?

Regards,

Torsten
Marian Marcincak, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
Thanks, Torsten.
I have double-checked that the URL and project is valid - see attached screenshots.
(I suppose that otherwise the Link Issues functionality would not work ... and it searches the Redmine issues well.)
Marian
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Marian,

we added a Redmine 2.3.3 instance to our automated test setup and both automated and manual tests succeeded over here.

I suspect there must be something different in your setup or project which is causing this.

We probably should start comparing the setup in detail.

Regards,

Torsten
Marian Marcincak, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
Oh. Sorry if the issue will be on my side. I have tried to prepare a standard configuration.
Here are some details:
- Windows XP SP3
- Klaros v3.8.2
- BitNami Redmine Stack 2.3.3-0
- list of Redmine plugins - see attached ZIP with screenshot (I still suspect the MyLyn connector)
- Redmine project (for testing) - see attached ZIP with screenshots
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Thanks for the details Marian.

We are running Bitnami Redmine 2.3.3-1 under Ubuntu.

The only possibly relevant difference I can detect is the list of additional plugins.

Can you try deactivating the other plugins?
If you are an Eclipse user: Can you try create issues from an Eclipse/Mylyn Setup using the redmine Mylyn plugin?

Hope this helps,

Torsten
Marian Marcincak, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
Hello Torsten.

I had some troubles with removing the plugins, so I have rather cleaned and reinstalled the whole Redmine configuration from scratch (without installing those plugins) -- see the full process below. It works now! The issue was created from Klaros.

I will try to backtrack the Redmine settings so that just 2 possible causes will be left - redmine 2.3.3-0 vs. 2.3.3-1 and those unfortunate plugins (I also do believe that this was the cause).

Btw, I feel that the link to the MyLyn connector from the Klaros documentation (part 1 below) is a bit ambiguous. I've used the direct GitHuB link to stable version (part 2):
1)
http://www.klaros-testmanagement.com/files/doc/html/User-Manual.Installation.IssueManagement.redmine.html
>> 2nd link (for RM v2.x) = http://danmunn.github.io/redmine_mylyn_connector/
>> .ZIP link (upper right) = https://github.com/danmunn/redmine_mylyn_connector/zipball/master
>> downloads "danmunn-redmine_mylyn_connector-d8b1164.zip"
2)
https://github.com/danmunn/redmine_mylyn_connector
>> https://github.com/danmunn/redmine_mylyn_connector/archive/stable-2.8.zip
>> downloads "redmine_mylyn_connector-stable-2.8.zip"

Redmine configuration process:
- (uninstalled previous BitNami redmine 2.3.3-0 stack with plugins)
- installed BitNami redmine 2.3.3-1 stack
- BitNami RM Stack commandline: cd c:\BitNami\redmine-2.3.3-1\apps\redmine\htdocs
- BitNami RM Stack commandline: gem install libxml-ruby
- copied the "redmine_mylyn_connector-stable-2.8.zip" directory and renamed to ""redmine_mylyn_connector"
- BitNami RM Stack commandline: rake redmine:plugins:migrate NAME=redmine_mylyn_connector RAILS_ENV=production
- BitNami RM Stack commandline: bundle install --without development test
- restarted the Redmine stack (Restart All)
- opened Redmine ("admin" user)
- RM: Administration > Settings > checked "Authentication required" + "Enable REST web service"
- RM: Administration > Plugins > confirmed that "Mylyn Connector plugin" is present
- RM: New Project > name = "Project1" + Identifier = "project1" (Public) > Modules = all > Members = added the user "admin" as role "Manager" > Versions = created "1" (Name) + status "closed" > Issue categories = created "Cat1"
- started and opened Klaros ("admin" user)
- Klaros: Configure > Issue Management > project="project1" + URL="http://dev3/redmine" > Validate URL > admin/pwd > The issue management system IM00002 has been successfully validated.
- Klaros: Evaluate > Create issues > Summary="Issue1" > Save > The issue was successfully created in Redmine with ID 1.
Marian Marcincak, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Youngling Posts: 6 Join Date: 9/27/13 Recent Posts
I have backtracked the Redmine project settings (name = "test", version="1.0.0" with status "open", etc.) and it still works.
According to the BitNami changelog for v2.3.3-1, just "Fix SSL support for Subversion on Unix" was added.
So I conclude that my other plugins have causes this issue ... I will check this later if those plugins will be needed to be installed.

Thank you for all your assistance, Torsten.
Marian
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
You're welcome, I am glad to see this resolved.

Thanks for your valuable input and please let us know about the culprit so we may add this to our FAQ.

For the configuration of external tools or plugins we usually just link to the external instructions to not reflect possibly outdated information.

Regards,

Torsten
thumbnail
Torsten Stolpmann, modified 1 Year ago.

RE: Redmine - Unable to save the issue: Unexpected status code - 404

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Quick reminder: As of Klaros version 4.12 the native Redmine API is used and the installation of a Redmine plugin is no longer required.