unstract icon indicating copy to clipboard operation
unstract copied to clipboard

fix: [ISSUE] Bad gateway returned when access http://frontend.unstract.localhost on Mac OS Ventura 13.7.6

Open Johnny-Ko opened this issue 6 months ago • 4 comments

After executed /run-platform.sh. All services and containers were started. But 'Bad Gateway' returned when I try to access http://frontend.unstract.localhost

Johnny-Ko avatar Jul 05 '25 17:07 Johnny-Ko

I think you need to wait a little while for the services to start. I faced the same issue initially. I checked the logs to make sure everything was running properly, then refreshed the page, and it worked. This was on Ubuntu

alameen1999 avatar Jul 08 '25 10:07 alameen1999

@alameen1999 Thanks for the info! Could you please let me know approximately how long you waited? I'm also using Ubuntu, and I waited for over an hour, but the page still shows a "Bad Gateway" error when I try to access http://frontend.unstract.localhost/.

Boobalamurugan avatar Jul 18 '25 11:07 Boobalamurugan

just cloned and started this on windows with bad gateway as well

reactsaas avatar Jul 22 '25 20:07 reactsaas

I was also running into this issue on a Mac.

I found the issue to be related to the ports of traefik and the frontend, which are setup as port 3000 in the docker-compose.yaml but are showing as 80 after starting everything through docker.

>> docker exec -it unstract-frontend sh

/ $ netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 [0.0.0.0:80](http://0.0.0.0/)              0.0.0.0:*               LISTEN      1/nginx: master pro
tcp        0      0 [127.0.0.11:38171](http://127.0.0.11:38171/)        0.0.0.0:*               LISTEN      -
udp        0      0 [127.0.0.11:41514](http://127.0.0.11:41514/)        0.0.0.0:*                           -

I fixed it by modifying the following to use port 80 in docker/docker-compose.yaml​:

# Frontend React app
frontend:
image: unstract/frontend:${VERSION}
container_name: unstract-frontend
restart: unless-stopped
ports:
- "3000:80"
depends_on:
- backend
- reverse-proxy
environment:
- ENVIRONMENT=development
labels:
- traefik.enable=true
- traefik.http.routers.frontend.rule=Host(`frontend.unstract.localhost`) && !PathPrefix(`/api/v1`, `/deployment`)
- traefik.http.services.frontend.loadbalancer.server.port=80

When I run run-platform.sh after that modification, I am able to access the Unstract interface at http://frontend.unstract.localhost.

sefinch avatar Jul 23 '25 20:07 sefinch