# AWS EC2 - GET http://localhost:3310/forest/healthcheck net::ERR\_CONNECTION\_REFUSED

**URL:** <https://community.forestadmin.com/t/aws-ec2-get-http-localhost-3310-forest-healthcheck-net-err-connection-refused/1532>\
**Category:** Help me!\
**Created:** [December 30, 2020, 3:40pm UTC](https://community.forestadmin.com/t/aws-ec2-get-http-localhost-3310-forest-healthcheck-net-err-connection-refused/1532 "2020-12-30T15:40:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louie\_Heaton](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louie_heaton/32/1271_2.png) [@Louie\_Heaton](https://community.forestadmin.com/u/Louie_Heaton)\
**Post date:** [December 30, 2020, 3:40pm UTC](https://community.forestadmin.com/t/aws-ec2-get-http-localhost-3310-forest-healthcheck-net-err-connection-refused/1532/1 "2020-12-30T15:40:58Z")

</div>

Hi there!

I’m trying to set up a ForestAdmin environment but not succeeding very well. I currently have the database stored as an RDS instance on AWS and then I’ve setup an EC2 Instance linked to the RDS so it can access it to run the ForestAdmin App. Great, it runs. What’s not great is I can’t login to the dashboard at [http://app.forestadmin.com/](http://app.forestadmin.com/) - I did have a look through the forums and though it was a CORS issue but I set the orgin to all to see if it has fixed it but no luck. When I go to the forest admin app, in the console I get this error

`GET http://localhost:3310/forest/healthcheck net::ERR_CONNECTION_REFUSED`  
and  
`POST http://localhost:3310/forest/sessions net::ERR_CONNECTION_REFUSED`

So I went back to my server screen and tried restarting the app but still no luck. If I go to {mypublicip}:3310 the screen it displays is the lumber ’ Your application is running! ’ and I can see the requests within the application here.

`Your application is listening on port 3310.`  
`Your admin panel is available here: https://app.forestadmin.com/projects`  
`GET /forest/sessions 404 154 - 10.065 ms`  
`GET /forest/sessions 404 154 - 3.444 ms`  
`GET /forest/healthcheck 200 - - 1.666 ms`  
`GET /forest/healthcheck 200 - - 1.012 ms`  
`GET /forest/healthcheck 200 - - 0.903 ms`  
`GET /forest/healthcheck 200 - - 0.923 ms`  
`GET / 304 - - 2.351 ms`  
`GET / 304 - - 0.964 ms`  
`HEAD /forest/sessions 404 155 - 1.163 ms`  
`HEAD /forest 204 - - 0.826 ms`  
`HEAD /forest/healthcheck 200 - - 0.797 ms`

I’m really not too sure what to do from here. If anyone has any ideas could you let me know 👍

Thanks,  
Louie.

- Project Name: UEG Admin

**EDIT**

Running  
`curl -I http://localhost:3310/forest/healthcheck`  
Returns

```javascript
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Vary: Origin
Access-Control-Allow-Credentials: true
Date: Wed, 30 Dec 2020 15:44:32 GMT
Connection: keep-alive
Keep-Alive: timeout=5

```

Running  
`curl -I http://localhost:3310/forest`  
Returns

```javascript
HTTP/1.1 204 No Content
X-Powered-By: Express
Access-Control-Allow-Origin: *
Date: Wed, 30 Dec 2020 15:46:19 GMT
Connection: keep-alive
Keep-Alive: timeout=5

```

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [December 30, 2020, 3:58pm UTC](https://community.forestadmin.com/t/aws-ec2-get-http-localhost-3310-forest-healthcheck-net-err-connection-refused/1532/2 "2020-12-30T15:58:25Z")

</div>

Hi @Louie_Heaton and welcome in our community 🍾,

So if I summarise you just tried to install Forest Admin on a remote server but got that error.  
You never created a Development environment before, right ?  
If that’s the case this just mean that you created your environment on localhost while it should be the url of your EC2 instance.

To fix that you have 3 solutions:

- Hide the login popup (By editing the html)
- Access your project settings
- Go to environments tab
- Select your environment
- Update the url of your environment
- Refresh

Second solution:

- Create a new project
- When you see the generated command, there is a `--application-host` and `--application-port` replace them by the correct value

Third solution:

- Create a new project
- Install on LOCAL, not on a remote
- Test the app
- Go to project settings
- Go to environments tab
- Create a new remote/production environment
- Follow the steps

I strongly suggest the last solution 😉 which is way more simple in my opinion

Hope that helps you 🙂

---

<div class="post-metadata">

**Author:** ![Louie\_Heaton](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/louie_heaton/32/1271_2.png) [@Louie\_Heaton](https://community.forestadmin.com/u/Louie_Heaton)\
**Post date:** [December 31, 2020, 2:44pm UTC](https://community.forestadmin.com/t/aws-ec2-get-http-localhost-3310-forest-healthcheck-net-err-connection-refused/1532/3 "2020-12-31T14:44:26Z")

</div>

Thanks @anon62739609!

I actually ended up assigning the EC2 instance to an Elastic IP and then to a Load Balancer then linked the Load Balancer to a domain endpoint and used ACM to activate an SSL certificate for it to be able to use it securely. I then closed the login form through HTML and then adjusting the environment URL within the backend and it worked!
