1

I use ami-05ffb06f, t2.micro EC2 instance.

I use cloud-config to start etcd, but it fails to start

Error:  client: etcd cluster is unavailable or misconfigured
error #0: dial tcp 127.0.0.1:4001: connection refused
error #1: dial tcp 127.0.0.1:2379: connection refused

I tried to manually start it

cd /bin  
./etcd

It says

[etcd] Jan 18 09:49:46.555 WARNING   | Using the directory ip-172-31-1-86.ec2.internal.etcd as the etcd curation directory because a directory was not specified.
[etcd] Jan 18 09:49:46.555 CRITICAL  | Unable to create path: mkdir ip-172-31-1-86.ec2.internal.etcd: read-only file system

Now if I set data-dir parameter to home it works fine

./etcd -data-dir=~/

Why can't it create the folder in its default location?

Falcon Momot
  • 24,975
  • 13
  • 61
  • 92

1 Answers1

1

This generally means nothing is listening or a firewall is blocking see the link below.

Error: client: etcd cluster is unavailable or misconfigured error #0: dial tcp 127.0.0.1:4001: connection refused error #1: dial tcp 127.0.0.1:2379: connection refused

This

CRITICAL | Unable to create path: mkdir ip-172-31-1-86.ec2.internal.etcd: read-only file system

Suggests that the filesystem you are trying to write to is read only, I guess you may get this message if the user you are trying to run the startup as doesn't have suitable privilege.

There are some ideas here on how to determine if the filesystem is readonly. If it's not then ensure that teh user has suitable privileges etc.

user9517
  • 114,104
  • 20
  • 206
  • 289