AWS Request Expired Error - node.js

I'm trying to execute a script in which an AWS security group is created using NodeJS. When I try and run the script I get an error saying:
Error { RequestExpired: Request has expired.
Has anyone seen this? What does it mean? I thought the time between my local machine and the AWS Host might be off so I set a new timezone in my script to make up for the difference but still same error.

Related

"Error: Internal error encountered" while running RequestSync to Google Homegraph API - Node.js

I am using a Nodejs client to integrate with Google Smart Home.
When I request to RequestSync API, it sometimes shows the following error.
Error: Internal error encountered.
Although I saw the above error, it seems that the SYNC request has been triggered properly.
Does anyone know why this happens?
Since the request failed and returned an error, our app retries the RequestSync again and again, so I'd like to fix the error if possible.
Thank you.
Environment
#googleapis/homegraph: 3.0.2
Nodejs: 18.4.0

z.run("paragraphId") not working in Zeppelin

I am trying to run paragraphs using zeppelin spark object method
z.run("noteId","paragraphId")
z.run("paragraphId")
I have tried both the methods, but nothing seems to be triggering the next paragraph. I do not get any errors also. Please let me know if I am missing something here.
On checking the zeppelin server logs I am getting the below error :
ERROR [2020-08-26 15:46:37,742] ({Thread-35} RemoteInterpreterEventPoller.java[run]:250) - Can't handle event RemoteInterpreterEvent(type:RUN_INTERPRETER_CONTEXT_RUNNER, data:{"logger":{"traceCapable":true,"name":"org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$ParagraphRunner"},"noteId":"2FHDFMR16","paragraphId":"20200819-131115_701985359"})
org.apache.zeppelin.rest.exception.ForbiddenException: HTTP 403 Forbidden
at org.apache.zeppelin.socket.NotebookServer.onRemoteRunParagraph(NotebookServer.java:2153)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterEventPoller.run(RemoteInterpreterEventPoller.java:141)
I have created my notebook using the admin user only. Do we need to provide any special access? I am just using admin user.
Update 1:
I changed notebook settings in which we removed user and owner permissions. It's triggering, but it's with an anonymous user. It will be a problem if we are working in multi-user environment.
I think instead of that
Try
z.z.run

"Resource temporarily unavailable" error trying to run nodejs app in AS/400

I need to connect a NodeJS to AS/400 server. In order to do that, I installed NodeJS in AS/400 with IBM documentation and tryed (succesfully) to send and receive data with Class iDataQueues (https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20i%20Technology%20Updates/page/Toolkit%20for%20i%20APIs?section=Class%20iDataQueue) between AS/400 server and my develope computer. My next step was to run a program (Class iPgm) to received some data.
I'm running my test with
/path/to/ibm/node/installation/node /home/test/app.js"
and I'm getting a "node[537]: pthread_create: Resource temporarily unavailable" error, but I have no idea what is the problem:
Server has enough resources
There are not any node running in server
There are not any changes in server config between iDataQueue and iPgm tests
I have root privileges
I think my code is not the problem because I dont' even run it ¬¬'
This is caused by running node in QSH. By default QSH does not support running threads, so any attempt to create a thread will result in that "Resource temporarily unavailable" message. This can fixed by setting the environment variable QIBM_MULTI_THREADED=Y prior to running QSH, using QP2TERM, or using SSH.

Pulling image from ECR via docker-py

I have a script that retrieves a login for ECR, authenticates a DockerClient instance with the login credentials (reauth set to True), and then attempts to pull a nominated container image.
The code seems to work perfectly when running on my local machine interacting with docker daemon on an EC2 instance, but when running from the EC2 instance I am constantly getting
404 Client Error: Not Found ("repository XXXXXXXX.dkr.ecr.eu-west-2.amazonaws.com/autohld-runner not found: does not exist or no pull access")
The same repo is being used for both executing the code locally and remotely on the EC2 instance. I have tried setting the access to the image within ECR to allow pull for both everyone and my AWS ID. I have granted the role assigned to the EC2 instance Full Admin access also. All with no joy.
If I perform the same tasks on the EC2 instance via command line with the exact same repo URI (copied from the error), it works with no issue.
Is there something I am missing within docker-py ?
url = "tcp://127.0.0.1:2375"
dockerd = docker.DockerClient(base_url=url, version='auto')
dockerd.login(username=ecr.username, password=ecr.password, email='none', registry=ecr.registry, reauth=True)
dockerd.images.pull(ecr.get_repo(instance.tags['Container']), tag='latest')
get_repo returns the full URI as reported in the error message, the Container element is the name 'autohld-runner'
Thanks
It seems that if the registry has been accessed via the cli then an auth token or something is set and docker remembers this allowing subsequent calls to work. However in this case the instance is starting up completely fresh and using the login method within docker-py.
This doesn't seem to pass the credentials on to the pull, I have found that using the auth_config named argument and passing in a dictionary of auth parameters works.
auth_creds = {'username': ecr.username, 'password': ecr.password}
dockerd.images.pull(ecr.get_repo(instance.tags['Container']), tag='latest', auth_config=auth_creds)
HTH

errror when trying to run rds cli commands

I have the following error when trying to run the rds cli command, I have looked and cannot find anything related which describes why I am getting this error:
rds rds-describe-db-instances
rds-describe-db-instances: Refused: Signature expired: 20160721T013819Z is now earlier than
20160721T151824Z (20160721T153324Z - 15 min.)
I am trying to extract logs from the RDS instance, In the past I was able to extract the logs successfully, The credentials have not changed.
Any idea why I am getting this issue?

Resources