Wildfly JSF resources: err_invalid_chunked_encoding - java

My customer web application is currently on an AWS-EC2 Linux instance, running WildFly 8.2.0.Final "Tweek".
I'm not using Apache or other web servers, just accessing the application server on port 8080 (the system is forwarding to 8080 all traffic on port 80).
Application works fine everywhere, but yesterday I found a very weird issue on one of my customer's browsers. However, it's not related to the browser, because I already tried installing Firefox and Chrome, in addition to IE, and the problem is still there. The client OS is Win8.1.
The CSS and JS files are not loaded by the browser: Chrome prints this message in the console:
ERR_INVALID_CHUNKED_ENCODING
However, if I click on the file and 'Open link in new tab', I can actually see the file's content!
My static files are JSF resources, for example:
/javax.faces.resource/primefaces.css.htm?ln=primefaces&v=5.1
Response headers are, for example:
Content-Type:application/javascript
Date:Fri, 27 Mar 2015 16:32:51 GMT
ETag:W/"312861-1427473269000"
Expires:Fri, 03 Apr 2015 16:32:51 GMT
Last-Modified:Fri, 27 Mar 2015 16:21:09 GMT
I saw the content-length is also zero, which I suppose is the cause for the problem.
How to find out more info on that? What's the solution for that type of error? Thanks

Related

HTTP Get fails to retrieve jpeg hosted on Amazon EC2

I've developed a java web app that uses a jetty server to host images publicly (such as the image http://52.23.50.128:8080/reports/94109_17_03_21_14.jpeg), and then uses the twilio api to grab that image from a provided link, and shoot the image off in an SMS.
When I run the application locally, and use ngrok to expose my local machine to a publicly accessible URL (such as in e0f5c759.ngrok.io/reports/94109_17_03_21_14.jpeg), the application works fine. However, when I run my application on my AWS Lightsail EC2 Instance, and try to fetch the images from there (such as with 52.23.50.128:8080/reports/94109_17_03_21_14.jpeg or osterbox.com/reports/94109_17_03_21_14.jpeg), the SMS is never sent.
When I look at twilios debugger, I can see that the SMS never sends due to an HTTP connection failure. Specifically, in the response header I see:
Date Tue, 21 Mar 2017 21:44:01 GMT
Last-Modified Tue, 21 Mar 2017 21:44:00 GMT
Content-Type image/jpeg
Accept-Ranges bytes
Content-Length 77695
Server Jetty(9.3.3.v20150827)
X-Cache MISS from ip-172-18-7-38.ec2.internal
X-Cache-Lookup MISS from ip-172-18-7-38.ec2.internal:3128
Does anyone know why the HTTP Get request would fail?

Pivotal server log messages not show in Spring tools suite

I am working on Spring web MVC. I am using Spring tools suite and pivotal server. I did not found any server log messages in STS. Console only show the server startup message. I want to view all the server message, error and exceptions. Currently I am unable to view any server error messages and errors.
The console is showing the message like this-
Nov 19, 2016 1:08:21 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1312 ms
Nov 19, 2016 1:08:26 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5332 ms
i see the question is old but I came across the same issue just now and didn't want to let this one go unanswered ;)
I found an solution from pivotal themselves. But it has a little typo in it: The first line in the logging.properties is
handlers= java.util.logging.ConsoleHandler.level= INFO
but should rather be just
handlers= java.util.logging.ConsoleHandler
This should do the trick.
And if you would still want to keep the default catalina, localhost, etc. files of the tcServer additional to the console output you can modify or copy the logging.properties file found inside of your tcServer - base instance ({pivotal-tc-server-folder}/base-instance/conf/).
Here are many configurations but the one concerning the console output, which is otherwise only in the catalina-{date}.log is in the line
.handlers = 1catalina.org.apache.juli.AsyncFileHandler
just change it to
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
and you'll have both: logs and console output.
Best regards,
Uwe

Glassfish - Application name is already in use

