Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Error response from server, AWS Error: NoCredentialProviders no valid providers in chain \u003cnil\u003e #205

Open
jonathan-kosgei opened this issue Apr 9, 2017 · 1 comment

Comments

@jonathan-kosgei
Copy link

jonathan-kosgei commented Apr 9, 2017

Hi I'm running into this too

root@ip-172-31-23-121:~# convoy --version
convoy version v0.5.0
root@ip-172-31-23-121:~# convoy list
{}
root@ip-172-31-23-121:~# convoy create test_volume
ERRO[0000] Error response from server, AWS Error:  NoCredentialProviders no valid providers in chain <nil>

 
{
	"Error": "Error response from server, AWS Error:  NoCredentialProviders no valid providers in chain \u003cnil\u003e\n\n"
}

My systemd file looks like this

[Unit]
Description=Convoy volumes
Requires=docker.service
After=docker.service

[Service]
EnvironmentFile=-/root/.aws/credentials
EnvironmentFile=-/root/.aws/config
ExecStart=/usr/local/bin/convoy daemon --drivers ebs 2>> /var/log/convoy/stderr.log 1>> /var/log/convoy/stdout.log
ExecStop=killall convoy
Environment=HOME=/root
Restart=always

[Install]
WantedBy=local.target

If I run /usr/local/bin/convoy daemon --drivers ebs in one terminal and try to create a volume in the other terminal I get as far as

root@ip-172-31-23-121:~# convoy create test_volume
ERRO[0016] Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: EOF 
{
	"Error": "Post http://%!F(MISSING)var%!F(MISSING)run%!F(MISSING)convoy%!F(MISSING)convoy.sock/v1/volumes/create: EOF"
}

And the logs show

time="2017-04-10T04:11:09Z" level=debug msg="Calling: POST, /volumes/create, request: POST, /v1/volumes/create" pkg=daemon 
time="2017-04-10T04:11:09Z" level=debug msg= event=create object=volume opts=map[BackupURL: VolumeName:test_volume VolumeDriverID: VolumeType: VolumeIOPS:0 PrepareForVM:false Size:0] pkg=daemon reason=prepare volume="test_volume" 
time="2017-04-10T04:11:14Z" level=debug msg="Adding tags for vol-09ba530d73a831bdb, as map[Name:test_volume]" pkg=ebs 
time="2017-04-10T04:11:14Z" level=debug msg="Created volume test_volume from EBS volume vol-09ba530d73a831bdb" pkg=ebs 
time="2017-04-10T04:11:14Z" level=debug msg="Attaching vol-09ba530d73a831bdb to i-0afb9911b842b3306's /dev/sdh" pkg=ebs 
time="2017-04-10T04:11:20Z" level=debug msg="Attached EBS volume vol-09ba530d73a831bdb to /dev/xvdh" pkg=ebs 
time="2017-04-10T04:11:20Z" level=debug msg="Created volume" event=create object=volume pkg=daemon reason=complete volume="test_volume" 
@ipacho
Copy link

ipacho commented Aug 3, 2017

@jonathan-kosgei
I faced similar situation, 'NoCredentialProviders' error occurred while creating backup to S3.
Finally I solved. if using EC2 instance, we need to attach IAM role to EC2 instance which allow access to other AWS Services.

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

No branches or pull requests

2 participants