Disconections in dev mode with Redis Cloud - database

In the deployment on Vercel everything works correctly, but in the development on local machine, sometimes I get disconnected from the Redis Cloud with the following error 👇
error - Error: getaddrinfo ENOTFOUND redis-16332.c16.us-east-1-3.ec2.cloud.redislabs.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  type: 'Error',
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'redis-16332.c16.us-east-1-3.ec2.cloud.redislabs.com',
  page: '/chat/[chat_id]'
}
After a short break ± 30s., I can connect again, but the connection is lost very often, so it's quite annoying.
Environment: Im using redis-om-node -> https://github.com/redis/redis-om-node client in a Next.js 13 server components / serverless functions.
System: MacOS 13.1
Browser: Chrome

Related

ASP.NET Core 6 Server running on different ports

I'm getting a proxy error
Proxy error: Could not proxy request /api/auth/signin from localhost:51171 to http://localhost:3000/
I have noticed that on the starting the server is running on two different ports...
info: Microsoft.AspNetCore.SpaServices[0]
Starting create-react-app server on port 51171...
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
In the package.json I defined the proxy as follows:
"proxy": "http://localhost:3000"
Changed proxy to: "proxy": "http://localhost:5000" and now its working...
Still dont know why smth is running on 51171

Not able to connect to accounts.google.com anymore

