"Forest Admin can't reach your agent; please ensure that it's running."

Feature(s) impacted

I have followed the instructions to start the development server and it starts locally.

Observed behavior

When I switch to the development environment I get the error “Forest Admin can’t reach your agent; please ensure that it’s running.”

Expected behavior

I was expecting to be able to edit the development environment.

Failure Logs

Context

  • Project name: Cerebro2
  • Team name: Praxis Labs
  • Environment name: Windows
  • Agent technology: (nodejs, php, rails, python): ?
  • Agent (forest package) name & version: forest-cli/5.3.0 win32-x64 node-v20.18.0
  • Database type: MongoDB
  • Recent changes made on your end if any: Installed development environment

Hello @Janet_Gilbert

Thanks for reaching out to the community support.

As you are in a Cloud project, the setup was minimised to reduce friction as much as possible, the environment is configured to reach localhost:3310 which is the default port the local development agent should listen on.

Are you facing an issue or constraints that required you to change the default port of your local development agent ?

Best regards,

I think we are using 3310 for something else. How can I get it to look for the 3351 port?

There is no access via button in the UI to reach the configuration screen of your development environment as it was designed to show/provide an experience as minimalistic as possible.

However you can still access the configuration screen of your development environment by following this link.

I will see if we can at least provide a quick access button when the UI cannot reach the agent as to allow users to configure it.

Thanks! A quick access button is a great idea.

Now I get a different error “An error occurred during authentication. Please check that your database credentials are correct and resync your agent.”

I don’t seem to be using anything on port 3310, so is there a way of forcing Forest to launch on 3310?

The configuration relating to your local agent can be found in the .env inside of the directory that was generated after the bootstrap step. As well as datasources.js to configure your development database

I added these lines to my .env file but it’s still not launching on the port 3310. It always mounts on 3351

FOREST_ENV_SECRET=[redacted]
TOKEN_PATH=C:\Users\janet
LOG_LEVEL=Info
APPLICATION_URL=http://localhost:3310
APPLICATION_PORT=3310

OK it finally managed to connect to my server on 3351! Thanks and enjoy your evening.

1 Like

it’s great that you’ve been able to access your local agent, if you encounter any other issue, I’ll be glad to help as it is not expected for your agent to start on port 3351.

I’ll forward to the team the idea of having a way to reach the environment configuration via the error modal.

Thanks ! have a nice evening as well.

I didn’t set my agent to start on port 3351 and there’s no reason why it shouldn’t have started on 3310. The .env file seems to be ignored.

That is indeed not the expected behaviour, could you share the explorer view of your bootstrapped directory ?

Are you the one that set up the project initially, did you follow the procedure described in Cloud customize modal inside of the UI ?

Not sure if it is relevant but could you have a global environment variable set for APPLICATION_PORT ?