I am trying to deploy simple Spring Boot app on Jelastic. So I have created environment with Java 8, Postgres 9.5, Apache 2.4, deployed war-file and nothing works.
I receive the following error:
Proxy Error
The proxy server received an invalid response from an
upstream server. The proxy server could not handle the request GET
/localize/. Reason: Error reading from remote server
Apache/2.4.6 (CentOS) Server at node30... Port 80
It might be for the following reason: my server configurated on port 5555. However, I don't see any options that would tell Jelastic about the neccesary port.
Related
I've searched around so apologies if this is a repeat question:
A web service provider I work with has migrated to the cloud, requiring TLS connections.
My customer's (The web service consumer) java environment is setup with Tomcat acting as the container, connected via AJP to an IIS (v6) web server. The IIS server is where the Security is handled.
[Tomcat srv running WS Client] --AJP Connector--> [IIS server w/ SSL] ---> [Secure Web Service]
I'm trying to understand how to invoke the HTTPS connection from my app. From what I understand, the IIS server will create the HTTPS connection, but I don't have access to that certificate/keystore on the tomcat server (at least that's my understanding). Is there a way in java to invoke an HTTPS connection remotely so the IIS server can use it's certificate?
Any help would be appreciated!
I deployed a Spring Boot app on AWS Elastic Beanstalk. I am facing a 502 Bad Gateway error. I cannot find anything useful from the logs
/var/log/nginx/error.log
2019/02/10 02:12:54 [error] 3257#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: ...., server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "...."
I do not have any html files for front-end. I just want to upload deploy the api to share the documentation from swagger ui.
It's because server is listening to 5000, Adding "server.port=5000" to application.properties fixed the issue.
This happens because the application load balancer by default points to the Port 80 of the nginx server in EC2 instance. The nginx is configured to forward requests to Port 5000 by default, whereas out application server runs on Port 8080.
Default Nginx Configuration
Expected Nginx Configuration
This can be fixed using an environment property named PORT and pointing it to 8080
Go to configuration > Environment Properties and add the property
Refer AWS Document: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-nginx.html
Another option to fix this is to point application load balancer to the application server port(8080) directly instead of the nginx(80.
You can configure 8080 as the process port.
Another way to fix this would be to set port to 5000 in the spring boot application by using server.port property.
My issue was my Java version didn't match the platform I'm running with Elastic Beanstalk, even tho my server.port was on 5000. My Java version was 11, and my platform was only Java 8 for Amazon Linux. So changing it to 8 in my base pom.xml fixed it.
while deploying to a remote Glassfish 4.1 Server from Netbeans 8.0.1, i get a Timeout.
I configured the Glassfish Server by adding a new Server Instance and that seemed to work. I can see the applications running on the server and i am able to undeploy a application (directly from netbeans).
But when i try to deploy my application to the remote Server, i get a timeout Exception.
(i used enable-secure-admin to gain remote access from netbeans to the server)
What confuses me is, that when i enabled secure admin, i expected to see a https:// url in netbeans. But this url starts with http:// and i cant find an option to change this.
Server Attributes:
Host: [remote-ip]
DAS Port: 4848
Domain: domain1 (same as on the remote server)
Target: empty
Username PW : as set on the remote server
"Enable JDBC Driver Deployment" and "Preserve Sessions Across Redeployment" are checked
Could you please attach the logs.
most probably its issue with the grizzly jar.
Please try the patched grizzly jar and see if it works for you.
Checkout : https://java.net/jira/browse/GRIZZLY-1713 for the same
I built a web-service application using Jdeveloper 11.1.1.7 and deployed on weblogic 10.3.6 on physical server let us call it back-end server.
I do not want to give client direct access to back-end server so I make use of Apache 2.2 to be in the middle of client and back-end server. Apache 2.2 is configured on different physical server let us call it middle server.
I defined application's context root (which deployed in back-end server) on middle server in Apache httpd.conf file.
I shared WSDL file location to client ( WSDL URL which referring to the middle server domain name). The external client can access the URL thorug browser where he/she can see the WSDL content
But when the client trying send requests to middle server URL it get rejected with the following error:
[error] [client -clinet public IP goes here-] ap_proxy: trying POST /[application context root goes
here] at backend host '[back-end server local IP]/[port goes here]; got exception 'CONNECTION_REFUSED
[os error=0, line 1602 of URL.cpp]: apr_socket_connect call failed with error=730061, host=[back-end
server local IP], port=[port goes here]'
This error from middle server Apache error log file. No logs from back-end server
What is done so far:
I check the if I can access the middle server as external user using the telnet command. telnet IP port. It is working and the middle server is listening.
I also checked for all ports. between external client and middle server, between middle server and back-end server also using telnet. All ports working.
In this answer : ssl - Apache 2 with Weblogic Plug-in Redirection, original location still requested to backend - Server Fault
they are suggestion to increase the Accept Backlog value from weblogic server tuning . I did that in back-end server but still the issue is not resolved.
Problem resolved
I need to enable (WebLogic Plug-In Enabled) option from weblogic server where the application is deployed
from Domain Structure (Left Panel in admin console) - > Environment - > Servers -> (select the server where you deploy your application on it) - > General tab (from server setting)-> Advance - > (tic the option) WebLogic Plug-In Enabled
Then restarted the server.
By this your are telling the server you will get indirect request through proxy server or load balancer for example
You can do this on many level like cluster or server based on your needs check this site for more information
Understanding the use of “WebLogic Plugin Enabled”
I have this web-application hosted on Glassfish server which works fine if it is accessed directly on port 8080 over HTTP or 8181 over HTTPS.
In my production environment we have a front-end Webserver which is exposed over Internet.
It is Apache httpd service, which comes bundled with RHEL server. This web server redirects requests using mod_jk module to appropriate back-end Application server. So I have configured my Glassfish server to have a JKListener listening on port xxx and Web server is configured to redirect any requests for my new web application to Glassfish JKListener.
At first it seems working fine, redirect happens as expected. But soon my web application stops responding, and nothing happens till I restart Glassfish server.
On digging into logs of mod_jk I found following errors -
1 -
[info] ajp_send_request::jk_ajp_common.c [1234] (worker) all endpoints are dissconnected , detected by connect check [1], cping (0), send (0)
2 -
[info] jk_handler::mod_jk.c (2618): Service error=-3 for worker=worker1
[error] ajp_service::jk_ajp_common.c (2559): (worker1) connecting to tomcat failed.
[info] ajp_service::jk_ajp_common.c (2540): (worker1) sending request to tomcat failed
(recoverable), because of error during request sending (attempt=2)
[error] ajp_send_request::jk_ajp_common.c (1585): (worker1) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
[info] ajp_connect_to_endpoint::jk_ajp_common.c (959): Failed opening socket to (A.B.C.D:xxx) (errno=111)
First log item was also repeated many times when everything seems working fine
There was nothing available regarding this in glassfish logs, below are the details of environment
Front end web server :
RHEL 4.5, Apache Httpd 2.0.57
Web application server : RHEL 5.4 , glassfish 3.1.2.2
Web application - uses JSF 2.1, Primefaes 3.5, using Primepush for server sent events
Did you add your page exception to virtualhosts? Try this : http://www.codefactorycr.com/glassfish-behind-apache.html