redirect from URL to localhost:8443

29 views
Skip to first unread message

Timothy Divoll

unread,
Apr 30, 2025, 10:01:34 AMApr 30
to ERDDAP
Hello, 

I’m having a bit of trouble getting my deployment to work using Kubernetes with the latest axiom Docker image. After deploying, https://qa-erddap.riddc.brown.edu/erddap/ redirects to https://localhost:8443/erddap/index.html with a localhost refusal. I can access https://qa-erddap.riddc.brown.edu/erddap/index.html , but any downstream paths fail.

I’ve checked the Catalina and Tomcat logs as well as log.txt and the only thing I see that might be a lead is:
30-Apr-2025 09:33:26.496 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin Match [Server/Service/Engine/Host/Valve] failed to set property [requestAttributesEnable] to [true]

I also removed ‘redirectPort = 8443’ from my server.xml, but the redirects still happen. Has anyone experienced this or have any ideas on what might be happening?

Thank you, Tim 
Center for Computation and Visualization
Brown University

Roy Mendelssohn - NOAA Federal

unread,
Apr 30, 2025, 10:22:05 AMApr 30
to Timothy Divoll, erDDAP Bob Simons via
HI Tim:

This is beyond what I know much about, and I hav made certain those who can answer are aware of it, but usually it helps if you can provide more detail information on your setup and how you are proxying.

Thanks,

-Roy
> --
> You received this message because you are subscribed to the Google Groups "ERDDAP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to erddap+un...@googlegroups.com.
> To view this discussion, visit https://groups.google.com/d/msgid/erddap/45c8f4b4-bf9d-4b18-9e39-124ce51a1ee7n%40googlegroups.com.

Message has been deleted
Message has been deleted
Message has been deleted

Damian Smyth

unread,
May 1, 2025, 5:01:03 AMMay 1
to Timothy Divoll, ERDDAP

Hi Tim,

 

I suspect it maybe to do with the Environment variables and the Axiom ERDDAP container

 

See the Axiom docker erddap readme:

https://github.com/axiom-data-science/docker-erddap

 

 

I am not getting to use Kubernetes much myself lately, but have a look at the deployment yaml examples on setting environment variables here:

 

https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/

 

you might need to a define a few environment variables in your deployment.yaml

...

env:

    - name: ERDDAP_baseUrl

      value: https://qa-erddap.riddc.brown.edu

    - name: ...

  

 

Best regards,

Damian

 

From: erd...@googlegroups.com <erd...@googlegroups.com> On Behalf Of Timothy Divoll
Sent: Wednesday 30 April 2025 15:02
To: ERDDAP <erd...@googlegroups.com>
Subject: [ERDDAP] redirect from URL to localhost:8443

 

You don't often get email from timothy...@brown.edu. Learn why this is important

--

You received this message because you are subscribed to the Google Groups "ERDDAP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erddap+un...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/erddap/45c8f4b4-bf9d-4b18-9e39-124ce51a1ee7n%40googlegroups.com.


Marine Institute
The information contained in this email and in any attachments is confidential and is designated solely for the attention and use of the intended recipient(s). This information may be subject to legal and professional privilege. If you are not an intended recipient of this email, you must not use, disclose, copy, distribute or retain this message or any part of it. If you have received this email in error, please notify the sender immediately and delete all copies of this email from your computer system(s). Our Privacy Policy.
Foras na Mara
Tá an t-eolas sa ríomhphost seo, agus in aon cheangaltáin leis, faoi rún agus tá sé dírithe ar an bhfaighteoir/na faighteoirí beartaithe amháin agus níor cheart ach dóibh siúd é a úsáid. D’fhéadfadh an t-eolas seo a bheith faoi réir pribhléid dhlíthiúil agus ghairmiúil. Mura tusa faighteoir beartaithe an ríomhphoist seo, níor cheart duit an teachtaireacht seo, nó aon chuid di, a úsáid, a nochtadh, a chóipeáil, a dháileadh nó a choinneáil. Má fuair tú an ríomhphost seo go hearráideach, cuir an seoltóir ar an eolas láithreach agus scrios gach cóip den ríomhphost seo ó chóra(i)s do ríomhaire, le do thoil. Ár bPolasaí Príobháideachta.
Message has been deleted

