Opening Foxx API to local network

122 views Asked by At

I have setup serverend points they work for the web interface fine but the api endpoint for my for app do not even give a error and does not time out. I have tried turn the app to production mode in the web interfaces no joy. I look at the doc for server setup but can find any thing to help.

So I would think their is configure issue where should I look?

On localhost ever thing works. On remote host where using 168.192.0.15:8530 only web interface works not my api form either curl or may app

2

There are 2 answers

1
kevin On BEST ANSWER

So I have learn the issue is the api endpoint url is not the same on localhost at their are from outside. Example:

curl -X GET --dump -  http://localhost:8529/broad/broad/login
curl -X GET --dump - http://192.168.0.15:8530/_db/_system/broad/broad/login
2
stj On

Without further information I can only guess what the problem is, but I'll try:

The default --server.endpoint configuration value for an ArangoDB server is tcp://127.0.0.1:8529. That means you will be able to access it from the local machine but not from other hosts.

To make the server respond to HTTP requests originated from other hosts, you will need to use an endpoint that includes the server's IP address as used in your network, e.g. tcp://192.168.173.13:8529 and restart it with the adjusted configuration.

If that's not working either, can you trying calling the target URL from another server via curl and check the server's HTTP response code. This might reveal the source of the problem, too. Note that you should invoke curl with the option --dump - to see the HTTP response code. For example:

curl -X GET --dump - http://192.168.173.13:8529/your/app 

If that is not producing any results (i.e. no response at all), you might have a firewall in between that blocks requests. Probably you need to allow access on the port ArangoDB uses (8529 by default and used in my example).