Northstar Update to Debian 11.2

    Version as of 20:23, 3 Nov 2024

    to this version.

    Return to Version archive.

    View current version

    The OS was updated to Debian 11.2 on Jan 19th 2022

    NorthStar did not run out of the box after the update. Neccesary fixes:

    Issue: enable ajp on Port 8019

    in server.xml (/etc/tomcat9/server.ml)

        <Connector protocol="AJP/1.3"
               address="0.0.0.0"
               secretRequired="false"
               port="8019"
               redirectPort="8443" />
    

    restart tomcat9 and apache2

    check that ajp is listening on port 8019:

    netstat -tunlp | grep 0.0.0.0:8019
    tcp        0      0 0.0.0.0:8019            0.0.0.0:*               LISTEN      65868/java
    

    Pointing browser to https://northstar.mpifr-bonn.mpg.de/ should now work (default tomcat start page)

    Issue: enable astron login authentication module

    in /etc/default/tomcat9 include

    -Djava.security.auth.login.config=$CATALINA_HOME/conf/astron.login
    

    in the JAVA_OPTS directive

    cp /usr/share/tomcat8/lib/astron-loginmodule.jar /usr/share/tomcat9/lib/
    

    in /etc/tomcat9/server.xml change the default Engine:

        <Engine name="Catalina" defaultHost="localhost">
          <Realm className="org.apache.catalina.realm.LockOutRealm">
            <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                   resourceName="UserDatabase"/>
          </Realm>
            <Realm appName="AstronLogin" className="org.apache.catalina.realm.JAASRealm" debug="99" roleClassNames="nl.astron.security.loginmodule.AstronRolePrincipal" userClassNames="nl.astron.security.loginmodule.AstronPrincipal" />
          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">
            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    
            <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>
    

    Restart of tomcat9 should throw no errors

    Issue: adapt context.xml

    in /etc/tomcat9/context.xml enter

        <Resource auth="Container" name="mail/Session" type="javax.mail.Session" mail.smtp.host="127.0.0.1" />
        <!--<Resource auth="Container" name="mail/Session" type="javax.mail.Session" mail.smtp.host="127.0.0.1" testserver="localhost" testmail.to="hrottmann@web.de"/>-->
        <Resource auth="Container" name="jdbc/useradministration" type="javax.sql.DataSource" maxTotal="100" maxIdle="30" maxWaitMillis="10000" username="northstar_user" password="i6bgXTVBAtWhLSTEM5jLND1Hw4vPW37j" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/useradministration"/>
    

    in the <Context> area

    restart tomcat9. It should start without errors

    Issue: adapt catalina.properties

    TBD:

     

    Issue: copy webapps

    rsync -av ../tomcat8/Catalina/localhost/* Catalina/localhost
    chown :tomcat  Catalina/localhost/*
    cp /var/lib/tomcat8/webapps/*.war /var/lib/tomcat9/webapps/
    cp /usr/share/tomcat8/lib/log4j.properties /usr/share/tomcat9/lib/
    cp /usr/share/tomcat8/lib/commons-logging.jar /usr/share/tomcat9/lib/
    cp /usr/share/tomcat8/lib.55/* /usr/share/tomcat9/lib/

    restart tomcat9