I’ve come to an hold with my programing because I’m getting an error from glassfish. I’m using NetBeans IDE 7.3 for this project. And I’ve built a simple program which runs over the web(jsp file etc). But I keep on getting the weirdest error display from glassfish. I’ve searched the internet for my solution and found people posting similar things, but I never seem actually manage to fix it because I don’t really understand the post which I’ve read.
So what is the error that I get at startup? First time I run it I get this from the Output
Starting GlassFish Server 3.1.2
GlassFish Server 3.1.2 is running.
In-place deployment at C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=ÄrendeWebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: null. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
The actually name of the project is ÄrendeWebApplication and sure it’s a weird name for some people.
Well anyhow I tried to run the application again just to make sure it’s not something spooky going on, and I got a totally different error message.
In-place deployment at
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web
Initializing...
deploy?
DEFAULT=C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\build\web&name=Ärende
WebApplication&contextroot=/_rendeWebApplication&force=true failed on GlassFish Server 3.1.2
Error occurred during deployment: Application name ÄrendeWebApplication is already in use.
Please pick a different name.. Please see server.log for more details.
C:\Users\Vedo\Documents\NetBeansProjects\ÄrendeWebApplication\nbproject\build-impl.xml:1038: The module has not been deployed.
See the server log for details.
Alright so this is the weirdest part since it’s complaining that the name of my application is already in use? So I thought first it could perhaps be something with the database, but went to see the “Java DB Database Process” and it seemed fine, will post it too just in case
Fri Jun 07 11:01:10 CEST 2013 : Security manager installed using the Basic server security policy.
Fri Jun 07 11:01:11 CEST 2013 : Apache Derby Network Server - 10.8.2.2 - (1181258) started and ready to accept connections on port 1527
So the database is not the problem “I Believe” so I went later to check on the Glassfish server 3.1.2 and I found some warning messages which read
WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d].
WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor#297b0d9d] from index [0]
WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer#572b43d] from index [1]
INFO: EJB5181:Portable JNDI names for EJB ÄrendeDao: [java:global/ÄrendeWebApplication/ÄrendeDao!com.Ärende.dao.ÄrendeDaoLocal, java:global/ÄrendeWebApplication/ÄrendeDao]
INFO: WEB0671: Loading application [ÄrendeWebApplication] at [/_rendeWebApplication]
SEVERE: The log message is empty or null. Please log an issue against the component in the logger field.
And here is where I’ve tried different things, well I thought it first complained about the name, it’s alredy in use right…. So I deleted the application and moved it to another place on my hard drive and well, I wouldn’t be posting this if it worked. Then I started considering that perhaps the database was something wrong with, I went to the console admin in glassfish to check the connection and the Ping and showed me that it worked as it should. Also perhaps important information is that I’ve connected glassfish through MySQL, but I hardly believe that this is the problem. I then stumbled across someone saying that you could force “redeploy via Eclipse” well first problem here is that I’m not using Esclipse and second problem is I’ve searched A LOT to find if there is a “Force redeploy in NetBeans” and that is not the easiest task in life. So I believe this is perhaps my last stop hopefully and maybe someone here could help me out.
here are some steps you can try:
Fix your projects name :3
If your problem is the one the question title suggests, undeploy your application first, then redeploy. You can easily undeploy and force redeploy in the Glassfish Admin Gui (http://localhost:4848).
If your application still does not work, update your question with proper formatted log messages of the actual problem.

Maven repository blocking specific ip addresses?

I am trying to download the file http://repo.maven.apache.org/maven2/org/sonatype/aether/aether-api/1.13.1/aether-api-1.13.1.jar as part of a maven build by my ci server but I get the error:
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/aether/aether-api/1.13.1/aether-api-1.13.1.jar
01-Nov-2012 08:44:26 Nov 01, 2012 8:44:26 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryExecute
01-Nov-2012 08:44:26 INFO: I/O exception (java.net.SocketException) caught when processing request: Connection reset
01-Nov-2012 08:44:26 Nov 01, 2012 8:44:26 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryExecute
01-Nov-2012 08:44:26 INFO: Retrying request
After locating this error in the logs I tried to download this artefact by hand with wget which didn't work also. Further investigation revealed that downloading form another server form this provider (different ip/same ip-range) is not possible either.
downloading this file to servers form other providers was successful at the same time.
I was able to ping repo.maven.apache.org so the server was reachable.
Is it possible that the ip-address of my ci-server is blocked for download?
Do I have to move my ci-server to a different provider?
(atm my ci-server is hosted at jiffybox/domainfactory, if that helps answering the question)
There are currently serious problems with maven's CDN provider, see
the support forum at
https://getsatisfaction.com/sonatype/topics/unable_to_dowload_maven_jetty_plugin_version_6_1_26_from_central
current issue reports at
https://issues.sonatype.org/browse/MVNCENTRAL-257
https://issues.sonatype.org/browse/MVNCENTRAL-259
https://issues.sonatype.org/browse/MVNCENTRAL-260
So obviously they are working on it.
The only workaround for me was to download through a VPN tunnel.

Solr Read Timeout (only in production environment)

I am working with a Java application that uses SolrJ to index documents to a Solr server.
In my local test environment, I run a local Solr instance on a Tomcat server on my windows xp box. When I run the Java app from a different Windows box, the indexing completes successfully and the Solr log files look normal.
However, running the same Java application deployed on linux webserver communicating to another linux webserver running Solr, I receive "read timed out" messages after every solr update command:
Jul 14, 2011 3:12:31 AM org.apache.solr.core.SolrCore execute INFO: []
webapp=/solr path=/update params={wt=javabin&version=1} status=400
QTime=20020 Jul 14, 2011 3:12:51 AM
org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {} 0
20021 Jul 14, 2011 3:12:51 AM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException:
java.net.SocketTimeoutException: Read timed out at
org.apache.solr.handler.XMLLoader.load(XMLLoader.java:72) at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
at...
Caused by:
javax.xml.stream.XMLStreamException: java.net.SocketTimeoutException:
Read timed out
Any idea why this might be happening? My suspicion is that something is closing these connections after they are initiated (e.g. web filtering software, firewall...), but the network admins at my workplace say that no traffic is being blocked.
Is it getting timedout only with updates or even with querying?
Check the server settings on the linux server machine whether it has very less timeout value.

Categories

Resources