Spring : No connection could be made because the target machine actively refuse it - rest

I have developed SFTP, MQ using Apache Camel + Spring DSL and restful web service. For Restful Web service , I have used Spring MVC restful. I am getting below message when I call my web service.But, I verified that MQ is partially working fine without restart the server, but data is not updated in DB, messages are coming to server folder. After restart the server, spring MVC restful is working fine. But, using ps-ef command verified that server is up.
please guide me where the issue is.
web.xml
i have configured dispatcher-servlet.xml for Spring MVC restful
I am using jetty server(version:8).I think after 2 days if there is no hit in server. it become idle or something. please help.
Exception
The connection to 'SYSTEM ADDRESS' failed. Error: ConnectionRefused (0x274d). System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it IP:PPORT

Related

Localhost Spring Boot service not found

I am studying Spring Cloud and I am developing a study project.
I create a project that represents a simple REST API using Spring Boot and I run this in localhost.
I also created another project API Gateway, this one gets the request coming and calls the REST API, I am also running this one in localhost.
When I run the REST API and send a request to it, it responds properly, but if I send the request to API Gateway when API Gateway tries to call the REST API using RestTemplate it is getting this exception:
java.lang.IllegalStateException: No instances available for localhost
Both services are running in localhost.
Do anyone knows what is the cause of this error?

Integrating Hazelcast with a web application running on tomcat with MongoDB as backend

I want to integrate Hazelcast with a web application running on a tomcat server. The backend is MongoDB. So far I have managed to integrate MongoDB with Hazelcast how do I integrate it with tomcat so that changes made to the DB through the UI can be seen in the IMaps used when i do a get call.
Not every get call will load from DB, only those keys that are not present in Hazelcast cluster will be loaded from the DB.
As for integrating with a web server, not sure what you meant there because the code that loads from DB runs on Hazelcast server. An application, whether it is a simple public static void main(...) or a web app running in a container or a web server, is a client to Hazelcast server - means, you will be required to use client proxies to connect to servers.

Increasing GWT Timeout on JBoss Server

We are working on a GWT based web application hosted on JBoss 5.2.0.1. We are using Java/Spring on the server side.
One of the Async services takes more than 5 minutes to return the response from the server, and this leads to error (on production environment):
com.google.gwt.user.client.rpc.StatusCodeException: 504
Gateway Time-out
The gateway did not receive a timely response from the upstream server or application.
The issue doesn't occur when the JBoss is hosted on my local machine. I am suspecting this is some server side setting on production environment which is causing the timeout.
I referred to a couple of questions on SO and the solutions are related to setting timeout with RequestBuilder.setTimeoutMillis(). However, I am not completely convinced that this is related to changes on client side (since the code works fine on my local, where only JBoss configuration may differ from the production)
Any pointers are appreciated. TIA.
It turned out that the there was a timeout set on the gateway. The gateway would return HTTP 504 error in case there is no response returned by the server withing the set timeout (which was 5 minutes)

How do I troubleshoot a 404 error on a webapp accessed via apache vhost?

In my development system ( macos ) I have a webapp running in a jetty container on port 8080
Part of this webapp is a REST service
I can hit the REST service as follows
curl http://fake.hostname.com:8080/find/http%3A%2F%2Fwww.nfl.com
and I get the expected JSON result from this call.
Because on the server I am deploying on, I have an apache front end using ajp to route to tomcat, on my dev system I have an apache vhost routing to port 8080. This helps with testing some oauth dependencies where facebook redirects to a specific host URL.
The webapp works fine in this configuration except when I try and hit the service using
curl http://fake.hostname.com/find/http%3A%2F%2Fwww.nfl.com
Nothing is showing up in the jetty console reporting a proplem and I am getting a 404 response from apache.
Can anyone suggest how to troubleshoot such an issue? Or things I should look at?
note 1. I know the issue of using apache as a proxy to tomcat or jetty is contentious but given there are other apps already living on apache port 80 I’m not willing to run tomcat in its place.
note 2. the webapp is in scala using the lift framework.
Not really an answer to the exact question, but did you consider to use nginx as a proxy+load balancer? It's a de-facto standard, as far as I know.
Also, what's in the logs? tomcat-s logs, apache logs..

Asp.net 3.5 Deployment issue

For deploying my website in server by using IIS 5.1,,i created virtual directory,,i browsed in to my application and selected
asp.net 2.0 tab(application is framework3.5)..I reset framwork configuratio 2,0 Runtime security Policy Enterprise,Machine,User
tab,,What ever things i can do i did
Still also application is working properly,,but i am not able to deploy it in IIS
i am getting this error
If i browse Login.aspx i am getting
**
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
**
Is it with IIS 5.1??
Here my machine is acting as server ,It has xp professional 2002 service pack 2 and IIS 5.1
Any body knows how to create application pool in IIS 5.1
I don't think you can ... Creating Application Pools in IIS
IIS 5.1 and earlier: The AppCreate3
method, the IIS WMI provider, and
Application pools are not available,
and therefore this topic does not
apply.