Webhook problem

Hi,
I’m using sonarqube 7.9.3.33349 on Centos 8.
I’m would like to test how webhooks work, but I’ve a problem in sending.
I’ve put sonarqube in DEBUG mode and in ce.log there are this problem:

2020.04.03 15:28:16 DEBUG ce[AXFAOh4qQ3KOMLPAI-8J][o.s.s.w.WebHooksImpl] Failed to send webhook ‘prova’ | url=http://10.20.230.4:5000/ | message=Socket closed
2020.04.03 15:28:26 DEBUG ce[AXFAOh4qQ3KOMLPAI-8J][o.s.s.w.WebHooksImpl] Failed to send webhook ‘test’ | url=http://10.20.230.4:5000 | message=Socket closed
2020.04.03 15:58:24 DEBUG ce[AXFAVbatQ3KOMLPAI-8L][o.s.s.w.WebHooksImpl] Failed to send webhook ‘prova’ | url=http://10.20.230.4:5000/ | message=Socket closed
2020.04.03 15:58:34 DEBUG ce[AXFAVbatQ3KOMLPAI-8L][o.s.s.w.WebHooksImpl] Failed to send webhook ‘test’ | url=http://10.20.230.4:5000 | message=Socket closed
2020.04.03 15:58:45 DEBUG ce[AXFAVgKHQ3KOMLPAI-8M][o.s.s.w.WebHooksImpl] Failed to send webhook ‘prova’ | url=http://10.20.230.4:5000/ | message=Socket closed

On the 10.20.230.4 I’ve put netcat in listening mode on port 5000, but nothing arrived so I try with tcpdump on the sonarqube server ‘tcpdump -vv -X -i eth0 dst port 5000’ but no packet was send to 10.20.230.4.

I’ve already set http.nonProxyHosts=“10.20.230.4:5000|10.20.230.4” in sonar.properties.

I can’t understand what is the matter. Someone can help me?
Thanks

Carlo

I had the TRACE info, I hope someone could help me:


2020.04.06 09:36:25 DEBUG ce[AXFOaxuQB8VvzI6dttVK][o.s.s.w.WebHooksImpl] Failed to send webhook 'prova' | url=http://10.20.230.4:5000/ | message=Socket closed
2020.04.06 09:36:25 TRACE ce[AXFOaxuQB8VvzI6dttVK][sql] time=1ms | sql=insert into webhook_deliveries ( uuid, webhook_uuid, component_uuid, ce_task_uuid, analysis_uuid, name, url, success, http_status, duration_ms, payload, error_stacktrace, created_at ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) | params=AXFOa0d1v3FYuK2C_Vh9, AXFAB8bgtICTowvoYwpg, AXErSAfvz44fpI6FzSK0, AXFOaxuQB8VvzI6dttVK, AXFOaxyrv3FYuK2C_Vh7, prova, http://10.20.230.4:5000/, false, 4, 10002, {"serverUrl":"http://127.0.0.1:9000","taskId":"AXFOaxuQB8VvzI6dttVK","status":"SUCCESS","analysedAt":"
2020-04-06T09:35:57+0200","changedAt":"
2020-04-06T09:35:57+0200","project":{"key":"test_yaml","name":"test_yaml","url":"http://127.0.0.1:9000/dashboard?id=test_yaml"},"branch":{"name":"master","type":"LONG","isMain":true,"url":"http://127.0.0.1:9000/dashboard?id=test_yaml"},"qualityGate":{"name":"Sonar way","status":"OK","conditions":[{"metric":"new_reliability_rating","operator":"GREATER_THA..., java.net.SocketTimeoutException: timeout
	at okio.Okio$4.newTimeoutException(Okio.java:232)
	at okio.AsyncTimeout.exit(AsyncTimeout.java:286)
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358)
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230)
	at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242)
	at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1E..., 1586158575715

Hi,

Do you have something on the network - like a proxy or firewall - between SonarQube and where you’re trying to send the webhooks?

 
Ann

I’ve find the solution, I’ve a proxy that stop comunication but if I set http.nonProxyHosts in sonar.properties all work fine.
Only one thinks, It would be better to add http.nonProxyHosts parameter in to the documentation.