Problem connecting in forest admin app (tested with mongodb and mysql)

Expected behavior

I’ve tried to connect the database, and I have stucked in this error:

I have tried all the tutorials, including the community issues reporting about this error, and can’t figure out what is happening.

Actual behavior

Error
Your admin backend is unreachable. Please check that it is running and respond to http://localhost:3310.

Context

Project is running on digitalocean server and loading the domain with 3310 port in my personal computer’s browser
running

I already tried to run the same command in the lumber that Forest gives me in the Npm package, and tried many variations:

– lumber generate “turtle-panel” --connection-url “mongodb://turtle:password@localhost:27017/turtle” --ssl “false” …

– lumber generate “turtle-panel” --connection-url “mongodb://turtle:password@localhost:27017/turtle” --ssl “true” …

– lumber generate “turtle-panel” --connection-url “mongodb://turtle:password@domain:27017/turtle” --ssl “true” …

  • Package Version:
    lumber is in the last version (3.8)

  • Express Version:
    node: v10.19.0
    npm: 6.14.4

  • Database Version:
    mongodb-server-core (1:3.6.9+really3.6.8+90~g8e540c0b6d-0ubuntu5)
    mysql Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

  • Project Name:
    Turtle-teste
    turtle-admin
    turtle-panel

Hi @Gabriel_Sorrentino,

The screenshot shows a development environment.
Development environments work locally (with the API running on your local computer).
Look at the screenshot: the toaster indicates it’s trying to connect to your API on the address ‘http://localhost:3310’.

Since your API is on a server (ense.com:3310), that is the reason for the failure.

A Forest project should be first used locally, and then deployed on servers.

1 Like

Hello @Sliman_Medini,

So, how can I use it locally?

I’ve tried to run curl http://localhost:3310 in my digitalocean VPS and it’s returning the page with “Your application is running!”.

I don’t know why the http://app.forestadmin.com/ can’t access it. I have tried to add the URL to the CORS in the env file, no success.

Thank you!

Hello @Gabriel_Sorrentino,

If you open a terminal on the machine you run your web browser and execute:

$> nc -vz localhost 3310

What is the result?
You should see:
Connection to localhost port 3310 [tcp/dyna-access] succeeded!
If you get:
nc: connectx to localhost port 3312 (tcp) failed: Connection refused
That means the server is not running on your localhost and ForestAdmin UI cannot access it.

You can also read this documentation about how installing forest on a remote machine.

Let me know if it helps :slight_smile:

Hello! I followed the exact same documentation that you passed, more this one:
https://docs.forestadmin.com/documentation/getting-started/installation
And have no success.

image
Connection to localhost, succeeded!

But when I try to connect it return the same message, I have put the password from my Forest Admin login.

Any suggestions?

Hi @Gabriel_Sorrentino,

Could you please share with us the detail fro the request that results in the shown error? (you should easily find it on the network tab of your browser’s console).

@anon37102731 of course!


image

image

Thanks!

So if you try to access in your browser http://localhost:3310 it does show the Your application is running ?

Do you have any plugin that could block requests ?

@vince
Yes, it shows Your application is running.

image

I’ve tried inside a chrome anonymous tab, that doenst have any plugins, and it showed the same error:

I don’t know what I do anymore :slightly_frowning_face:
I really need to use Forest Admin, and I want it to help scale my Startup.

What I meant is try to access http://localhost:3310 in your browser not from the console :wink:

One thing you could also try is that it seems you have a proxy, so when using the command generated during the onboarding of Forest Admin you could add --application-host=https://ense.com (Or whatever is your domain)

I dont understand how it would work, once I have the server running in my server that is in Digitalocean, I cant open a browser from there, and even if I could, it would work because the curl localhost:3310 is responding ok.

So you server is not on your localhost :sweat_smile: ?! My bad I did not saw that information :sweat:
This is your issue. Just do what I said before,

In the application-host just put your digitalocean server url and your new project should work :wink:

Thank you for your time @vince !
It worked with “https”

God bless you

2 Likes