We have a kubernetes cluster which has a dropwizard based web application running as a service. This application has a rest uri to upload files. It cannot upload files larger than 1MB. I get the following error:
ERROR [2017-07-27 13:32:47,629] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: ea812501b414f0d9
! com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
! at [Source: <html>
! <head><title>413 Request Entity Too Large</title></head>
! <body bgcolor="white">
! <center><h1>413 Request Entity Too Large</h1></center>
! <hr><center>nginx/1.11.3</center>
! </body>
! </html>
I have tried the suggestions given in https://github.com/nginxinc/kubernetes-ingress/issues/21. I have edited the Ingress to set the proxy-body-size annotation. Also, I have tried using the configMap without any success. we are using kubernetes version 1.5. Please let me know if you need additional information.
Had this on my setup as well. Two advices here:
1: switch to official kubernetes nginx ingress, it's awesome (https://github.com/kubernetes/ingress-nginx)
2: with the above ingress, you can add an annotation to your Ingresses to controll body size limit on per ingress basis like this :
annotations:
ingress.kubernetes.io/proxy-body-size: 10m
works great
Related
I have been using the Watson API for a long time now, however it has started giving me Code:503 errors recently for the past 4 days and I am rarely able to get the desired output which I used to. The code works fine and is unchanged.
This is the error I am receving.
watson_developer_cloud.watson_service.WatsonApiException: Error: <HTML><HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error - Write</H1>
The server encountered an internal error or misconfiguration and was unable to
complete your request.<P>
Reference #4.327f1cb8.1597063995.c75870b
</BODY></HTML>
, Code: 503
Is it because of the overload on IBM cloud during the past couple of days or is there any network issues at my end?
I had the same issue, I was using NodeJS and adding an extra "/" at the end of the URL seemed to work from the example found here:
https://cloud.ibm.com/apidocs/speech-to-text?code=node#recognize
const speechToText = new SpeechToTextV1({
authenticator: new IamAuthenticator({
apikey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
}),
serviceUrl: 'https://api.us-east.speech-to-text.watson.cloud.ibm.com/instances/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/',
});
^Note the extra "/" at the end of service URL
I am attempting to get familiar with spring-cloud-gateway and I am having a problem configuring routes in YAML. I am attempting to do a simple redirect based on path to httpbin.org. This works fine when I do this in code but when I am attempting this in YAML config I get a 404.
YAML:
- id: demo
uri: http://httpbin.org
predicates:
- Path=/demo
When I attempt this route, it looks like the route is getting matched- I dont see a 404 for the route itself. What I get in the response is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try
again.</p>
What am I doing wrong here?
I am trying to install some dependencies on my Eclipse Oxygen when I suddenly hit this error. The full error message is:
Cannot open Eclipse Marketplace
Cannot install remote marketplace locations: Cannot complete request to http://marketplace.eclipse.org/catalogs/api/p: Invalid response content: The element type "link" must be terminated by the matching end-tag "</link>".
Cannot complete request to http://marketplace.eclipse.org/catalogs/api/p: Invalid response content: The element type "link" must be terminated by the matching end-tag "</link>".
Invalid response content: The element type "link" must be terminated by the matching end-tag "</link>".
The element type "link" must be terminated by the matching end-tag "</link>".
Received response begins with:
1: <!DOCTYPE html>
2:
3: <html lang="en">
Cannot complete request to http://marketplace.eclipse.org/catalogs/api/p: Invalid response content: The element type "link" must be terminated by the matching end-tag "</link>".
Invalid response content: The element type "link" must be terminated by the matching end-tag "</link>".
The element type "link" must be terminated by the matching end-tag "</link>".
Received response begins with:
1: <!DOCTYPE html>
2:
3: <html lang="en">
It was fine before. I started to see this error after I installed IBM WebSphere Application Server V8.5x Developer Tools for Oxygen. I am very new to Eclipse so I'm not sure how to debug this.
Yes I have internet and I have no antivirus installed (it's running in a CentOS VM). I also have tried resetting the network connection settings to default but its not working.
Adding marketplace.eclipse.org/catalogs/api* to the Proxy Bypass settings solved this problem
Tried everything possible on the internet! Failed.
The issue is with our network only. Please check if you have any content filtering enabled on your network, URL blocker/filter, security-enabled that blocks certain keywords in URLs.
For me, It was Content Filtering enabled on my WiFi Router, which was blocking certain URLs.
I have installed Apache Traffic Server and configured records.config using:
CONFIG proxy.config.http.cache.http INT 1
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.remap_required INT 1
CONFIG proxy.config.url_remap.pristine_host_hdr INT 1
CONFIG proxy.config.http.server_ports STRING 8080 8080:ipv6
I have also added a remap.config line cause I read it is essential:
regex_map http://(.*)/ http://localhost:80/
But when I try to access to localhost:8080, I get the output:
Not Found on Accelerator
Description: Your request on the specified host was not found. Check the location and try again
Why can I access to the server? I have followed the installation guide...
EDIT: Curl
curl localhost:8080
<HTML>
<HEAD>
<TITLE>Not Found on Accelerator</TITLE>
</HEAD>
<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Not Found on Accelerator</H1>
<HR>
<FONT FACE="Helvetica,Arial"><B>
Description: Your request on the specified host was not found.
Check the location and try again.
</B></FONT>
<HR>
</BODY>
I had the same issue today. I figured it was caused by file permissions. Basically, trafficserver user had no write access to /etc/trafficserver folder (on Debian) and its content. I have changed ownership to trafficserver and now all working okay.
Take ownership recursively run the below in /etc:
chown -R trafficserver:trafficserver trafficserver
Also make sure Remap set to 0 in /etc/trafficserver/records.config
CONFIG proxy.config.url_remap.remap_required INT 0
Set this variable to 1 if you want Traffic Server to serve requests only from origin servers listed in the mapping rules of the remap.config file. If a request does not match, then the browser will receive an error.
I am trying to set cache header for service worker through nginx in create react app project, in the configuration, I tried
location /service-worker.js {
add_header Cache-Control "no-cache";
proxy_cache_bypass $http_pragma;
proxy_cache_revalidate on;
expires off;
access_log off;
}
However when I load my page, sw registration fails with the message.
A bad HTTP response code (404) was received when fetching the script.
registerServiceWorker.js:71 Error during service worker registration: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.
Can someone please suggest a way with nginx using create-react-app?
as per your configuration service-worker.js must be in / root directory defined with root nginx directive.
Please check if the file is present there. If you are using express and express static and have placed the file in public/assets directory, it won't work. if for this file you want to to have different location. you can use alias directive.