Last week we are getting errors from accounts.google.com.
How can we fix the problem? We use GAE standard environment with python 2.7 and requests 2.18+
We are getting this one during about 5 days:
HTTPSConnectionPool(host='accounts.google.com',
port=443):
Max retries exceeded with url: /o/oauth2/token
(Caused by NewConnectionError('urllib3.connection.VerifiedHTTPSConnection object
at 0xfaa13790: Failed to establish a new connection: [Errno 110]
connection timed out',))
I see you are using urllib3. Make sure you have ssl enabled in your app.yaml:
libraries:
- name: ssl
version: latest
GAE deleted ssl version 2.7 recently.

node http-server stops with exception when using proxy Error: connect EHOSTUNREACH

I'm using node package http-server to serve my web pages locally. Suddenly it started failing to connect to the proxy server. Searched in stackoverflow but didn't get satisfied answer for this scenario. Please help.
Here are the commands and logs:
http-server -p 8000 app/ --proxy localhost:3000
Starting up http-server, serving app/
Available on:
http:127.0.0.1:8000
http:192.168.1.6:8000
Unhandled requests will be served from: localhost:3000
Hit CTRL-C to stop the server
[Mon, 04 Jul 2016 13:29:27 GMT] "POST /candidates/resumes"
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
/Users/tushar/.node_modules_global/lib/node_modules/http-server/node_modules/http-proxy/lib/http-proxy/index.js:119
throw err;
^
Error: connect EHOSTUNREACH 0.0.11.184:80 - Local (192.168.1.6:58636)
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at connect (net.js:843:14)
at net.js:985:7
at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)
Found the issue. My bad. The proxy address has to be inside the quotation mark. No idea when it has become mandatory to be quoted. Here is the example command if it helps anyone -
http-server app/ -p 8000 --proxy 'http://localhost:3000'
or simply the following (default port and current-dir instead of specifying a folder 'app')
http-server --proxy 'http://localhost:3000'

ERROR: error pushing image "us.gcr.io/***/appengine/default.20160429t095907:latest": exit status 1

I recently created a Node.js app at Google Cloud Platform. I tested the app thoroughly at both my local environment and Cloud Shell without problem. However, every time I tried to deploy the app to App Engine, it just failed with the following error message:
PUSH
The push refers to a repository [us.gcr.io/hisella-authentication/appengine/default.20160429t095907] (len: 1)
31185f371dc8: Preparing
Post https://us.gcr.io/v2/hisella-authentication/appengine/default.20160429t095907/blobs/uploads/: token auth attempt for registry: https://us.gcr.io/v2/token?account=_token&scope=repository%3Ahisella-authentication%2Fappengine%2Fdefault.20160429t095907%3Apush%2Cpull&service=us.gcr.io request failed with status: 400 Bad Request
ERROR
ERROR: error pushing image "us.gcr.io/hisella-authentication/appengine/default.20160429t095907:latest": exit status 1
ERROR: (gcloud.preview.app.deploy) Error Response: [2] Build failed; check build logs for details
The build logs only have the following information:
09:53:24.560 {"#type":"type.googleapis.com/google.cloud.audit.AuditLog","authenticationInfo":{"principalEmail":"appengine-admin-noreply#google.com"},"serviceName":"appengine.googleapis.com","methodName":"com.google.appengine.legacy.vm_administrative_task_failed","resourceName":"apps/hisella-authentication/modules/default/versions/20160427t115216","serviceData":{"#type":"type.googleapis.com/google.appengine.legacy.AuditData","eventMessage":"VM administrative task failed.","eventData":{"module_id":"default","version":"20160427t115216.392380903859978721","version_id":"20160427t115216"}}}
{
metadata: {
severity: "NOTICE"
projectId: "***"
serviceName: "appengine.googleapis.com"
zone: "global"
labels: {
appengine.googleapis.com/module_id: "default"
appengine.googleapis.com/version_id: "20160427t115216"
}
timestamp: "2016-04-29T02:53:24.560Z"
projectNumber: "***"
}
protoPayload: {
#type: "type.googleapis.com/google.cloud.audit.AuditLog"
authenticationInfo: {
principalEmail: "appengine-admin-noreply#google.com"
}
serviceName: "appengine.googleapis.com"
methodName: "com.google.appengine.legacy.vm_administrative_task_failed"
resourceName: "apps/hisella-authentication/modules/default/versions/20160427t115216"
serviceData: {
#type: "type.googleapis.com/google.appengine.legacy.AuditData"
eventMessage: "VM administrative task failed."
eventData: {
module_id: "default"
version: "20160427t115216.392380903859978721"
version_id: "20160427t115216"
}
}
}
insertId: "53196BF1A0068.AD6A8C5.B30E5526"
log: "cloudaudit.googleapis.com/activity"
}
Please help me to by-pass this problem so I can deploy my app to App Engine.
Any response from you will be greatly appreciated!
Thank you all so much!
The problem occurred because Google had temporarily suspended use of my APIs billing account. I have to re-verify my account information to solve the problem.

gcloud preview app deploy returns 400 error

Trying to deploy some static content to GAE, since they removed the push-to-deploy pipeline feature. I've setup a brand new project. It's in the US region. Did gcloud auth login again. Still getting the same response.
Verbose debug output below. [REDACTED] is my addition to the code.
$ gcloud preview app deploy dist/app.yaml --verbosity debug
DEBUG: Running gcloud.preview.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview.app.deploy', usage=None, description="*(BETA)* This command is used to deploy both code and configuration to the App Engine\nserver. As an input it takes one or more ``DEPLOYABLES'' that should be\nuploaded. A ``DEPLOYABLE'' can be a module's .yaml file or a configuration's\n.yaml file.", version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x10bf14290>>, command_path=['gcloud', 'preview', 'app', 'deploy'], deployables=['dist/app.yaml'], document=None, env_vars=None, force=False, format=None, h=None, help=None, http_timeout=None, log_http=None, markdown=None, project=None, quiet=None, remote=False, server=None, set_default=False, trace_token=None, user_output_enabled=None, verbosity='debug', version=None).
You are about to deploy the following modules:
- [PROJECT_ID]/default/20150612t130942 From: [/Users/[ME]/Dropbox/Sites/[PROJECT_ID]/site/dist/app.yaml]
Do you want to continue (Y/n)? Y
Updating module [default]...DEBUG: Host: appengine.google.com
DEBUG: Host: appengine.google.com
DEBUG: Getting current resource limits.
DEBUG: Send: /api/appversion/getresourcelimits, params={'version': '20150612t130942', 'app_id': '[PROJECT_ID]'}
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to https://appengine.google.com/api/appversion/getresourcelimits?app_id=[PROJECT_ID]&version=20150612t130942 headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 'application/octet-stream'} body=
INFO: Attempting refresh to obtain initial access_token
INFO: Refreshing access_token
DEBUG: Got response: max_file_size: 32000000
max_blob_size: 32000000
max_files_to_clone: 2000
max_total_file_size: 9223372036854775807
max_file_count: 10000
DEBUG: Using resource limits: {'max_file_size': 32000000, 'max_total_file_size': 9223372036854775807, 'max_blob_size': 32000000, 'max_files_to_clone': 2000, 'max_file_count': 10000}
INFO: Reading app configuration.
DEBUG:
Starting update of app: [PROJECT_ID], version: 20150612t130942
DEBUG: Scanning files on local disk.
INFO: Processing file [app.yaml]
INFO: Processing file [index.html]
INFO: Processing file [views/6a0e56b1.main.html]
INFO: Processing file [views/partials/90bc29e6.case-study.html]
INFO: Processing file [views/partials/cc69dea5.home.html]
INFO: Processing file [styles/9960b040.main.css]
INFO: Processing file [scripts/8a12aff1.scripts.js]
INFO: Processing file [scripts/8e6de882.libraries.js]
DEBUG: Send: /api/appversion/create, params={'version': '20150612t130942', 'app_id': '[PROJECT_ID]', 'module': 'default'}
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to https://appengine.google.com/api/appversion/create?app_id=[PROJECT_ID]&module=default&version=20150612t130942 headers={'X-appcfg-api-version': '1', 'content-length': '633', 'Content-Type': 'application/octet-stream'} body=api_version: '1'
application: [PROJECT_ID]
auto_id_policy: default
builtins:
- default: 'on'
derived_file_type:
- python_precompiled
handlers:
- script: index.html
secure: optional
url: /
- secure: optional
static_dir: styles
url: /styles
- secure: optional
static_dir: scripts
url: /scripts
- secure: optional
static_dir: views
url: /views
- secure: optional
static_dir: fonts
url: /fonts
- secure: optional
static_dir: images
url: /images
- secure: optional
static_dir: res
url: /res
module: default
runtime: php
threadsafe: true
version: 20150612t130942
vm_settings:
module_yaml_path: app.yaml
INFO: Attempting refresh to obtain initial access_token
INFO: Refreshing access_token
Updating module [default].../DEBUG: Got http error 400.
DEBUG: Unexpected results: {'status': '400', 'alternate-protocol': '443:quic,p=1', 'content-length': '318', 'expires': 'Fri, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Fri, 12 Jun 2015 18:09:47 GMT', 'content-type': 'text/plain'}
Updating module [default]...done.
DEBUG: (gcloud.preview.app.deploy) Server responded with code [400]:
Bad Request Unexpected HTTP status 400
Traceback (most recent call last):
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 538, in Execute
result = args.cmd_func(cli=self, args=args)
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1124, in Run
result = command_instance.Run(args)
File "/Users/[ME]/Applications/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 119, in Run
client.DeployModule(module, version, info.parsed, info.file)
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 276, in DeployModule
return appversion.DoUpload()
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_deployments.py", line 1016, in DoUpload
missing_files = self.Begin()
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_deployments.py", line 561, in Begin
payload=config_copy.ToYAML())
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/util.py", line 288, in Send
result = self.rpcserver.Send(url, payload=payload, **kwargs)
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/util.py", line 353, in Send
response = self._server.Send(*args, **kwargs)
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 269, in Send
'Unexpected HTTP status %s' % status)
File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 67, in RaiseHttpError
raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream)
RPCError: Server responded with code [400]:
Bad Request Unexpected HTTP status 400
ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
Bad Request Unexpected HTTP status 400
You might have to set the project id again if you have disabled/removed previous application from google cloud console.
gcloud config set project PROJECT_ID
The generic issue is that the error did not have a message.
Starting in the cloud SDK release tomorrow, the reason for whatever error (billing issue, not enough quota, whatever) will be displayed, so please try to get the newer cloud SDK tomorrow.
For me I hadn't enabled billing in Compute > Compute Engine > VM instances on my Google Console project. It works now!
If you have appcfg.py installed, you can run that to deploy and it will give the exact error message, I found mine to be an invalid api_version for the java runtime (to which i can't find the valid number and 1 isn't it)
My initial deployment was fine and after I uploaded the update, it started to fail and get the same errors as you did. I found the issue with oauth. Logout from google and running:
$ gcloud auth login
After relogin, I was able to deploy. No re-coding or Managed VM setting changes were done.

Resources