1

I'm trying to use firebase cloud functions to host an API which communicates with an Arango database.

I'm using arangojs to connect but I get the following errors when I try to access my database.

I tried with IP address and with a url (which points to the same IP address) and got two different results:

With IP address

Timedout details

With a URL

NotFound detailss

Here's the code to connect:

const db = new Database({
  url: "http://XXX.XXX.XXX.XXX:YYYY"
});
db.useDatabase('MyDBName');
db.useBasicAuth("myuser", "mypassword");

Note that in the URL case, the IP address is replaced with a url...

Have you got an idea of the problem?

Thanks

pderuel
  • 51
  • 4
  • 2
    Do you have a billing account attached to your Firebase project? Without one, you'll only be able to connect to Google services. https://firebase.google.com/pricing/ – Jeff Feb 21 '18 at 21:15
  • 1
    I just checked the logs again and I think you're right => Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions I'll try again when my billing account will be configured and I'll let you know. Thanks for your help! – pderuel Feb 21 '18 at 21:58

1 Answers1

1

Might be worth checking your firewall settings on the server where ArangoDB is Installed, often this is overlooked.

For CentOS 7.X (which is what I use), you'd do the following:

firewall-cmd --zone=public --add-port=8529/tcp --permanent
firewall-cmd --reload

Funnily enough happened to me quite a few times.

If this doesn't work, can you place a simple DB connection script on the same same instance as ArangoDB to see if it's connecting locally?

itsezc
  • 692
  • 2
  • 7
  • 20
  • I don't think that it could be linked to the firewall, before using firebase cloud functions I was developing an standard node.js rest api and I was able to connect to my db server. Thanks for your help! – pderuel Feb 21 '18 at 21:56