Failed to execute fisheye hook

78 views
Skip to first unread message

Jérémie Faucher-Goulet

unread,
Mar 30, 2015, 1:00:06 PM3/30/15
to scmma...@googlegroups.com
Hi, I'm trying to setup push notifications to Fisheye from scm-manager (git repositories currently). For this, we've installed the Fisheye plugin.

The only hint I see to explain why it doesn't work is the following line (without any stacktrace) in the scm-manager.log file:

2015-03-30 12:29:59.864 [Hook-1] ERROR de.corux.scm.plugins.fisheye.FisheyeHook - Failed to execute fisheye hook. SCM repository: test-push_notifications, Fisheye repository: Dummy_Test_PushNotifications

scm-manager itself is accessed through a HTTPS url and a self-signed certificate, configured as explained here:

Our Fisheye instance also runs with it's own certificate (same self-signed Root CA). We've added that Root CA to a standard "cacerts" file contained in a regular JRE and modified the /opt/scm-server/bin/scm-server script to add the last 2 arguments shown below:

EXTRA_JVM_ARGUMENTS="-Djava.awt.headless=true -Dlogback.configurationFile=logging.xml -Djavax.net.ssl.trustStore=/opt/scm-server/conf/cacerts -Djavax.net.ssl.trustStorePassword=changeit"

I don't know if the reason the FisheyeHook fails is because of security, but I'm providing these details anyway...

Any idea what's happening? What more I could do to investigate this?

We would really like to get push notifications working towards Fisheye, and avoid polling as we currently do.

Thank You,

Jérémie

Tobias

unread,
Apr 4, 2015, 5:23:31 PM4/4/15
to scmma...@googlegroups.com
Hi,
I'm the author of the fisheye plugin.
Are there any log messages related to https failures? If not, then the fisheye API call was executed, but returned an error code.

Possible return codes are:
- 401: authentication failed
- 404: when the repository doesn't exist
- 409: when the repository is disabled, or not running

Currently the SCM logs contain no information about these failures, so you'll have to double-check your settings.

Best,
Tobias

Jérémie Faucher-Goulet

unread,
Apr 6, 2015, 2:36:09 PM4/6/15
to scmma...@googlegroups.com
Hi Tobias,

Thanks for your help...
I've managed to get Wireshark running on the server where scm-manager is running. You were correct, the HTTPS connection is not to blame here, this is working successfully. Adding the private key to Wireshark, I was able to observe what's happening...

I receive a HTTP 411 "Length Required" response to the POST sent by scm-manager.
From what I see, I believe this is being returned by IIS, which act as a proxy (using the URL Rewrite 2.0 module) between the outside world and the local webserver where Fisheye is running. It seems IIS is complaining about the missing "content-length" in the HTTP header.

Do you know of any way to workaround this behavior in IIS?
If not, where would a fix be needed for this missing header? In scm-manager itself or your plugin?

Or maybe you see an altogether different way to work around this?

Regards,

Jérémie

Tobias

unread,
Apr 6, 2015, 4:29:44 PM4/6/15
to scmma...@googlegroups.com
Hi Jérémie,

apparantly the Content-Length header is required for HTTP/1.0. HTTP/1.1 should not require it. Check https://confluence.atlassian.com/display/JIRAKB/Integrating+JIRA+with+IIS+using+ARR.

