Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.amazonaws.AmazonServiceException: AWS was not able to validate the provided access credentials #24

Open
Vinay-Venkatesh opened this issue May 21, 2018 · 7 comments

Comments

@Vinay-Venkatesh
Copy link

Hi,

I am running into the below issue:
java -DawsAccessKey="*******" -DawsSecretKey="********" -DipAddress="grid.workerbee.co.in" -cp automation-grid.jar org.openqa.grid.selenium.GridLauncher -role hub -servlets "com.rmn.qa.servlet.AutomationTestRunServlet","com.rmn.qa.servlet.StatusServlet"

I am sure, I am providing an valid AccessKey and SecretKey. I was able to test this from aws cli and did not find any issues in retrieving aws data.

Could someone please help over this.

Thank you in advance.

@RayChenLDL
Copy link

Hi Mat,

I have the same issue. The log error from the hub console is below, am pretty sure I have provided the correct aws credentials.

Sep 27, 2018 11:46:52:530 AM - INFO [qtp750468423-21] [AutomationTestRunServlet] 10 threads requested
Sep 27, 2018 11:46:52:531 AM - INFO [qtp750468423-21] [AutomationTestRunServlet] 2 nodes will be started for run [testRun1]
Sep 27, 2018 11:46:52:544 AM - INFO [qtp750468423-21] [AwsVmManager] Setting image id: ami-d216a3ba
Sep 27, 2018 11:46:52:544 AM - INFO [qtp750468423-21] [AwsVmManager] Setting instance type: c4.large
Sep 27, 2018 11:46:52:545 AM - INFO [qtp750468423-21] [AwsVmManager] Sending run request to AWS...
Sep 27, 2018 11:46:54:389 AM - ERROR [qtp750468423-21] [AutomationTestRunServlet] Error trying to start nodes:
com.amazonaws.AmazonServiceException: AWS was not able to validate the provided access credentials (Service: AmazonEC2; Status Code: 401; Error Code: AuthFailure; Request ID: deb363f9-040f-4f10-8b1b-c5f78217148d)

@ambirag
Copy link

ambirag commented Sep 27, 2018

java -Xms2048m -Xmx4096m \
-DpropertyFileLocation=/opt/hub/aws.properties.default \
-DipAddress="${IP_ADDRESS}" \
-DtotalNodeCount=100 \
-DPOOL_MAX=1024 \
-cp /opt/hub/automation-grid.jar org.openqa.grid.selenium.GridLauncherV3 \
-servlets "com.rmn.qa.servlet.AutomationTestRunServlet","com.rmn.qa.servlet.StatusServlet" \
-role hub \
-hubConfig /opt/hub/hub.static.json \
-log grid.log
@RayChenLDL @xxCoDeBoX note the GridLauncherV3
Also try having the keys under ~/.aws/credentials or ~/.aws/config

@RayChenLDL
Copy link

Thanks Ragavan, appreciated it. It worked after removing the aws credentials from command line ( instead, I setup the AWS credentials using aws configure before starting the selenium hub).

@RayChenLDL
Copy link

RayChenLDL commented Oct 2, 2018 via email

@sivakumarms
Copy link

Hi All,

I have the same issue. I have used the AWS Secret and Access keys inline with the Java command, it wasn't working. This is throwing "AWS was not able to validate the provided access credentials".

Post that following this post I have changed it aws configure or aws config but I get an additional exception saying, "falling back on IAM role as access / secret key not configured" This indicates that the aws configure / aws config is not making any effect. I have tried this with ec2-user / root but the issues exist.

Is there anything I am potentially doing wrong here?

@khoshalarpy
Copy link

Hi,

We had same issue and spent quite sometime trying figure out the issue, finally we had to update aws java sdk to 1.9 (1.10 also works) and rebuild the jar which worked with ~/.aws/credentials , hope this information would help someone facing same issue,

Also , can you please let me know where can we download/find the jar file for node, I have tried using below versions but getting an server error 500 response and node is unable to register to grid(though autoscaling works fine)

Execution commsnd : java -Dwebdriver.chrome.driver="/opt/packages/chromedriver" -jar selenium-server-standalone-3.4.0.jar -role node -nodeConfig /opt/packages/node.linux.json

selenium-server-standalone-3.4.0.jar
selenium-server-standalone-3.141.59.jar
selenium-server-standalone-3.14.0.jar
selenium-server-standalone-3.11.0.jar

@khoshalarpy
Copy link

Hi @ambirag / @xxCoDeBoX / @RayChenLDL

When we executing the tests , the nodes are getting terminated exactly at 20 minutes and we have been looking at the configurations for this but could not find , appreciate any help on this

please let me know if any specific configuration/parameter needs to be passed to resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants