Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gateway config #397

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Update gateway config #397

merged 2 commits into from
Apr 11, 2024

Conversation

@landryb
Copy link
Member

landryb commented Apr 9, 2024

oh, will check if that helps the issue i was seeing when testing in georchestra/ansible#128 (comment)

@landryb
Copy link
Member

landryb commented Apr 9, 2024

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
Copy link
Member

landryb commented Apr 9, 2024

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
Copy link
Member

pmauduit commented Apr 9, 2024

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

@f-necas f-necas requested a review from landryb April 9, 2024 13:28
@landryb
Copy link
Member

landryb commented Apr 9, 2024

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
Copy link
Member

pmauduit commented Apr 9, 2024

sorry :D

grmbl 😈

fixes gateway startup with a datadir from the master branch
@landryb
Copy link
Member

landryb commented Apr 9, 2024

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

Copy link
Member

@landryb landryb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't comment on the yaml magic but it works !

@f-necas f-necas merged commit c290766 into master Apr 11, 2024
Copy link

💔 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants