Allow a web application to access files on a windows share - java

I'm trying to allow a web application running on Linux Ubuntu 10.04.4 and WildFly 9 to access files on a windows share using the JCIFS library ( https://jcifs.samba.org/ ). When testing Samba connections in isolation from the rest of our web application and not using WildFly everything seems to work ok.
The issue is if the connection fails when connecting from the WildFly container - the wildfly processing jumps to 100% CPU, and stays there. As of now this is 12 hours # 100% CPU on our test system - so it's not timing out, if indeed something should be.
Using JCIFS in isolation from our webapp and Wildfly the protocol, authentication and file not found exceptions are caught and logged and it does not cause the java process to consume loads of CPU like the other scenario.
If anyone has any advise regarding their own experience or approaches to troubleshooting I could take I would be very grateful.

Related

restart of tomcat makes application faster

We have hosted our java application in Linux server. We developed an java application using Spring Boot framework where we have used postgresql 9.5.15 as database. Java,tomcat and postgresql are installed in the linux server. We deployed our war file in the linux server. Initially the application runs fine and as time passes by the application gets slower. We checked the resources at that time and found out that some time cpu usage becomes high and other resources are normal. Also sometime outgoing traffic exceed 8 Mbps . The form load and other process get slower. Once the tomcat is restarted, then everything comes to normal. Application again becomes faster. We are unable to find out the problem. Is there any tomcat setting that can make our application run faster. Cpu usage graph is shown below:.

How to Block Bad User Agents (Malwares) in Wildfly?

I am using Wildfly 10.1.0.Final on the Ubuntu 16.04.02 LTS Server, I put the SSL from letsencrypt.org running with the H2 (HTTP 2) protocol and Spring Security 4.2.2.RELEASE in Production.
The server is working fine with a very good performance and is not slow but I'm getting many bug reports in the wildfly log of java.net.URISyntaxException (Error 500), from user agents like "Mozilla / 5.0 Jorgee".
I would like to know how I can block these type of bad user agents (malware, bots, etc) and(or) prevent this from happening.
Thanks in advance for all the help.
I had the same problem multiple times recently and the requests origin were random (Brazil, Germany, Argentine, US, Ireland...). I'm not sure if there is a way to blacklist these request within WildFly configuration however, you may want to consider to create a custom Java EE Filter.
The solution to my problem was to get a WAF in front of the CDN but if you don't have one you may want to add Nginx in front of your Web App and blacklist the user agent "Jorgee" as well as paths such as:
/2phpmyadmin/
/admin/phpMyAdmin/
...
You can find more info in this blog post by Kurtis Rader.

Deployed WildFly WebSocket Giving poor Performance in Openshift . Need to restart the application in Openshift Site

Deployed WildFly Websocket application OPENSHIFT . Everything was going good . But Sometime Websocket is not working properly. Then again Everytime i am logging in Openshift Site and Restarting the application. After that it's working fine. After sometime again websocket is not working . Please help me to solve this. How to keep the application always live in OPENSHIFT ??
You might try checking for Memory Limit Violations (https://help.openshift.com/hc/en-us/articles/202399600-How-to-check-for-memory-limit-violations). If you are using small gears you might be running out of memory, your application may require a medium or large gear to work properly. Especially if you are running WildFly + a database on the same gear. Also keep in mind that the JVM is allocated 1/2 of the available gear memory by default, you can read more about that here (https://developers.openshift.com/en/wildfly-jvm-memory.html)

openshift, Tomcat 7 (JBoss EWS 2.0) and neo4j

I run a Java EE application on openshift with a Tomcat 7 server, and using neo4j in embedded mode for the persistance layer. I am using the openshift free plan for now. Every now and then, the application stops, and i get a 503 error. I suspect they pause the gear if the application is inactive for some time, but the application never restarts properly.
I have logged in using ssh and inspected the logs in Tomcat, but found no errors. I suspect that neo4j does not get to call shutdown, but i guess it should still recover.
Any ideas? What should i inspect?
It the application isn't receiving any external requests for 48 hours it will then get idled. However the application will automatically be restarted once an external request is made. Also since you're using java and your database on small gear, check to make sure you aren't hitting any memory limits (https://www.openshift.com/kb/kb-e1082-how-to-check-for-memory-limit-violations).

Infinispan.war missing in 5.3.0.Final version

Hi I am trying to use infinispan as a remote caching solution and when following through the guide i see the following:
> This server provides easy to use RESTful HTTP access to the Infinispan
> data grid, build on JAX_RS. This application is delivered (currently)
> as a WAR file, which you can deploy to a servlet container (as many
> instances as you need).
I could not find the WAR in the 5.3.0.Final.
But i see that Infispan Server installation can serve as a Remote Data Grid, so is the REST interface included in the server installation with the latest release?
If yes
What server is it running on ?
Do we need licence to run the Server on enterprise level?
What is the good way to deploy it in any other Application Server?
Any help will be highly appreciated?
But i see that Infinispan Server installation can serve as a Remote Data Grid, so is the REST interface included in the server installation with the latest release?
We will be talking about this: https://github.com/infinispan/infinispan-server Answer is, I'd say, yes. When you will use Infinispan Server, you will have possibility of accessing Infinispan cache via REST endpoint. (see readme + see endpoint subsystem in, for example, standalone.xml configuration file) After start of this standalone server you can connect to http://127.0.0.1:8080/ (REST server) and start using it according to the rules described in the documentation.
What server is it running on ?
The whole Infinispan server is very based on JBoss AS. Imagine "big" JBoss AS minus all unnecessary systems, subsystems and functionality. This "little boy" is Infinispan Server which, for example, doesn't support deploying applications etc.
Do we need licence to run the Server on enterprise level?
No. This is open source project. If you still looking for "officially" supported version, I'd suggest you to check Red Hat's JBoss Data Grid solution, which is productized and supported Infinispan + Infinispan Server. See http://www.redhat.com/products/jbossenterprisemiddleware/data-grid/
What is the good way to deploy it in any other Application Server?
There is no such a way. As I mentioner earlier, Infinispan Server itself is standalone server which already contains everything you need for caching and running cluster of virtually 128 (or even more) nodes.
Any help will be highly appreciated?
Maybe. I can't answer this question properly :(

Categories

Resources