I’m new to speckle. I was trying it to setup the speckle server in local.
All things are setup, postgres, redis etc…
But I could able to open the frontend running on http:localhost:3000
I got this response in browser >> Error occurred while trying to proxy: localhost:3000/
While I check in cmd of the application, I got the error which I have attached as image below.
Heya! Welcome to the speckle community. Here’s how i usually set things up for dev locally:
from the server repo (speckle server repo folder/packages/server) i run yarn dev
in a new terminal (speckle server repo folder/packages/frontend) i run yarn dev
This makes sure we’re running just the main two components, namely the server and the frontend. File imports won’t work, and neither will be previews be generated, but that’s usually okay if i’m not debugging those specifically! Let me know if this helps.
could you uncomment them and restart the server? I’m going to be AFK for a while now, but will try to chime in later. I suspect there might be some port/hosts mismatches somewhere…
Then I got to know about PostgreSQL, redis etc… were required, so I installed accordingly them but redis I’m not using WSL, i’m running it directly in my windows OS.
yarn build
Once the build has completed, I had different Postgres username, password and DB them the official project. So I replaced them all in local system where I have cloned it.
\speckle-server\docker-compose-speckle.yml
Here the changes were,
POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_URL: ‘postgres’, where DB,
username and password set as above value.
PG_CONNECTION_STRING: ‘postgres://postgres:123456789@localhost:5432/speckle_test’
A question here, what should be the URL for SPECKLE_SERVER_URL in fileimport-service: section of
above file.
\speckle-server.circleci\config.yml
Here the changes were,
POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_URL: ‘postgres’, where DB,
username and password set as above value only in test-server: section.
A question here too, what should be the URL for CANONICAL_URL
speckle-server\utils\1click_image_scripts\template-docker-compose.yml
Here the changes were,
POSTGRES_DB, POSTGRES_PASSWORD, POSTGRES_USER, POSTGRES_URL: ‘postgres’, where DB,
username and password set as above value.
A question here too, what should be the URL for CANONICAL_URL
speckle-server\utils\monitor-deployment\dev_run.sh
Here, I only changed value PG_CONNECTION_STRING =
postgres://postgres:123456789@localhost:5432/speckle_test
speckle-server\packages\server.env
Here made changes for PostgreSQL,
A question here too, what should be the URL for CANONICAL_URL
speckle-server\packages\server.env.test
Here, I changed POSTGRES_URL and POSTGRES_USER
yarn dev:docker:up
yarn dev
So that’s all I did.
I’m sure, somewhere I have messed up. If you can look into it and provide me with a solution, It would really be a great help.
Thank you, and I apologize if the detailed information I provided seemed lengthy and might have caused any inconvenience.
I tried recreating the issue last night but wasn’t able to.
Were you able to get speckle server running with the default configuration? i.e. run the docker compose file containing the dependencies, docker-compose-deps.yml, and use the original values for all of the variables.
If you are able to get this default configuration running, it would suggest that the issue is with one of the dependencies or variables you currently have. If you aren’t able to get the default configuration running, it may be an issue with the speckle server or how it interacts with your particular environment (which includes operating system and network).
The 504 Http Status Code is an indication that Speckle Server, or the ingress, cannot reach an upstream component. 504 Gateway Timeout - HTTP | MDN
I could able to resolve all the issues, so I downgraded the node version to 16. It worked.
As you suggested, many configurations I kept as default.
Major changes were related to Postgres credentials, redis URLs, so updated them in most of the files.
I’ve been able to reproduce your issue on my setup. It is related to the backend not being able to proxy to the frontend. The culprit is again the node 16 → 18 upgrade breaking localhost dns resolution in some setups. So downgrading to node 16 does fix the issue, but it might bring in other issues we do not know / test for / support.
Instead I’ve added a PR to fix the issues and make things work on node 18. If you update your version, please also update your .env file values too in frontend 1 and 2 depending on which one you use.