Report this

What is the reason for this report?

Followed serverless guide but failed to get same results

Posted on March 30, 2024

I was following the guide on creating and deploying a serverless function: https://docs.digitalocean.com/products/functions/how-to/create-functions/

  • I created a token as per https://docs.digitalocean.com/reference/api/create-personal-access-token/
  • I installed doctl by using the wget method for Linux (also tried this whole process on a Mac using brew, just to be sure)
  • $ doctl auth init with the API token was successful
  • I created a namespace: $ doctl serverless namespaces create --label "meowchik" --region ams and got the output Connected to functions namespace 'fn-0cafc14a-fc8b-4197-8b9c-ac9f6618429c' on API host 'https://faas-ams3-2a2df116.doserverless.co'
  • I initialized a test project using $ doctl serverless init --language js meowchik-project and got the output A local functions project directory 'meowchik-project' was created for you. You may deploy it by running the command shown on the next line: doctl serverless deploy meowchik-project
  • However when deploying it I get an error: $ doctl serverless deploy meowchik-project/ Error: Invalid project configuration file (project.yml): http request failed: GET https://faas-ams3-2a2df116.doserverless.co/api/v1 Learn more about the project configuration file https://docs.digitalocean.com/products/functions/reference/project-configuration/

I can further isolate this by showing this weird interaction:

  1. $ doctl serverless connect helloworldns -> Connected to functions namespace 'fn-1f1df919-32ed-45fd-97f5-82400fd6a65e' on API host 'https://faas-fra1-afec6ce7.doserverless.co' (label=helloworldns)
  2. $ doctl serverless status -> Error: serverless support is installed but not connected to a functions namespace (use 'doctl serverless connect')

I’m pretty confused and not sure what to do about this. I haven’t changed any configuration or the project.yml file, everything is pretty much default and followed step by step according to the guide.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

The issue with doctl serverless connect and doctl serverless status showing a disconnect might indicate a problem with the doctl tool. What is the version that you are currently using?

doctl version

I’ve just tested this with 1.105.0-release and it seems to be working as expected. If you are not running the latest version, I could suggest trying to upgrade to the latest one.

Also, if you were to run doctl serverless namespaces list do you see the correct namespace listed there?

Best,

Bobby

I encountered the identical issue. Simply turn off your VPN, and everything should function correctly.

I encountered the identical issue. Simply turn off your VPN, and everything should function correctly.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Dark mode is coming soon.