aws-deepracer-community / deepracer-core

A repository binding together everything needed for DeepRacer local.
259 stars 112 forks source link

Evaluation fails with an error "The security token included in the request is invalid" #56

Closed lokesh051 closed 3 years ago

lokesh051 commented 5 years ago

botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the Cancel Simulation Job operation: The security token included in the request is invalid.

crr0004 commented 5 years ago

That is caused by the scripts trying to access AWS with a bad security token. All the AWS calls are normally disabled or redirected by environment variables. It's normally caused by setup problem however the cancel API sometimes comes up as a regression. Can you make sure you have the latest code from the repo?

lokesh051 commented 5 years ago

Yes, My repo is updated. Here is what all I have tried

  1. Clear all the old aws credentials
  2. Create new credentials
  3. I have made sure that the file deepracer_racetrack_env.py has these lines "isLocal = os.environ.get("LOCAL") if isLocal != None: session = boto3.session.Session() robomaker_client = session.client('robomaker', region_name=self.aws_region) robomaker_client.cancel_simulation_job( job=self.simulation_job_arn )"

Can't seem to solve this error btw I am training on a mac

lokesh051 commented 5 years ago

Also I am getting this error as well [ERROR] Unable to import the waypoints [Errno 2] No such file or directory: '/app/robomaker-deepracer/simulation_ws/install/deepracer_simulation/share/deepracer_simulation/routes/Mexico_Track.npy'

previously reported by @vsay01

lokesh051 commented 5 years ago

I was getting the above error when I ran this command docker run --rm --name dr --env-file ./robomaker.env --network sagemaker-local -p 8080:5900 -it crr0004/deepracer_robomaker:console

I solved the error by running this command
docker run --rm --name dr --env-file ./robomaker.env --network sagemaker-local -p 8080:5900 -v $(pwd)/aws-robomaker-sample-application-deepracer/simulation_ws/src:/app/robomaker-deepracer/simulation_ws/src -v $(readlink -f ../robo/checkpoint):/root/.ros/ -it crr0004/deepracer_robomaker:console "./run.sh build distributed_training.launch" from your repo

I think this might be the error It is looking for the Mexico_track.npy file in the "/simulation_ws/install/deepracer_simulation/" but when I checked the directory the path hierarchy is "/simulation_ws/src/deepracer_simulation/" The reason why second command works is because we explicitly define the path whereas in the first command it just looks in some other directory

breadcentric commented 3 years ago

We've moved on to using https://github.com/aws-deepracer-community/deepracer-for-cloud for running deepracer in local env

Closing