"wasp start db" takes too much time.
Any solution for this? i seem to be stuck in a loop and i can't do "Wasp start" until this resolves....
27 Replies
Hey @miho any inputs as to what could be causing this?
This command starts a PostgreSQL db in a Docker container. And it check if port
5432
is used by other apps, but sometimes it doesn't do it reliably.
1. Do you have Docker installed? (Check with docker -v
)
2. Do you have Docker running? (Check with docker info
)
3. Do you have something running at port 5432
? (For Linux, I found these instructions: https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/)i did check the first two steps.
But still didn't work.
Here is what i did and it worked.
Shut off docker and exited all terminal windows.
Then restarted PC,
Then first what i did was start docker and then ran cd start db and it worked now.
i did check the first two steps. But still didn't work.What did the two steps output? If you could share what did you see, it might help others in the future. I'm glad it worked for you π
docker --version showed the docker version and build info
same relevant info in docker info.
Sorry i can't share screenshot as after i rebooted PC they are gone.
No worries! Thank you for the effort π
any idea on how i can access the project on my local network?
Even though vite gives the network link with port to access the project on local, i am not able to access it on my phone or another laptop.
I am on same network and wifi in other laptop and phone
I wrote some new instruction on testing Wasp apps locally: https://github.com/wasp-lang/learning-materials/blob/main/README.md#testing-wasp-apps-on-local-network
Would you mind doing all the steps and see if it's still broken?
GitHub
learning-materials/README.md at main Β· wasp-lang/learning-materials
A place to collect some useful learning materials for Wasp - wasp-lang/learning-materials
I'm curious if it might be a network related error specific your office/home setup π€ Have you been able to do this with some other frameworks other than Wasp?
For me the above instructions worked, for example, I was able to login with Google and create some tasks in an example TODO app.
I did the steps mentioned in the Instructions and sadly no luck.
I still see this only.
Let's try this simple test. Run this command in your terminal:
It starts a Node.js server on port 3000 and listens on 0.0.0.0. Try opening the
<ip>:3000
on your phone.There seemed to be a syntax error with that, so in instead run a corrected version and got an error.
Wohooo @Killshot, you just became a Waspeteer level 3!
But then ran this and it worked....
PS C:\Users\krish> node -e "require('http').createServer((req, res) => { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello, World!\n'); }).listen(3000, '0.0.0.0', () => console.log('Server running at http://0.0.0.0:3000/'));"
Server running at http://0.0.0.0:3000/
Shows hello world on my ip:3000You ran that code in the Windows PowerShell, but could you run it in the Ubuntu terminal? π
in the ubuntu terminal it was giving an error too....
let me share screenshot
Looks like a simple "Port already in use error"
After i changed the port to listen to 8000 it started working,
But i can't see the same on my network.
It does show in my Local Device but not on my network.
This is the local enviroment.
@Killshot, If you're using Windows, there's most likely a firewall rule preventing other devices from accessing the stuff you host on your PC.
It's not Wasp related, as you Miho proved with hosting the simple site above
You'll have to look into your local firewalll setting sto see what's up.
Have you ever successfully accessed a site on the local network from a different device?
Also, what happens when you host something outside WSL, in the regular Windows powershell?
Yes i definitely checked this a few minutes after debugging other stuff...
I did disable all my Antivirus/Firewall monitoring.
Even checked the Router settings and then tried a few scripts i found on forums to make a new forwarding rule.
Honestly don't know what's going wrong.
But I ain't gonna give up,
Will give it another go after a few minutes,
I am outside right now.
Ok, let us know how it worked out!
Probably best to test and fix network problems it with a server different than Wasp, to reduce complexity. You can use what Miho suggested.
I also like
python -m http.server <port_number>
- that will serve the current directory in the local network on the specified port