1Answer
  • 14
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Tomcat SSL not available outside

I do have a Tomcat8 server running, currently in the development environment. It's been working for a while on the port we have picked (8085) and was available outside of our network (unblocked on the firewall). Recently we have made decision to run https also. I did configure our certificate and added connector directive for SSL in server.xml.

Unfortunately it's not working as expected. SSL is working perfectly fine when I try to open it via remote desktop browser (in fact - on the localhost) it work both on https://localhost:8443 and https://domain.com:8443. Until this point everything works fine and as expected but when we try to access it from the other network it's not working, just gives a time out when we try to access https://domain.com:8443 but http://domain.com:8085 works just fine outside.

We did think that it might be something with our firewall although we have decided to disable it for a while and it's still not working.

Any idea what might cause it?

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector port="8085" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

    <Connector port="8443" 
        protocol="HTTP/1.1" SSLEnabled="true"
        maxThreads="150" scheme="https" secure="true" alias="tomcat"
        keystoreFile="c:/cert_pn_2015.p12"
        keystorePass="PASS" 
        keystoreType="PKCS12"/>

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.LockOutRealm">

        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>
    </Engine>
  </Service>
</Server>

You are redirecting 8085 to 8443 which gives me the idea that 8443 is closed. When it reaches 8085 tomcat redirects the traffic internally on 8443(acts like a proxy). Do a telnet on 8443 and you will find out.

Please have a look here https://tomcat.apache.org/tomcat-8.0-doc/config/http.html

  • 0
Reply Report

Trending Tags