I have deployed my Rest web services based SpringBoot java application in AWS EC2 server. Its deployed in Apache Tomcat server.
Client-side Angular4 application also deployed on the same server.
When I use a web browser from my desktop it works fine. I can see the logs are writing immediately in the server console.
But when I hit from a mobile browser I don't see any hit and logs in the server console for few minutes. But after a few seconds/minutes, I can see the logs writing on the server.
So what is wrong why it is getting delayed to reach my server from mobile browser?
Related
I have made a UI5 application that uses an OData service pointing to SAP Gateway. This works correctly, however, I am noticing that if the app is left idle for a period of time (approx 10 mins), then the app suddenly starts getting the following error when trying to use this service:
"HTTP Status 503 - No application is available to handle this request"
Does anyone know why this could be happening and what I could do to fix this?
This is happening when running the app from the Web IDE.
As you have included "sap-web-ide" tag in your question, I assume this timeout happens during development when you run your app from web ide.
This is the timeout session from SAP Web IDE. Once time runs out, any call to the SAP Cloud Platform (including the one using a destination for your SAP Gateway system) will fail because your must reauthenticate (that can be done by refreshing the page).
If you deploy your app to SAP Cloud Platform or to your SAP Gateway system this short timeout won't happen.
I would like to know if there is any difference in hosting REST web service APIs in a web server or application server, is there any reason one is preferred over the other?
So i think you are confused about what are application servers and web servers.
Application Server is the name of a machine/server which is running any application used by an organization and it depends of any other servers to run the application functionalities correctly, like Database Servers, Caching Servers and other kind of servers.
Web server is a software which puts an application online for being accessed by clients through the web.
An application server commonly has a web server running inside it, as part of a stack needed to run the application in the server, like libraries and other sofwares need to execute the application objective.
So you can run a REST api inside of an application server with help of the web server application.
Some examples of web servers are Apache, Nginx, LightHttpd, etc.
We are developing an application using Spring Boot plus Spring web starter. We use Go Pipeline and Parallel Deployment feature of Apache Tomcat 7 to deploy war file to a standalone Tomcat Server. ref
When running the application we can see the logs loading controllers, services and requests, etc.
Once the container is up, the initial requests occasionally lead to an ugly 404.
However, this is an intermittent behavior. Once you refresh browser, subsequent request works.
We wonder what could be the root cause of the intermittent 404 response.
I have one application deployed on Google App Engine and another application hosted on my local machine on top of tomcat.
So my question is , can we reach the application on the tomcat ( App URL http://localhost:8080/xyz) from the Application which is hosted on Google App Engine.
App Engine applications can communicate with other applications or access other resources on the web by fetching URLs. An app can use the URL Fetch service to issue HTTP and HTTPS requests and receive responses. The URL Fetch service uses Google's network infrastructure for efficiency and scaling purposes.
So, yes, you can access your Tomcat application running on-premises using AppEngine's URLFetch class. It is available for all sandbox supported languages such as Python, Java and Go.
Here is simplified example with Python:
from google.appengine.api import urlfetch
url = "http://my-tomcat-app.com/"
result = urlfetch.fetch(url)
if result.status_code == 200:
doSomethingWithResult(result.content)
I'm creating an application (with the Desktop Browser web page environment) using Worklight 6.0. My problem is this: my application only works in either HTTP or HTTPS but not in both.
When I tried to run my app, it returns:
The application failed connecting to the service
How can i build my app for both, and deploy it? because I want to put this app on the Facebook canvas, but it only works on HTTP or HTTPS.
It's not the application or the environment you've added to your application, but the server. Requests from the Worklight Server are either HTTP or HTTPS, they cannot be both.
But IMO this is irrelevant. I think the correct approach is to put Apache or alike in-front of Worklight (or WebSphere, in your case, which hosts Worklight Server since you've deployed it there), and its job is to handle incoming and outgoing connections - be it HTTPS or HTTP.
That said, AFAIK in Facebook only HTTPS should be used.