Roy Mendelssohn - NOAA Federal

unread,
May 1, 2025, 3:02:30 PMMay 1
to ERDDAP, Timothy Divoll, Damian Smyth
Tim for reasons we are exploring was having problems posting to the group. As a followup, Damian’s suggestions (thanks Damian!) led him to the solution. He wrote:

"the solution was to use the ERDDAP_baseUrl and ERDDAP_baseHttpsUrl environment variables in my Kubernetes deployment file. The axiom Docker container looks for these and places the values in the setup.xml file and then both Kubernetes and the Docker container can use the environment variable”

Hope this helps anyone else trying a similar setup. Below is an image of the site, which has my interest because of what the group does.

-Roy

image.png

Timothy Divoll

unread,
May 1, 2025, 5:18:45 PMMay 1
to ERDDAP
Hi Roy, 

Thanks for the fast response. I'm also working my way through this and learning a lot as I go. From what I can tell, Kubernetes terminates SSL traffic and proxies to the docker container (axiom/docker-erddap:latest-jdk21-openjdk). I tried updating my server.xml Connector block as follows,  based on some other conversations I found in the Group: 

<Connector server="Apache" secure="true" proxyPort="443" port="8080" proxyName="https://qa-erddap.brown.riddc.edu" protocol="HTTP/1.1" scheme="https" executor="tomcatThreadPool" connectionTimeout="20000" relaxedPathChars="[]|" relaxedQueryChars="[]:|{}^\`&quot;&lt;&gt;" maxParameterCount="1000"/>

I've also added `RemoteIpFilter` to my web.xml, as suggested in this tutorial

Thank you, Tim

Timothy Divoll

unread,
May 1, 2025, 5:18:51 PMMay 1
to ERDDAP
Hi Roy, 

Thanks for the fast reply. I'm also learning a lot as I go and working my way through this, so appreciate the help from this group. From what I can tell, Kubernetes terminates SSL traffic and proxies to the Docker container (axiom/docker-erddap:latest-jdk21-openjdk).

I've updated my server.xml Connector block as follows: 
<Connector server="Apache" secure="true" proxyPort="443" port="8080" proxyName="https://qa-erddap.brown.riddc.edu" protocol="HTTP/1.1" scheme="https" executor="tomcatThreadPool" connectionTimeout="20000" relaxedPathChars="[]|" relaxedQueryChars="[]:|{}^\&quot;&lt;&gt;" maxParameterCount="1000"/>

I also updated my web.xml to include a RemoteIPFilter, as suggested in this tutorial: https://www.n0r1sk.com/post/nginx-reverse-proxy-with-ssl-offloading-and-apache-tomcat-back.

Thank you, Tim
On Wednesday, April 30, 2025 at 10:22:05 AM UTC-4 roy.men...@noaa.gov wrote:

Tylar Murray

unread,
May 1, 2025, 5:19:07 PMMay 1
to ERDDAP
When working with Axiom's docker image, I ran into a similar issue when trying to set BASEURL in the setup.xml. The issue was resolved when I switched to setting ERDDAP_baseurl in the docker-compose.yaml. Perhaps the baseurl in setup.xml is being overwritten by a default value when the ERDDAP_baseurl environment variable is not set.

Timothy Divoll

unread,
May 1, 2025, 5:19:07 PMMay 1
to ERDDAP
Hi Roy,

Thanks for the quick response. I'm also learning as I go, so I appreciate the help from this group. From what I can tell, Kubernetes is terminating SSL traffic and proxying to the Docker container (axiom/docker-erddap:latest-jdk21-openjdk). I updated my server.xml to remove the `redirectPort=8443` and add a proxyPort and proxyName: 

<Connector server="Apache" secure="true" proxyPort="443" port="8080" proxyName="https://qa-erddap.brown.riddc.edu" protocol="HTTP/1.1" scheme="https" executor="tomcatThreadPool" connectionTimeout="20000" relaxedPathChars="[]|" relaxedQueryChars="[]:|{}^\`&quot;&lt;&gt;" maxParameterCount="1000"/>

Thank you, Tim

On Wednesday, April 30, 2025 at 10:22:05 AM UTC-4 roy.men...@noaa.gov wrote:
Reply all
Reply to author
Forward
0 new messages