René's URL Explorer Experiment


Title: *(psycopg2.OperationalError) could not connect to server: No such file or directory* GAE Flex enivronment · Issue #884 · GoogleCloudPlatform/python-docs-samples · GitHub

Open Graph Title: *(psycopg2.OperationalError) could not connect to server: No such file or directory* GAE Flex enivronment · Issue #884 · GoogleCloudPlatform/python-docs-samples

X Title: *(psycopg2.OperationalError) could not connect to server: No such file or directory* GAE Flex enivronment · Issue #884 · GoogleCloudPlatform/python-docs-samples

Description: Hi, I'm getting this error when im trying to connect to my PostgreSQL on my app when its deployed. I followed the instructions here https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql-postgres?authuser=0 Both the app ...

Open Graph Description: Hi, I'm getting this error when im trying to connect to my PostgreSQL on my app when its deployed. I followed the instructions here https://cloud.google.com/appengine/docs/flexible/python/using-clo...

X Description: Hi, I'm getting this error when im trying to connect to my PostgreSQL on my app when its deployed. I followed the instructions here https://cloud.google.com/appengine/docs/flexible/python/using...

Opengraph URL: https://github.com/GoogleCloudPlatform/python-docs-samples/issues/884

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"*(psycopg2.OperationalError) could not connect to server: No such file or directory* GAE Flex enivronment","articleBody":"Hi, I'm getting this error when im trying to connect to my PostgreSQL on my app when its deployed. I followed the instructions here [https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql-postgres?authuser=0](https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql-postgres)\r\n\r\nBoth the app and PostgreSQL are in the same project and in the same region.\r\n\r\nThe error message is\r\n```\r\nAn internal error occurred:\r\n(psycopg2.OperationalError) could not connect to server: No such file or directory\r\n\tIs the server running locally and accepting\r\n\tconnections on Unix domain socket \"/cloudsql/flask-161002:us-east1:myserver/.s.PGSQL.5432\"?\r\nSee logs for full stacktrace.\r\n```\r\n\r\nMy app.yaml is this\r\n```\r\nruntime: python\r\nenv: flex\r\nentrypoint: gunicorn -b :$PORT app:app\r\n\r\nruntime_config:\r\n  python_version: 3\r\n\r\nenv_variables:\r\n    # Replace user, password, database, and instance connection name with the values obtained\r\n    # when configuring your Cloud SQL instance.\r\n    SQLALCHEMY_DATABASE_URI: \u003e-\r\n      postgresql+psycopg2://postgres:pass@/postgres?host=/cloudsql/flask-161002:us-east1:myserver\r\nbeta_settings:\r\n    cloud_sql_instances: flask-161002:us-east1:myserver\r\n```\r\nIn my app.py, I connect wtih\r\n```\r\napp.config['SQLALCHEMY_DATABASE_URI'] = os.environ['SQLALCHEMY_DATABASE_URI']\r\n```\r\n\r\nThe logs from the stacktrace\r\n```\r\nsqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: No such file or directory\r\nat connect (/env/lib/python3.5/site-packages/psycopg2/__init__.py:130)\r\nat connect (/env/lib/python3.5/site-packages/sqlalchemy/engine/default.py:385)\r\nat connect (/env/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py:105)\r\nat __connect (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:651)\r\nat __init__ (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:461)\r\nat _create_connection (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:333)\r\nat _do_get (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:1135)\r\nat reraise (/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py:186)\r\nat __exit__ (/env/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py:60)\r\nat _do_get (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:1138)\r\nat checkout (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:516)\r\nat _checkout (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:766)\r\nat connect (/env/lib/python3.5/site-packages/sqlalchemy/pool.py:387)\r\nat _wrap_pool_connect (/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py:2141)\r\nat reraise (/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py:185)\r\nat raise_from_cause (/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py:202)\r\nat _handle_dbapi_exception_noconnection (/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py:1456)\r\nat _wrap_pool_connect (/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py:2145)\r\nat contextual_connect (/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py:2106)\r\nat _connection_for_bind (/env/lib/python3.5/site-packages/sqlalchemy/orm/session.py:403)\r\nat _connection_for_bind (/env/lib/python3.5/site-packages/sqlalchemy/orm/session.py:971)\r\nat connection (/env/lib/python3.5/site-packages/sqlalchemy/orm/session.py:966)\r\nat _connection_from_session (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2807)\r\nat _get_bind_args (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2825)\r\nat _execute_and_instances (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2816)\r\nat __iter__ (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2795)\r\nat one_or_none (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2724)\r\nat one (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:2754)\r\nat load_on_ident (/env/lib/python3.5/site-packages/sqlalchemy/orm/loading.py:223)\r\nat _get_impl (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:862)\r\nat get (/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py:829)\r\nat get_single_state (/home/vmagent/app/app.py:65)\r\nat dispatch_request (/env/lib/python3.5/site-packages/flask/app.py:1598)\r\nat full_dispatch_request (/env/lib/python3.5/site-packages/flask/app.py:1612)\r\nat reraise (/env/lib/python3.5/site-packages/flask/_compat.py:33)\r\nat handle_user_exception (/env/lib/python3.5/site-packages/flask/app.py:1517)\r\nat full_dispatch_request (/env/lib/python3.5/site-packages/flask/app.py:1614)\r\nat wsgi_app (/env/lib/python3.5/site-packages/flask/app.py:1982)\r\n```","author":{"url":"https://github.com/ben-nguyen1","@type":"Person","name":"ben-nguyen1"},"datePublished":"2017-04-03T18:06:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/884/python-docs-samples/issues/884"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d66f5b86-5098-1156-d2ab-c660b0e75a79
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD16A:3B780C:FC3EEF:1577078:6A4D68A0
html-safe-nonced2188407bb64f431e43e4a8316b1d6dbf1b008f686840d65102c0f5a342cd4fa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTZBOjNCNzgwQzpGQzNFRUY6MTU3NzA3ODo2QTRENjhBMCIsInZpc2l0b3JfaWQiOiIzMDE0NDI0MDYxMjAxNDQyOTc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7fb48a22ffffe2d11e8f6b10a2b8ea286231aa895afcc63aa93a4515a5e860e0
hovercard-subject-tagissue:219015504
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GoogleCloudPlatform/python-docs-samples/884/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fe230492d840243e61ba0662d095189691d662a9bab2cf18285704d5233b81e8/GoogleCloudPlatform/python-docs-samples/issues/884
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fe230492d840243e61ba0662d095189691d662a9bab2cf18285704d5233b81e8/GoogleCloudPlatform/python-docs-samples/issues/884
og:image:altHi, I'm getting this error when im trying to connect to my PostgreSQL on my app when its deployed. I followed the instructions here https://cloud.google.com/appengine/docs/flexible/python/using-clo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameben-nguyen1
hostnamegithub.com
expected-hostnamegithub.com
None7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9
turbo-cache-controlno-preview
go-importgithub.com/GoogleCloudPlatform/python-docs-samples git https://github.com/GoogleCloudPlatform/python-docs-samples.git
octolytics-dimension-user_id2810941
octolytics-dimension-user_loginGoogleCloudPlatform
octolytics-dimension-repository_id35065876
octolytics-dimension-repository_nwoGoogleCloudPlatform/python-docs-samples
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id35065876
octolytics-dimension-repository_network_root_nwoGoogleCloudPlatform/python-docs-samples
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecd8f6a71db61d6012a0cbb134be844fdbe9b8a45
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fpython-docs-samples%2Fissues%2F884
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fpython-docs-samples%2Fissues%2F884
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=GoogleCloudPlatform%2Fpython-docs-samples
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884
Reloadhttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884
Please reload this pagehttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884
GoogleCloudPlatform https://github.com/GoogleCloudPlatform
python-docs-sampleshttps://github.com/GoogleCloudPlatform/python-docs-samples
Notifications https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Fork 6.7k https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Star 8.1k https://github.com/login?return_to=%2FGoogleCloudPlatform%2Fpython-docs-samples
Code https://github.com/GoogleCloudPlatform/python-docs-samples
Issues 55 https://github.com/GoogleCloudPlatform/python-docs-samples/issues
Pull requests 250 https://github.com/GoogleCloudPlatform/python-docs-samples/pulls
Actions https://github.com/GoogleCloudPlatform/python-docs-samples/actions
Wiki https://github.com/GoogleCloudPlatform/python-docs-samples/wiki
Security and quality 0 https://github.com/GoogleCloudPlatform/python-docs-samples/security
Insights https://github.com/GoogleCloudPlatform/python-docs-samples/pulse
Code https://github.com/GoogleCloudPlatform/python-docs-samples
Issues https://github.com/GoogleCloudPlatform/python-docs-samples/issues
Pull requests https://github.com/GoogleCloudPlatform/python-docs-samples/pulls
Actions https://github.com/GoogleCloudPlatform/python-docs-samples/actions
Wiki https://github.com/GoogleCloudPlatform/python-docs-samples/wiki
Security and quality https://github.com/GoogleCloudPlatform/python-docs-samples/security
Insights https://github.com/GoogleCloudPlatform/python-docs-samples/pulse
*(psycopg2.OperationalError) could not connect to server: No such file or directory* GAE Flex enivronmenthttps://github.com/GoogleCloudPlatform/python-docs-samples/issues/884#top
https://github.com/ryanmats
https://github.com/ben-nguyen1
ben-nguyen1https://github.com/ben-nguyen1
on Apr 3, 2017https://github.com/GoogleCloudPlatform/python-docs-samples/issues/884#issue-219015504
https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql-postgres?authuser=0https://cloud.google.com/appengine/docs/flexible/python/using-cloud-sql-postgres
ryanmatshttps://github.com/ryanmats
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.