Giter Club home page Giter Club logo

Comments (4)

neunhoef avatar neunhoef commented on June 14, 2024

I have to check but such a port redirect is clearly a severe bug in a multitude of situations, in particular with ArangoDB running in a container.

Am 14. Januar 2016 03:28:43 MEZ, schrieb Fabien Herfray [email protected]:

I'm currently using ArangoDB in my Docker system and I expose the admin
interface to the world through Nginx/Docker-gen (eg
http://arangodbfoobarcom)

The problem is that when ArangoDB is hit on /, it returns a 301 http://arangodbfoobarcom:8529/_db/_system/_admin/aardvark/indexhtml,
and I get obviously no response as nothing is listening on the port
:8529

Would it be possible for ArangoDB to keep the port on which it was hit
when sending a redirection ?
Or at least, would it be possible to override the listening port to set
it manually to :80 ?


Reply to this email directly or view it on GitHub:
#17

from arangodb-docker.

neunhoef avatar neunhoef commented on June 14, 2024

I had a look into this. If I start a docker image with ArangoDB locally with ArangoDB exposed on port 8530, say, by doing:

docker run -it -p 8530:8529 arangodb

Then ArangoDB rewrites the URL

http://localhost:8530/

to

http://localhost:8530/_db/_system/_admin/aardvark/standalone.html

so it does not, in fact, change the port, even if it believes to run on port 8529. I think this is the correct behaviour.

Therefore I suspect that the problem rather lies in your nginx setup. You seem to forward a request to http://arangodb.foobar.com:80/ to http://arangodb.foobar.com:8529, which is then in turn answered by ArangoDB. The Location header in the 301 response is sent back with that port and your nginx forwarding does not adjust this header on the way out. I currently do not see a way how we can fix this from within ArangoDB or within the docker container we build.

Can you please confirm that this analysis is right?

from arangodb-docker.

neunhoef avatar neunhoef commented on June 14, 2024

Checked with a colleague (thanks Willi!): Later versions of ArangoDB write a Location header that does not contain the host and port part but only the path. This change was done to prevent the sort of problems you have, since then it does not matter whether there is a proxy or not. This has been reported as arangodb/arangodb#1558 and was subsequently fixed. This change happened on Nov 4 2015 and will be in the imminent 2.8 release.

from arangodb-docker.

solher avatar solher commented on June 14, 2024

First of all, thanks for your quick answer.

I can't do a -p 8530:8529 as I don't want to map the port on my machine.
The point of Docker-gen is to be able to redirect from :80 directly to the IP address of the containers, without mapping them on the host.

The situation is, when I request http://arangodb.foobar.com:80, Nginx proxy passes it to the ArangoDB container on :8529 (as it is the exposed port).
Then Arango redirects me to http://arangodb.foobar.com:8529/_db/_system/_admin/aardvark/index.html where nobody is listening.

Oh, cool then. I'm really looking forward to try the 2.8 and the multi-collection writing AQL queries ;)
I am going to say goodbye to almost all my transactions.
Just out of curiosity, when are you planning to release it ?

from arangodb-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.