First steps with nodejs tutorial

Hi there,

I’m just starting with Fly.io and I already hit a wall that I can’t seem to be able to figure out.
Followed the hands-on tutorial with no problem and was able to get the hellofly app running.

Now I’m trying to follow along the nodejs tutorial and it is always failing deployment.

$  flyctl launch
An existing fly.toml file was found for app hellonode1
App is not running, deploy...
Deploying hellonode1
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Error failed building options: failed probing "personal": context deadline exceeded

or

$  flyctl --app hellonode1 deploy .
==> Verifying app config
--> Verified app config
==> Building image
Error failed to fetch an image or build from source: failed building options: failed probing "personal": context deadline exceeded

or

$  flyctl deploy --remote-only
==> Verifying app config
--> Verified app config
==> Building image
Error failed to fetch an image or build from source: failed building options: failed probing "personal": context deadline exceeded

I’m pretty lost here. It shouldn’t be this hard to get the basic hellonode nodejs app running.

@joshua I noticed you are online on github, and I’ve seen you answer several node related questions on the forum. Perhaps you could clarify this for me? Thank you!

Hey - this means you’ve having an issue connecting to your Fly organization over Wireguard. Sometimes this is caused by VPNs. If you’re using a VPN, can you try disabling it and running the command again?

Hi @joshua no VPN, I’m just on regular university network.
If I end up having to require IT for an exception to allow flyctl to work, how should I approach it, or what exactly do I need to ask for them to allow?

The reason this may fail is because flyctl uses UDP to connect to Wireguard. However, the latest prerelease of flyctl has an option to connect using websockets over port 443, which should not require intervention from your IT team. Can you try it out?

Install the prerelease:

curl -L https://fly.io/install.sh | sh -s pre

Then:

fly wireguard websockets enable
fly deploy
2 Likes

Hi @joshua

Ok, that makes sense.

I’m current not under university network and it worked! Thanks.
(I will let you know when I am back to uni network if it fails again).

Even in non-uni network I was having trouble getting the builder to do its thing. It was stuck, and I reported it on another thread here. However this new version you shared with me here, fixed that as well.

Now my problem is that I can’t reach the deployed app via UDP. I am working on a project that listens to incoming UDP messages. How can I make sure that fly has UDP ports open? I am already telling the app to listen to port: process.env.PORT

Could you still help me with this? :slight_smile:

Glad to hear it works! This guide should help you: Running Fly.io Apps On UDP and TCP

@joshua
Thank you so much for that helpful link!

Question. Today I started seeing:

Update available 0.0.320-pre-1 -> v0.0.320.
Run "flyctl version update" to upgrade.

is it safe to update? will it keep using the websockets (is it the new default?) or do i have do still run fly wireguard websockets enable ?