Google app engine development server throws the following error whenever i try to run it
Asked Answered
B

4

1

I'm trying to create a webservice using webapp2 and datastore in python. But whenever i try to run "dev_appserver.py app.yaml" it throws me the following error

ERROR 2017-10-11 05:44:16,207 instance.py:280] Cannot connect to the instance on localhost:17514

Full Error message thrown out in the console

But when i ran the same program using mac it working perfectly fine. Is I'm missing something here, Please find the screeenshot of components i have installed in gcloud.

gcloud components installed screenshot

Could somebody tell what i'm doing wrong here? I'm newbie to google cloud platform, if i am doing something wrong kindly point me to right direction. Any help would be appreciated. Thank you.

Bonnes answered 11/10, 2017 at 5:56 Comment(1)
python 2.7.12 in linux and python 2.7.10 in macOSBonnes
B
1

The problem is fixed. Like @DanCornilescu said it's an environment issue. I deactivated the virtual environment. And It works fine with no issue.

Bonnes answered 12/10, 2017 at 5:3 Comment(0)
R
1

I see the same errors when trying to execute the dev_appserver.py from the Cloud SDK version 174.0.0.

However the dev_appserver.py from the standalone GAE SDK version 1.9.61 (theoretically the same being packed into the gcloud SDK 174.0.0) is running fine.

So one possible workaround to try would be to also install the standalone GAE SDK and run that dev_appserver.py instead.

Note: this is on linux, though, YMMV.

Related: What is the relationship between Google's App Engine SDK and Cloud SDK?

Rhombohedral answered 11/10, 2017 at 6:48 Comment(3)
Is this problem only exists in this particular version of gcloud? If so, if I install the old gcloud will it solve the issue?Bonnes
I'm unsure, I'm still using primarily the GAE SDK, only occasionally I switch to the cloud SDK...Rhombohedral
Hm, I see it with 166.0.0 as well. Probably something specific to our environment...Rhombohedral
B
1

The problem is fixed. Like @DanCornilescu said it's an environment issue. I deactivated the virtual environment. And It works fine with no issue.

Bonnes answered 12/10, 2017 at 5:3 Comment(0)
D
0

Solution for macOS. Maybe it works on Linux and Windows:

Find and remove folder:

appengine.None.<USER_NAME>

from the:

/var/folders

In may case:

/var/folders/6w/v0865mm96rj85dlwnr311bt00000gn/T/appengine.None.<USER_NAME>
Delegacy answered 8/10, 2019 at 13:28 Comment(0)
N
0

I'm refactoring some of my old golang applications and I ran into this problem. I'd oversimplified the spin-up of my web server not realizing this is a critical block of code:

    // Critical to work on AppEngine
    port := os.Getenv("PORT")
    if port == "" {
        port = "8080"
        log.Printf("Defaulting to port %s", port)
    }
    log.Fatal(http.ListenAndServe(fmt.Sprintf(":%s", port), r))

Hope this helps.

Nonparticipation answered 29/3, 2020 at 23:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.