georchestra / datadir

geOrchestra configuration directory for generic wars & Debian packages (eg: /etc/georchestra)
7 stars 32 forks source link

Update gateway config #397

Closed f-necas closed 5 months ago

f-necas commented 5 months ago

Solves problem with redirections and geoserver proxyBaseUrl.

https://github.com/georchestra/georchestra/blob/master/docs/setup/tomcat.md#in-case-of-troubles-with-the-geoserver-ui

See :

landryb commented 5 months ago

oh, will check if that helps the issue i was seeing when testing in https://github.com/georchestra/ansible/issues/128#issuecomment-2012642332

landryb commented 5 months ago

i dunno about the magic yaml cloud dust behind, but this allows me to reach https://georchestra.example.org/geoserver/ behind the gateway (which itself is behind nginx only setting the Host header via proxy_set_header Host $host;), while previously i had a 302 to http://localhost:8380/geoserver/ - so .. thanks @f-necas :)

landryb commented 5 months ago

while here, should something be done about the geowebcache route ? it's not completely defined in the master branch thus gateway fails to start:

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'spring.cloud.gateway.routes[6].uri' to java.net.URI:

    Property: spring.cloud.gateway.routes[6].uri
    Value: "${georchestra.gateway.services.geowebcache.target}"
    Origin: URL [file:/etc/georchestra/gateway/routes.yaml] - 41:14
    Reason: failed to convert java.lang.String to @javax.validation.constraints.NotNull java.net.URI (caused by java.lang.IllegalArgumentException: Invalid URI syntax: Illegal character in path at index 1: ${georchestra.gateway.services.geowebcache.target})

Action:

Update your application's configuration
pmauduit commented 5 months ago

while here, should something be done about the geowebcache route ?

maybe add a georchestra.gateway.services.geowebcache.target: http://localhost:8280/geowebcache/ to the master branch of the datadir, routes.yaml file here: https://github.com/georchestra/datadir/blob/master/gateway/routes.yaml#L72

landryb commented 5 months ago

while here, should something be done about the geowebcache route ?

maybe add a georchestra.gateway.services.geowebcache.target: http://localhost:8280/geowebcache/ to the master branch of the datadir, routes.yaml file here: https://github.com/georchestra/datadir/blob/master/gateway/routes.yaml#L72

also works, gateway starts fine with:

diff --git a/gateway/routes.yaml b/gateway/routes.yaml
index e320915..2a757ae 100644
--- a/gateway/routes.yaml
+++ b/gateway/routes.yaml
@@ -70,6 +70,7 @@ georchestra.gateway.services:
   datafeeder.target: http://localhost:8480/datafeeder/
   datahub.target: http://localhost:8280/datahub/
   geonetwork.target: http://localhost:8280/geonetwork/
+  geowebcache.target: http://localhost:8280/geowebcache/
   geoserver.target: http://localhost:8380/geoserver/
   header.target: http://localhost:8280/header/
   import.target: http://localhost:8280/import/

and that allowed me to see that gwc still had the old header in https://github.com/georchestra/georchestra/blob/master/geowebcache-webapp/src/main/java/org/georchestra/geowebcache/GeorchestraGeoWebCacheDispatcher.java#L58 .. sorry :D

pmauduit commented 5 months ago

sorry :D

grmbl :smiling_imp:

landryb commented 5 months ago

gw startup fixed with 2b01654 - afaict for me this is ok to merge.

github-actions[bot] commented 5 months ago

💔 All backports failed

Status Branch Result
docker-master Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 397

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details