s3cmd icon indicating copy to clipboard operation
s3cmd copied to clipboard

Something is wrong

Open clearly opened this issue 7 years ago • 9 comments

[MYUSER@MYHOST ~]$ stat .s3cfg 
  File: `.s3cfg'
  Size: 1889            Blocks: 8          IO Block: 4096   regular file
Device: fd02h/64770d    Inode: 524485      Links: 1
Access: (0644/-rw-r--r--)  Uid: (50441/ MYUSER)   Gid: (50441/ MYUSER)
Access: 2017-03-18 09:05:37.607081332 -0400
Modify: 2017-03-18 08:58:15.065920709 -0400
Change: 2017-03-18 09:05:32.978082163 -0400
[MYUSER@MYHOST ~]$ s3cmd ls s3://commoncrawl
ERROR: /home/MYUSER/.s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

clearly avatar Mar 18 '17 13:03 clearly

@clearly From the same console, does the command: "cat /home/MYUSER/.s3cfg" works? I guess that you scrambled the MYUSER in the console, but have you checked that it is not something related with running something with sudo or having done it. And so the user is not really the user? Like check if the check or the .s3cfg file is not in /root/ ?

fviard avatar Apr 02 '17 12:04 fviard

@clearly Ping?

fviard avatar Jun 25 '17 21:06 fviard

/home/ubuntu# s3cmd ls s3://lucky237 ERROR: /root/.s3cfg: None ERROR: Configuration file not available. ERROR: Consider using --configure parameter to create one. I have also same issue

luckyr14 avatar May 23 '18 12:05 luckyr14

@luckyr14 Can you run your command with the "-d" ? It might in fact be a "parsing" issue of your config file that makes the config loading failed. There error message just being the wrong one.

fviard avatar May 23 '18 12:05 fviard

I'm seeing this issue as well. -d prints a bunch of debug messages of the parsed config values, with no apparent error. Here's the last few lines:

$ s3cmd -d ls
...
DEBUG: ConfigParser: website_endpoint->http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
DEBUG: ConfigParser: website_error->
DEBUG: ConfigParser: website_index->index.html
ERROR: /home/ysimonson/.s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

I've configured s3cmd to point to a local server with an S3-like API. I bet it has something to do with that.

ysimonson avatar Feb 18 '19 21:02 ysimonson

Yep, that was it for me:

  1. AWS access/secret keys weren't set, so s3cmd implicitly made an API call to find out what it is
  2. The S3-like API I'm working on doesn't support that API call and gave a 404
  3. The config parser captures all IOErrors and assumes it happened because the config file doesn't exist

Ideally, it would only give this error if the config file really doesn't exist, rather than for any IOError. I'm not sure if other people are facing the same issue though.

ysimonson avatar Feb 18 '19 21:02 ysimonson

I am facing the same issue. Has anyone successfully fixed it?

rkazakov avatar May 11 '22 00:05 rkazakov

@rkazakov the issue here was that the environment variables weren't set, so it threw an error and called it an IOError (Not found) as @ysimonson had explained.

Quixotical avatar Jun 30 '22 19:06 Quixotical

2.3.0 for me still shows up with this error message

ERROR: /home/.s3cfg: Connection refused
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

When the config file does not exist or it does exist and something like the S3 Endpoint is not set. This is a very misleading error message.

459below avatar Jan 18 '24 19:01 459below