Still, scm manager should include the Content-Length header, when talking HTTP/1.0. I created a bug report on bitbucket (https://bitbucket.org/sdorra/scm-manager/issue/701).

Best,
Tobias

Jérémie Faucher-Goulet

unread,
Apr 7, 2015, 9:40:24 AM4/7/15
to scmma...@googlegroups.com
Thank you!

At least I know where we stand now... We'll have to wait and see what happens with issue 701. Until then we kind are out of luck. I assume this is all external to your plugin so shouldn't require any change on your part?

Jérémie

Tobias

unread,
Apr 7, 2015, 4:13:38 PM4/7/15
to scmma...@googlegroups.com
The fix should be done in scm manager. This is the proper way, IMO.
For you to test, I modified the plugin so it sends the Content-Length header. Please try, if this solves your issue.

Best,
Tobias
scm-fisheye-plugin-1.1-SNAPSHOT.jar

Tobias

unread,
Apr 8, 2015, 2:33:35 AM4/8/15
to scmma...@googlegroups.com
Sorry, attached the wrong file. Here is the correct file, which you can install through the scm web interface.
scm-fisheye-plugin-1.1-SNAPSHOT.scmp

Jérémie Faucher-Goulet

unread,
Apr 8, 2015, 9:50:03 AM4/8/15
to scmma...@googlegroups.com
Hi Tobias, I cannot install via the web interface. I get the following error:

I don't know if this is related, but I get a "fake path" when selecting the file on my hard drive:

By the way, I'm currently using version 1.40 of scm-manager... Perhaps the installation via web interface wasn't supported then?

I will try a manual installation via filesystem, see if it takes.

Thank you,

Jérémie

Jérémie Faucher-Goulet

unread,
Apr 8, 2015, 1:21:06 PM4/8/15
to scmma...@googlegroups.com
I think I've managed the "manual installation" OK since it shows the correct version, "1.1-SNAPSHOT" when I look at the plugin page in the web interface.
All I had to do was to put the files contained within the ".scmp" file in the proper location and edit the "classpath.xml" file to point to the new jar file. Am I correct?

In any case, since it was showing the proper version in the UI I assume I did the correct thing. And the result are not different... I still see in Wireshark a HTTP 411 response. The post doesn't contain the Content-Length header.

Jérémie

Tobias

unread,
Apr 9, 2015, 5:10:44 PM4/9/15
to scmma...@googlegroups.com
You're right, the Content-Length was not sent. Now it should send "Content-Length: 2" with a carriage-return as body. Previously, I added the header manually, but it got ignored.
After digging into the scm and java source code, it seems, that the Content-Length is not sent, when no POST parameters are specified.
I guess, this is a special case for the fecru API v1, as it uses POST without parameters. Upgrading the fisheye plugin to the new fecru API should solve the issue (will use PUT instead of POST).
Will do the API upgrade as soon as possible.

Installing via web-interface works for me. I'm using version 1.45.
scm-fisheye-plugin-1.1-SNAPSHOT.scmp

Jérémie Faucher-Goulet

unread,
Apr 9, 2015, 9:58:41 PM4/9/15
to scmma...@googlegroups.com
I've been reading a bit on the subject... Seems it's a recurrent issue affecting many projects over the web and known to behave this way with IIS 7+.
I'm afraid we would probably run into the same issue with PUT (new fecru API) as they are both described to behave similarly (POST and PUT).

The same problem was encountered in Python and they've since fixed it so it would send this header even with an empty body. Definitely worth a read on the subject:

So in the end, whether you use PUT or POST, I believe the "Content-Length: 0" is still required for proper operation with IIS. Have you figured out if it's scm or java that prevents the inclusion of Content-Length? Sounds like a bug should be opened to the culprit, as was done with Python...

I'll try your latest version tomorrow, with a "Content-Length: 2" and let you know how it turns out.

--
You received this message because you are subscribed to a topic in the Google Groups "scmmanager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scmmanager/0oPJQjfvLuU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremfg © 2002-20012

Jérémie Faucher-Goulet

unread,
Apr 15, 2015, 2:23:14 PM4/15/15
to scmma...@googlegroups.com, Jeremie Faucher-Goulet
Hi Tobias,

Sorry for the long delay, been busier than I though I would be :)
I confirm that the latest build you've provided to me works. Fisheye was triggered and changes in the Git repo were updated immediately. I think we will use this for now until permanent solution comes around.

If you still plan on updating the plugin to the latest API and use "PUT", I suggest making sure that scm-manager will also support a "ContentLength: 0" for this command. We would probably encounter the same problem as we did for POST from what I've read.

Thank you very much for your help
To unsubscribe from this group and all its topics, send an email to scmmanager+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremfg © 2002-20012
Reply all
Reply to author
Forward
0 new messages