I have found such error message in my Springboot app logs:
Oct 20 14:22:14 ip-10-0-78-113 web: 2020-10-20 14:22:14.388 INFO 3802 — [nio-8081-exec-5] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header
Oct 20 14:22:14 ip-10-0-78-113 web: Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
Oct 20 14:22:14 ip-10-0-78-113 web: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
...
I got to know, that its probably because somebody / some app is calling my endpoint with use of HTTPS instead of HTTP. I was able to log those requests by including in properties:
logging.level.org.springframework.web: trace
logging.level.org.apache: trace
Now I have received unparsed text, something like this:
Received [ ÷ ó÷=EVq&GŵH¡à}C¶vÓÂíÿ#,¾ )L /ð^ w» e<Ú5~ñ¨7ëÌaÒ*l×e $À/À+À0À,̨̩À ÀÀ
À / 5
localhost ÿ
3 & $ ¬·lä¹]Ö·a6ððòvcd»[7Ûj V - + ]
Is it possible to decode/decrypt it, and find out what the actual API call was?
I had same problem & make it working by using http:// instead of https://
Related
I'm using robot framework to send requests without opening a browser. One of the requests is supposed to download a file. But when I send this request the file is not downloaded (even if I have a 200 status code).
${uri} set variable /api/pricing/ExportImportParams/downloadExportParams
Create Session test ${url} cookies=&{cookies}
${resp}= Get Request test ${uri} headers=&{headers}
${resp_code} = Set Variable ${resp.status_code}
${resp_code} = Convert To String ${resp_code}
Run Keyword And Continue On Failure Should be Equal ${resp_code} 200
The test is passed while the status code is 200.
But no file is downloaded
Here is the response Headers
content-disposition: attachment;
filename="Export Site Parameter_2020-01-03_09-21-39.xlsx";
filename*=UTF-8''Export%20Site%20Parameter_2020-01-03_09-21-39.xlsx
content-length: 3767 content-type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
date: Fri, 03 Jan 2020 09:21:38 GMT server: Kestrel x-powered-by:
ASP.NET
Thanks for helping
Making an assumption that you are using the RequestsLibrary to perform the HTTP Get request to retrieve the file. Althought the documentation does not specify it, the content attribute of the returned response object contains the data. This can then be easily stored in a file using the standard OperatingSystem library.
*** Settings ***
Library RequestsLibrary
Library OperatingSystem
*** Test Cases ***
File Download Using RequestsLibrary
${file_name} Set Variable file_example_XLS_10.xls
${uri} Set Variable /wp-content/uploads/2017/02/${file_name}
Create Session test https://file-examples.com
${response}= Get Request test ${uri}
Run Keyword And Continue On Failure Should Be Equal As Numbers ${response.status_code} 200
Create Binary File ${EXECDIR}/${file_name} ${response.content}
I'm setting up Shibboleth to use SAML 2.0. This setup contains reverse proxy using Nginx to Jetty 9.49 which points to shibboleth idp.war file.
For testing, I'm using the django Service provider from this example here.
I'm using self-sign certificates.
I can access both https://idp.localhost/idp/shibboleth and https://idp.localhost/idp/status, but not https://idp.localhost/idp/profile/SAML2/POST/SSO. From shibboleth log file, I'm getting this error each time I browse https://idp.localhost/idp/profile/SAML2/POST/SSO:
2018-04-25 18:20:47,746 - ERROR
[org.opensaml.saml.common.binding.security.impl.ReceivedEndpointSecurityHandler:200]
- Message Handler: SAML message intended destination endpoint 'https://idp.localhost/idp/profile/SAML2/POST/SSO' did not match the
recipient endpoint 'http://idp.localhost/idp/profile/SAML2/POST/SSO'
==> idp-warn.log <== 2018-04-25 18:20:47,746 - ERROR [org.opensaml.saml.common.binding.security.impl.ReceivedEndpointSecurityHandler:200]
- Message Handler: SAML message intended destination endpoint 'https://idp.localhost/idp/profile/SAML2/POST/SSO' did not match the
recipient endpoint 'http://idp.localhost/idp/profile/SAML2/POST/SSO'
==> idp-process.log <== 2018-04-25 18:20:47,748 - WARN [net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor:202] -
Profile Action WebFlowMessageHandlerAdaptor: Exception handling
message org.opensaml.messaging.handler.MessageHandlerException: SAML
message failed received endpoint check at
org.opensaml.saml.common.binding.security.impl.ReceivedEndpointSecurityHandler.checkEndpointURI(ReceivedEndpointSecurityHandler.java:202)
==> idp-warn.log <== 2018-04-25 18:20:47,748 - WARN [net.shibboleth.idp.profile.impl.WebFlowMessageHandlerAdaptor:202] -
Profile Action WebFlowMessageHandlerAdaptor: Exception handling
message org.opensaml.messaging.handler.MessageHandlerException: SAML
message failed received endpoint check at
org.opensaml.saml.common.binding.security.impl.ReceivedEndpointSecurityHandler.checkEndpointURI(ReceivedEndpointSecurityHandler.java:202)
==> idp-process.log <== 2018-04-25 18:20:47,749 - WARN [org.opensaml.profile.action.impl.LogEvent:105] - A non-proceed event
occurred while processing the request: MessageAuthenticationError
==> idp-warn.log <== 2018-04-25 18:20:47,749 - WARN [org.opensaml.profile.action.impl.LogEvent:105] - A non-proceed event
occurred while processing the request: MessageAuthenticationError
Where did I go wrong?
I think that a request was done in HTTPS and a response returned in clear HTTP.
This kind of problem sometimes happen when jetty was non installed from source or with other corrupted packages. It's difficult to diagnose in this situation.
Try to compile jetty from source, clean first your old installation.
I've also build up a complete IDP/SP setup procedure with apache2 or nginx/ tomcat or jetty setup here, with ansible:
https://github.com/peppelinux/Ansible-Shibboleth-IDP-SP-Debian9
It takes 4 minutes to give you what you expect, It needs an existing LDAP installation.
I have upgraded a SonarQube server from 6.0 to 6.7.2. Everything is fine, except that, after logging in as user "admin" and navigating to tab Administration, clicking on subtab System yields an error message
An error has occurred: please contact your administrator.
In file web.log:
2018.03.06 11:38:24 ERROR web[AWH6436/ICo3FeIjAAAz][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
java.lang.IllegalStateException: Failed to call HTTP server of process [key='ce', ipcIndex=3, logFilenamePrefix=ce]
at org.sonar.ce.http.CeHttpClientImpl.call(CeHttpClientImpl.java:171)
at org.sonar.ce.http.CeHttpClientImpl.retrieveSystemInfo(CeHttpClientImpl.java:60)
at org.sonar.server.platform.ws.StandaloneSystemInfoWriter.write(StandaloneSystemInfoWriter.java:53)
at org.sonar.server.platform.ws.InfoAction.handle(InfoAction.java:64)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:103)
at org.sonar.server.ws.WebServiceFilter.doFilter(WebServiceFilter.java:86)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
...
Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://10.145.61.55
The IP address is that of the server. There is no mention of any port in the error message, I don't know if this has any relation with the error.
It seems that the Web component cannot access the Compute Engine component. However nothing particular was found in file ce.log which ends with a trace Compute Engine is operational.
I followed the short migration guide in https://docs.sonarqube.org/display/SONAR/Upgrading.
Environment: Linux, JDK 8, Oracle DB
Does anyone as a clue? Many thanks in advance.
For whoever who might stumble on the same issue: it was an error in my proxy configuration. Increasing the logging level by setting sonar.log.level=DEBUG in file sonar.properties yielded the following new traces in file web.log:
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#668ee27b5 pairs: {GET http://127.0.0.1:40413/systemInfo HTTP/1.1: null}{User-Agent: SonarQube 6.7.2.37468 # AWHmcYEU8aGLjZ5sPfjj Java/1.8.0_60}{Host: 127.0.0.1:40413}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Proxy-Connection: keep-alive}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] sun.net.www.MessageHeader#527214044 pairs: {null: HTTP/1.1 301 Moved Permanently}{Server: BlueCoat-Security-Appliance}{Location: http://10.145.61.55}{Connection: Close}
2018.03.07 11:52:04 DEBUG web[AWIAFTpArQRjrTzMAAAg][s.n.w.p.h.HttpURLConnection] Redirected from http://127.0.0.1:40413/systemInfo to http://10.145.61.55
2018.03.07 11:52:04 ERROR web[AWIAFTpArQRjrTzMAAAg][o.s.s.w.WebServiceEngine] Fail to process request http://<HOST NAME>:20295/sonarqube/api/system/info
The proxy was redirecting the Compute engine URL http://127.0.0.1:40413/systemInfo to http://10.145.61.55.
The solution was to add 127.0.0.1 to http.nonProxyHosts in file sonar.properties.
Have written simple server using fastcgi++ 2.1 lib and configured fastscgi in apache2 web server. When I make post request to the server with Content Type: application/json, server throws an internal server error. Have checked apache error.log file and found following log:
[Wed Jan 08 13:56:40 2014] [error] [client 127.0.0.1] FastCGI: server "/var/www/testserver" stderr: "Client sent unknown content type." from "http://abcd.com/testserver" with a POST request method.
When I set Content Type to "application/x-www-form-urlencoded" its working fine and request get served. Please help me on how to serve request with Content Type as "application/json". Is there any configuration required for this to support?
Yeah solved !
In fastcgi++ lib, Content Type "application/x-www-form-urlencoded" is hard-coded. Have changed it to "application/json" and rebuild the fastcgi++ lib. Now I'm able to serve request with Content Type "application/json".
I'm new to JMeter and trying to get a small test running for proof of concept purposes - but am getting the following error recording the steps (basically log in, click around, log off)
Any suggestions ..?
2013/10/28 13:23:47 ERROR - jmeter.protocol.http.sampler.HTTPHC4Impl: Error in redirect URL for GET https://blabla.blagroup.com/Home/Default.aspx HTTP/1.1
Could not sanitize URL: /Pub/Login.aspx
java.net.MalformedURLException: no protocol: /Pub/Login.aspx
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:337)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:226)
2013/10/28 13:23:49 WARN - jmeter.protocol.http.proxy.Proxy: [54014] Empty request, ignored
2013/10/28 13:23:49 WARN - jmeter.protocol.http.proxy.Proxy: [54016] Empty request, ignored
2013/10/28 13:23:49 WARN - jmeter.protocol.http.proxy.Proxy: [54013] Empty request, ignored
2013/10/28 13:23:49 WARN - jmeter.protocol.http.proxy.Proxy: [54015] Empty request, ignored etc etc etc
This is a known bug that has been fixed in nightly build:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55717
As a workaround, change in Https recorder http implementation to Java instead of HttpClient4 implementation.
If you want to give nightly build a try, see:
http://jmeter.apache.org/nightly.html
Read:
Installing JMeter runtime
Download the _bin and _lib files
Unpack the archives into the same directory structure
The other archives are not needed to run JMeter.
I was getting the same error. In "HTTP Request Defaults" I changed HTTP Request Implementation to "Java" as shown below. That fixed it for me.