Glassfish javamail error - glassfish

I have an application that sends mail using glassfish javamail configuration. the application was designed on my laptop an deployed on a server which connects to the web using a proxy connection. The email is sent without errors on my laptop (Which is connected to the web via wifi) but when I try Sending on the server, i get the following error:
Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1
the pictures below show the glassfish javamail configuration on the server

Related

Show Maintenance "Custom Message" to end User if server stops/down in payara

My web application developed using (GWT/J2EE stack) is deployed on Payara glassfish server and its on production server. We frequently stops the server for maintenance like 'fixing bugs/for enhancement/upgrading'. If the end user try to access the web application and server is down it shows
"This site can’t be reached"
Is it possible to show the Custom message like Server is down for maintenance to end user? any thoughts/suggestion on this.
This isn't related to Payara Server. If any server is down, it can't serve requests. The browser doesn't receive any reply and prints "This site can't be reached".
If you want to have control over what browsers display, you need to set up a proxy server that serves the requests and forwards them to Payara Server (e.g. Apache HTTP server or Nginx). ANd you have to configure it to return a response with a custom message if Payara Server is down.
To see how to set up a proxy server with Payara Server, have a look at these guides:
Apache server with Payara Server
Nginx with Payara Server

IntelliJ error: "Empty response from server" - Run/Debug Configuration for a remote GlassFish

I am trying to associate my remote glassfish 5.1 server with my IntelliJ IDEA 2020.1
but I am getting the error:
Error running 'GlassFish 51': Unable to connect to the example.com:4848, reason: com.intellij.javaee.process.common.WrappedException: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Empty response from server.
The remote server is being running and it is possible to open a Glassfish remote admin console at an address example.com:4848 . These are my settings:
(The blured host name is a domain name of my remote server. Say example.com)
Username and Password on the first picture are the same that I successfully use when entering the Glassfish remote admin console.
How to enable the connection? I can add more screenshots of the configuration and add more information when needed.
The solution was to turn on an option Use SSL connection. Strange but helped. I did not do anything about SSL at that web server. The urls are of an http type, not https...

JCosole can't connect to glassfish / change address of http listeners

I run a FreeBSD 11.0 server at home, in my private network. I wanted to learn some Java EE, so I installed GlassFish 4.1 at the server. After creating a domain (domain1), I wanted to login in via JConsole. But I get this error message "Connection failed: non-JRMP server at remote endpoint". The ip of the server is 19.168.178.91, so I tried to connect to "192.168.178.91:8686" is that roight?
My other issue is, in the book, which I'm using, they install glassfish at the same machine, which is used use to programm, so they changed the address of the three http listeners, of the IIOP-listener and of the jmx-connector from 0.0.0.0 to 127.0.0.1. Should I change it to the ip of the server or just leave it like it is?
Thank you in advance

SSL handshake failure Server [FIN, ACK] after Client Hello

Our company currently have an application created in VB6 running on a Windows 7 desktop computer. This application needs to connect to a web service using HTTPS.
For some reason this application can not connect to the target server. The target server is behind an Apache web server that also acts as a load balancer.
I traced the connection via wire shark and it seems that after the Client Hello the server responded with [FIN, ACK] than a Server Hello. Can anyone tell me what the problem is.
Client Hello & Server [FIN, ACK]
[![Client HEllo][1]][1]
[1]: https://i.stack.imgur.com/btXyX.jpg
[![enter image description here][2]][2]
[2]: https://i.stack.imgur.com/O5WDq.jpg
However, we can connect successfully in the following scenarios
If we use the same application under Windows 10. Please note when using Windows 10 our SSL version is TLS1.2.
If the application connect directly to the Application Server instead of the Apache Web Server. In this case our SSL protocol is still TLS1.0
I am guessing that we need to configure the Web Server to allow our application to connect. Our Administrator told us they already activated the TLS1.0 protocols so I am not entirely sure what is wrong now.
Why the server closed the connection, or any ideas what part of the logs or Web server configuration should I check to find out?
Please note that we are aware that we are using TLS1 protocol for this connection but this application is only for internal use and its replacement is already in development. However, there is a business need to make this work for the current environment.
In the case the Server doesn't support any of the Cipher-Suites suggested in the "Client Hello" packet, it may just close the connection.
You can check what is the returned Cipher-Suite in the case it works (when you use Windows10) and then investigate how to enable this Cipher-Suite in Windows7

Why aren't HTTP Headers from Oracle Access Manager passing through to WebSphere from IHS?

I have a IBM HTTP Web Server setup as a reverse proxy for a WebSphere application server. We use Oracle Access Manager for user authentication. There is also a Oracle Webgate running on the IHS server to intercept the requests and check them against the Oracle policy.
I can see the authentication going through and Oracle passes back the value needed in an HTTP Header, OAM_REMOTE_USER. The problem is, at some point in the process, that header is not passed on to the WebSphere Application Server.
The Oracle Webgate is monitoring port 8443, but I am not understanding if that means for the Web Server or the App Server since both are on the same physical machine and have the same server name. If I just create a virtual host on the Web Server for 8443 and do not create the port on the App Server, the headers are going through correctly. The problem with this is that I have to use PreserveProxyHeader for the request to go through the WebGate 8443 port, so after authentication it comes back looking for my Application on port 8443, which does not exist on the Web Server. The only way it can find my application on port 8443 is if I also add a port on the App server for that port, which contains the application.
I guess the main thing I am struggling to understand is if I need to define the port Webgate monitors on the HTTP Server and App Server, or if it should only be on the HTTP Server side. It seems like no matter what I do, at some point the request gets redirected from the HTTP Server to the App Server and strips out any OAM HTTP headers that were there. I've managed to prevent them from dropping by removing the 8443 port from the app server, but now my app cannot be mapped to.
This is WebSphere App Server 8.0 and IBM HTTP Server 8.0.0.5.
In the administrative console, click Servers > Server Types > Web servers > web_server_name > Plug-in properties > Request routing. Disable "Remove special headers". Regenerate your plugin configuration XML, and redistribute it.