There is a tomcat6 server which is enabled for https access on port 8443 with settings on <connector>
tag of server.xml file. It is as shown below:
<Connector port="8443"
SSLEnabled="true"
maxThreads="150"
minSpareThreads="25"
maxSpareThreads="75"
enableLookups="true"
disableUploadTimeout="true"
acceptCount="100"
debug="0"
connectionTimeout="60000"
scheme="https"
secure="true"
clientAuth="false"
sslProtocol="TLS"
keystoreFile="/etc/tomcat6/.keystore"
keystorePass="changeit"
/>
I am trying to access port 8443 with https on a remote machine using this server via java code. I am getting java.net.ConnectException: Connection refused
on catalina.out log. This exception is generated on the line connection.getResponseCode();
of the java code. It seems that the port is not open on the remote machine. I am able to access port 8443 on the server itself without any exception. Remote machine has no tomcat installed.
I want to open that port on the remote machine for https access by the java code. I am using ubuntu server 10.04 LTS as both server and remote machine. I cannot use firewalls(ufw or iptables due to restriction). I can use stunnel4 on both the machines.