java.io.IOException: An established connection was aborted by the software in your host machine when using Iframe in Vaadin 14 - exception

I am getting the following error, when using IFrame to display Files throught the browser in vaadin.
java.io.IOException: An established connection was aborted by the software in your host machine
My code looks like this:
StreamRegistration registration = VaadinSession.getCurrent().getResourceRegistry()
.registerResource(stream);
IFrame iframe = new IFrame(registration.getResourceUri().toString());
iframe.setHeight("100%");
iframe.setWidth("100%");
diagFile.add(iframe);
diagFile.setWidth("600px");
diagFile.setHeight("800px");
diagFile.setResizable(true);
diagFile.setDraggable(true);
diagFile.open();
Everything works fine but the error gets thrown 4 times when opening the iframe. It doesn't influence anything, but its really annoying. Does anyone know how to fix it or how to catch/ignore the exception so it wont spam the console?
Thanks in advance

Related

Event Subscription not working with error interrupted system call

I am trying to establish an event subscription via zmq from my locally running sawtooth network. As soon as I start my event-subscriber container, I get the error "interrupted system call".
I am following the example from here https://github.com/danintel/sawtooth-cookiejar/tree/master/events/go
I have tried using validatorUrl as tcp://localhost:4004 tcp://validator-0:4004
note: validator-0 is my local container name for the validator
Also, have tried with the direct IP of the validator container tcp://<IP>:4004
zmqConnection.RecvMsgWithId() is throwing the error.
The error I am getting is exactly at this line https://github.com/danintel/sawtooth-cookiejar/blob/master/events/go/src/events_client.go#L105
Can someone please help for the probable reasons or the way I can debug this one?
I do not know, but one possible cause is this example was recently updated to a new version of Go, 1.11 (from 1.9) after your posting:
https://github.com/danintel/sawtooth-cookiejar/pull/9
Because of this error:
Loading input failed: unsupported version of go: exit status 2: flag provided but not defined: -compiled
The issue was related to inter-pod communication. So the issue was, my event subscriber client was in a completely different pod than the pod where the validator container was running. In that case, we need to used the FQDN of that pod. Refer to the link below.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields

Browser doesn't show expected certificate error

Normally, most of the machines get error when opening url https://host:port/app/xx.do
IE: The security certificate presented by thi swebsite was issued for a different website's address
Chrome: Your connection is not private -- There are issues with the site's certificate chain (net::ERR_CERT_COMMON_NAME_INVALID)
After clicking "Continue"/"Process", it is expected to
IE: Load every dependency including the jar
Chrome: A popup error says: The xxx has not been initialized!
However, there is one machine, it doesn't get the certificate error in both browsers, nor the jar initialized error in Chrome.
When trying to test the web through IE, surely it failed without any warning messages.
So, how can we get the certificate warning back? And let the IE load that jar as normal.

Heroku app: Error during WebSocket handshake: Unexpected response code: 200

I followed a tutorial on how to make a multiplayer tetris game, here is the repo:
https://github.com/Leftier/tetris
It worked just fine on localhost so I tried to deploy it in heroku (https://tetrixtest.herokuapp.com/ --ASD to move Q/E to rotate) but I get the following error:
WebSocket connection to 'wss://tetrixtest.herokuapp.com/' failed: Error during WebSocket handshake: Unexpected response code: 200
while trying to create the webSocket in this line (connection-manager.js line 14):
this.conn = new WebSocket(`wss://${window.location.hostname}:${window.location.port}`)
I don't know much about webSockets,
at first I thought that heroku was not able to handle websockets but that wasn't the case so I tried using the link directly as an argument instead of reading it from the browser but still the same issue.
I would like some clues/hints about why does this happens, I searched in google and github, but I only found issues related to socket.io
For me the solution was to turn on "Session affinity" by running this command heroku features:enable http-session-affinity
More info at https://devcenter.heroku.com/articles/session-affinity
Session affinity, sometimes referred to as sticky sessions, is a
platform feature that associates all HTTP requests coming from an
end-user with a single application instance (web dyno).

How do I change a 500 error into a 404 error and show a custom page?

I just launched a site and when I go to a non-existing page, I get a 500 Internal Server error instead of a 404 errror.
I was thinking that this was because I didn't have a 404.html page (just a guess), but I just created a 404.html page at the root and I still get 500 errors.
What should I do to make it so that when somebody types in a bad address they get redirected to my custom 404 error page?
There is no special stuff going on with my site, just HTML, CSS and a tiny bit of javaScript. Not a Rails app, not a Wordpress site, no PHP, etc. ..just HTML files on an Apache server.
The error I get when I go to a non-existing page or directory reads like this"
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator,
webmaster#subdomain.domain.com and inform them of the time the
error occurred, and anything you might have done that may have caused
the error.
More information about this error may be available in the server error
log.
Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.
After you have the Error 500 problem solved you can create a custom 404 page by editing your .htaccess file you should have one in the root of your directory.
Open the file with a text editor and add this:
ErrorDocument 404 http://www.yourwebsite.com/404page.html
You could also create a custom Error 500 by changing the above code to suite your needs.
It's pretty self explanatory but the last part is the directory that users will be directed to after they receive a 404 error.

Soundcloud embed Timeout & wget returning Error 500

I have a wordpress blog in a VPS (Centos 6.8 x86) which some pages have a soundcloud embed. Whenever I try to view one of this pages, I receive a timeout error (http://prntscr.com/bpmm90).
GET
http://soundcloud.com/oembed
?maxwidth=0
&maxheight=0
&url=https%3A%2F%2Fsoundcloud.com%2F10de10%2Fsemana-dos-10-20-270616
&format=json
Operation timed out after 5000 milliseconds with 0 bytes received
Ok, I thought maybe I was doing something wrong in Wordpress, so I tried to 'wget' the same URL and... ERROR 500.
wget 'http://soundcloud.com'
--2016-07-06 18:46:01-- http://soundcloud.com/
Resolving soundcloud.com... 72.21.91.127
Connecting to soundcloud.com|72.21.91.127|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2016-07-06 18:46:31 ERROR 500: Internal Server Error.
However, it all works fine if I try the same things on another server. I've already thought about if I was somehow blocked from accesing soundcloud through my VPS, but I barely did any call to the service.
The url in question is: http://soundcloud.com/oembed?maxwidth=0&maxheight=0&url=https%3A%2F%2Fsoundcloud.com%2F10de10%2Fsemana-dos-10-20-270616&format=json