Encountered and solved this problem. Posting for posterity since my situation differed from the usual.
Important: I am running a derivative of Ubuntu in a VirtualBox VM on a freshly installed Windows host.
The Problem
When creating a new react amplify project using create-react-app, amplify init fails with an InvalidSignatureException after selecting a profile:
$ amplify init
...
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
? Please choose the profile you want to use default
InvalidSignatureException: Signature not yet current: 20220528T081112Z is still later than 20220528T051608Z (20220528T051108Z + 5 min.)
at Object.extractError (/snapshot/node_modules/aws-sdk/lib/protocol/json.js:52:27)
at Request.extractError (/snapshot/node_modules/aws-sdk/lib/protocol/rest_json.js:49:8)
at Request.callListeners (/snapshot/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/snapshot/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
...
at IncomingMessage.EventEmitter.emit (domain.js:483:12)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'InvalidSignatureException',
time: 2022-05-28T08:11:12.872Z,
requestId: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
statusCode: 403,
retryable: false,
retryDelay: 35.74742577991159
}
I also experienced errors with amplify push and amplify pull complaining about things such as "Time skew" and "Timeouts", and AWS Console threw "List apps call failed: Network Error".
Similar Posts
Here are a sample of posts discussing similar problems.
'amplify init' keeps failing
https://github.com/aws-amplify/amplify-js/issues/2014
https://github.com/concourse/s3-resource/issues/34
https://github.com/aws-amplify/amplify-hosting/issues/2417
Failed ideas
Sample of failed ideas:
I tried creating a second project to see if problem persisted. It did.
I tried syncing my time via ntp, ntpdate, ntpd. Same error.
I tried setting time via GUI. Failed to set. Same error.
Story leading to solution
At this point, I noticed my time occasionally jumps on sync with ntpd. Actual time was 01:40; on sync, it jump to 04:40, then back to 01:40. This would occur intermittently on sync. Timezones were set correctly. Trial and error exhausts my ideas, so I return to my host. Host time is 01:40, but discord messages are timestamping at 10:40. Wait.
Windows host timezone was set to UTC-8:00 Pacific Time. VirtualBox Linux guest was set to UTC-5:00 Eastern Time. Oddly, both were displaying 01:40.
Steps to resolve
Set host timezone to UTC-5:00 Eastern Time
Sync Clock in "Time and Date" settings in Windows
Disable/uninstall ntp from Linux guest
Issue was resolved. amplify init succeeded.
Related
I can't deploy my app, and I don't know how to fix it. I don't have any scaling configurations in my app.yaml, so I assume I'm under automatic scaling stuff. I'm using the flex env.
I only have two instances of the app right now and only three versions of it. So I'm not over any version limit.
I deployed once yesterday and it worked fine. when I changed some code and went to deploy again this happened. (I didn't save my changes to a different branch, so I don't know if it's just my code or some config I need to change in the console).
I'm not seeing anything related to my code in the build logs. The build seems like it succeeds 'cause it's green in the logs and says complete. Then it fails to update and gives me this quota error I can't find anything about in any docs.
Does this have anything to do with me getting two new domain names after the first deployment? (why would that matter?)
Here's the error:
DONE
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects/blah/regions/us-east1/operations/2c43cd11-2628-430b-9593-2020202020 error [INTERNAL]: An internal error occurred while processing task /appengine-flex-v1/insert_flex_deployment/flex_create_resources>2020-05-15T12:29:00.026Z67978.jc.2: Deployment Manager operation blah/operation-1589545740347-5a5aef53528c6-475fc7be-b67854 errors: [code: "RESOURCE_ERROR"
location: "/deployments/abc-default-12300515t082612/resources/abc-default-12300515t082612"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"errors\":[{\"domain\":\"usageLimits\",\"message\":\"Exceeded limit \'QUOTA_FOR_INSTANCES\' on resource \'abc-default-12300515t082612\'. Limit: 8.0\",\"reason\":\"limitExceeded\"}],\"message\":\"Exceeded limit \'QUOTA_FOR_INSTANCES\' on resource \'abc-default-20200515t0820000\'. Limit: 8.0\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/blah/regions/us-east1/autoscalers\",\"httpMethod\":\"POST\"}}"
dumb dumb dumb dumb dumb ;)
After some time I needed to do changes on GAE Python (2.7) First Generation app, but when I develop and run locally, it's basically nonusable due to a very slow start.
These are printed logs:
INFO 2019-10-18 07:56:35,533 devappserver2.py:278] Skipping SDK update check.
INFO 2019-10-18 07:56:35,595 api_server.py:275] Starting API server at: http://localhost:36159
INFO 2019-10-18 07:56:35,599 dispatcher.py:270] Starting module "default" running at: http://127.0.0.1:8080
INFO 2019-10-18 07:56:35,600 admin_server.py:152] Starting admin server at: http://localhost:8000
INFO 2019-10-18 08:01:01,644 instance.py:294] Instance PID: 28496
What I notice that the last line (instance.py) is printed after ~5 minutes and only after that app responds to requests, not before. Interesting that the admin server (localhost:8000) is available right away. Of course, when I do some code change it automatically reloads and it repeats again.
Things I tried/found out:
it behaves like that on my all GAE projects Python First Gen.
tried to create a bare minimal version (webapp2 with one URL), clean virtualenv, still the same behavior
tried to reinstall Google Cloud SDK. delete the whole google-cloud-sdk folder and install again, no changes
tried to install older version of Cloud SDK
used clean VM and it works ok!!!, so it looks like there could be something wrong with my system (outside of SDK), but I'm not sure what.
It's interesting that the pause between the last two log lines is always about 5 minutes, not sure why exactly that time.
Python 2.7.14
OS: OpenSuse Leap 15.0
I'm running out of ideas so any advice would be appreciated.
I solved this accidentally.
I wanted to run Jupyter notebook, but I got the error:
error: [Errno 99] Cannot assign requested address
after debugging in /tornado/netutil.py, I noticed that it tries to work with IP 192.168.1.50 which I wasn't sure where did that come from, (probably I set it since I was playing with my home network some time ago), but when I deleted it from /etc/hosts, Jupyter, as well as GAE, works ok.
What a coincidence :)
when i configure the flink-conf.yaml to collect metrics with the graphite plugin,
the most time only incomplete metrics are being sent. On the Taskmanager output multiple errors occur like:
2018-08-15 00:58:59,016 WARN org.apache.flink.runtime.metrics.MetricRegistryImpl - Error while registering metric.
java.lang.IllegalArgumentException: A metric named mycomputer.taskmanager.8ceab4c3dfbf9fc5fa2af0447f1373a1.State machine job.Source: Custom Source.0.numRecordsOut already exists
at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:91)
at org.apache.flink.dropwizard.ScheduledDropwizardReporter.notifyOfAddedMetric(ScheduledDropwizardReporter.java:131)
at org.apache.flink.runtime.metrics.MetricRegistryImpl.register(MetricRegistryImpl.java:329)
at org.apache.flink.runtime.metrics.groups.AbstractMetricGroup.addMetric(AbstractMetricGroup.java:379)
at org.apache.flink.runtime.metrics.groups.AbstractMetricGroup.counter(AbstractMetricGroup.java:312)
at org.apache.flink.runtime.metrics.groups.AbstractMetricGroup.counter(AbstractMetricGroup.java:302)
at org.apache.flink.runtime.metrics.groups.OperatorIOMetricGroup.<init>(OperatorIOMetricGroup.java:41)
at org.apache.flink.runtime.metrics.groups.OperatorMetricGroup.<init>(OperatorMetricGroup.java:48)
at org.apache.flink.runtime.metrics.groups.TaskMetricGroup.addOperator(TaskMetricGroup.java:146)
at org.apache.flink.streaming.api.operators.AbstractStreamOperator.setup(AbstractStreamOperator.java:174)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.setup(AbstractUdfStreamOperator.java:82)
at org.apache.flink.streaming.runtime.tasks.OperatorChain.<init>(OperatorChain.java:143)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:267)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711)
at java.lang.Thread.run(Thread.java:748)
I've tried this on a completely freshly prepared flink-1.6.0 release with following config and the precompiled "State machine job" in the examples folder:
metrics.reporters: grph
metrics.reporter.grph.class: org.apache.flink.metrics.graphite.GraphiteReporter
metrics.reporter.grph.host: localhost
metrics.reporter.grph.port: 2003
metrics.reporter.grph.interval: 1 SECONDS
metrics.reporter.grph.protocol: TCP
I use the official graphite docker image (https://hub.docker.com/r/graphiteapp/docker-graphite-statsd/) that is running on the default configuration.
Has anybody an idea, how i can fix this issue?
Thank's and best regards
update
to exclude that a specific local setting is responsible for this behaviour, I repeated the process on a clean EC2 instance. There's exactly the same error here.
How to reproduce:
start EC2 t2.xlarge
installed java
download flink at https://www.apache.org/dyn/closer.lua/flink/flink-1.6.0/flink-1.6.0-bin-scala_2.11.tgz
added the flink-metrics-graphite-1.6.0.jar to lib
configured the flink-yaml.conf as mentioned in my previous post
./bin/start-cluster.sh
./bin/flink run examples/streaming/StateMachineExample.jar
I have not set up graphite in this case, because the error obviously already
occurs before.
After the job has been started you can view the error in the flink dashboard under Task Manager -> Logs
Our deployments for the default module of a particular app are failing, seemingly at random, at least 50% of the time, which is constantly disrupting our workflow.
With verbose logging turned on via appcfg.py update app.yaml --verbose, this error appears on the terminal:
03:43 PM Uploaded 4 files and blobs.
03:43 PM Compilation starting.
2015-09-23 15:43:51,886 INFO appcfg.py:1735 Send: /api/appversion/precompile, params={'version': 'myversion', 'app_id': 'myappid', 'module': 'default'}
03:43 PM Compilation completed.
03:43 PM Starting deployment.
2015-09-23 15:43:54,215 INFO appcfg.py:1735 Send: /api/appversion/deploy, params={'version': 'myversion', 'app_id': 'myappid', 'module': 'default'}
2015-09-23 15:43:56,341 INFO appcfg.py:2601 HTTP Error (HTTP Error 400: Bad Request Unexpected HTTP status 400)
03:43 PM Rolling back the update.
2015-09-23 15:43:56,341 INFO appcfg.py:1735 Send: /api/appversion/rollback, params={'version': 'myversion', 'app_id': 'myappid', 'module': 'default'}
Error 400: --- begin server output ---
Client Error (400)
The request is invalid for an unspecified reason.
--- end server output ---
The failure is extremely consistent, in that most of the time we try deploying the module after not having deployed for a few hours, the deployment attempt will fail with the above output.
Then, without changing any app code, retrying the deployment usually succeeds (but at times, the second attempt also fails, requiring subsequent deployment attempts).
This problem started happening earlier this year. Once the problem started occurring, it has not ceased. Before it occurred, we had no no issues with deployments.
The version of the module being deployed has no effect on the rate of deployment success. We are using the Python runtime for this module.
I have already emailed a Solutions Architect from Google about this, but apart from upgrading to a paid support plan to ensure someone looks into this, he suggested I post on here with the hope that the App Engine support team gets back to me.
App Engine support team - can you find out what is going on (and ideally provide a fix)? If you need more information (such as my app ID), please let me know.
Currently the GAE Managed VMs feature is broken for any project with a name longer than 27 characters.
The underlying issue is that Docker restricts image namespace to between 4-30 chars. This has been fixed (https://github.com/docker/docker/issues/10392) but is still awaiting a release at time of writing.
It seems when deploying a Managed VM to GAE that the namespace is automatically generated from your project name plus _m_ prefix. This leads to error when attempting to deploy the vm:
DEBUG: "POST /v1.10/images/gcr.io/_m_<my project name>/<my project name>.default.20150330t140211/push HTTP/1.1" 500 111
INFO: Exception 500 Server Error: Internal Server Error ("Invalid namespace name (_m_<my project name>). Cannot be fewer than 4 or more than 30 characters.") thrown in ProgressHandler. Retrying.
The obvious solution would be for GAE gcloud tools to respect the underlying limit via some auto-truncation or hashing scheme.
Does anyone know a way around this? Or I have to wait for Google to fix or Docker to release a new version and Google to update?
We're aware of the issue and we're working on a long-term fix. For now, you can switch to an old version of gcloud. You can do this by setting this variable to point to an old version (0.9.51):
gcloud config set --scope=installation component_manager/fixed_sdk_version 0.9.51
then run "gcloud components update"
Then run "gcloud config set app/hosted_registry false"
and you should be able to deploy. I'll update this answer when we've fixed the naming issue.
UPDATE:
The naming issue has been fixed as of this week's release (0.9.57).