Comments (4)
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
:8529Would 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.
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.
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.
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)
- ENV options set to 0 have opposite effect
- Upgrade base image for alpine docker images
- [QUESTION] How to create database with docker-compose ?
- Folder Permission in Alpine images are not root group writeable HOT 2
- signals not handled in entrypoint
- Enabling experimental naming conventions HOT 2
- Docker image 3.8.6 ARANGO_ROOT_PASSWORD HOT 3
- ArangoDB 3.10? HOT 2
- Customize web interface appearance?
- Vulnerabilities in /usr/bin/arangodb HOT 18
- Cannot set tolerations/nodeSelector for temporary arangodb-cluster-id pod HOT 9
- Trivy findings in latest version HOT 3
- Vulnerabilities with image on DockerHub HOT 2
- Run crashes on macOS Ventura 13.5 HOT 10
- ARANGO_NO_AUTH still disables auth if set to 0
- /usr/sbin/arango-init-database failed with invalid value for '--rocksdb.max-background-jobs') = 95 HOT 1
- Let service run as application user instead of root user HOT 2
- [Question] Enter docker container HOT 3
- Can't I put haproxy in front of arangodb? HOT 2
- [QUESTION] Apply database and user creation during container build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arangodb-docker.