-
Notifications
You must be signed in to change notification settings - Fork 879
S3 Region #400
Comments
Hi @shreyu86 Any error message in the logs when you try to push / pull? Thanks,
|
I get 502 trying to pull or push also if I ping registry I get a 404. Logs
|
What do you mean by that?
Still, can you gist your registry logs / output? Thanks a lot. |
I'll send the gists soon (out for lunch). Thanks for the fast reply.
|
This is the gist of the logs: https://gist.github.com/shreyu86/cc4ae0f6b7f4e329438a have redacted some contents. also if I ping registry I get a err not 404 but I cant see the page which shows registry version and setting flavor. when I do a ping using curl here is the response I get: curl -X GET HOST:5000/v1/_ping |
So, /ping is not 404, right? Instead, the server appears not to be started / bound. Let me try tomorrow with a s3 region and see if that works for me. Keep me posted if anything new meanwhile. Best. |
Thanks! No Ping is not 404, that was a confusion, as of now I have commented out the S3 region. Registry seems to be running fine without s3_region. Also in similar situations I used following method to connect to S3: import boto.s3.connection
def connect_to_s3(settings):
return boto.s3.connection.S3Connection(
aws_access_key_id=settings.aws.auth.access_key_id,
aws_secret_access_key=settings.aws.auth.secret_access_key,
host=settings.s3.host
) In this method assume settings to be a dot dictionary object. Also I am out of sync with the latest changes (couple of them major) so opened an issue instead of PR. Will surely dig into this more. |
Just curious @dmp42 were you able to repro the issue? |
I haven't had time yet to get to it, sorry for that - will sure do later today and keep you posted though! |
Thanks!
|
I've opened #405 as a solution to this issue. I have patched our private -Shreyas Shreyas On Mon, Jun 2, 2014 at 7:40 AM, Shreyas Karnik shreyu86@gmail.com wrote:
|
I just created a new bucket, in the us-west-2 region - I'm using us-west-2 as a region in the configuration and it works for me... So, we need to dig deeper. Can you provide with additional infos?
Thanks a lot! |
@dmp42 here is the information you requested.
Thanks for looking into this. |
Can you get this gist: https://gist.github.com/dmp42/8436a9be2c569bd75965 And try run it from where you are? (obviously replace bucketname = 'XXXX' Also, can you put Thanks a lot! |
It worked. Here is the output: Gonna connect without region |
This is getting really weird.
Sorry for the long walk, but I see no other way to get to the bottom of this... |
Here are my redacted settings just in case you need to take a look at those: |
Unless I'm mistaken, this can't work: you are telling the registry to use Is this a typo or did you move some stuff and were launching with this? Thanks. |
Err typo in cleaning and redacting. Correct set of commands are
|
Ok... this doesn't make any sense... If you successfully connected using the test script I provided, there is absolutely no reason why the registry wouldn't connect. This is almost exactly the same code... One last shot: did you run the test script on the same machine that you use to run the registry? Otherwise, I see no resolution to this :-( As I can't reproduce on my own setup - there is only two possibilities:
Sorry for not being able to be more helpful... |
One last shot: did you run the test script on the same machine that you use to run the registry? Gonna connect without region I guess inside of EC2 it is a minimal difference with and without regions but not sure about its impact. I will try my hand at debugging boto. Regarding the bucket, will have to jump through a lot of permission issues so right now will try to debug this issue at my end and post findings here. Thanks for the help, also I will try it with a fresh S3 bucket as whenever I update the registry I use the same bucket, I've been using private registry since a long time so will do this test with a fresh S3 bucket and see if I face the same issue or not. I will surely post any findings here. Thanks @dmp42 I really appreciate your help. |
Actually I think I am OK with not using explicit region declaration in the registry config because while debugging this issue I found that boto redirects the bucket to the underlying region, some logs (not in that order from registry logs)
I think right now this is one short term optimization I can make, but will visit this during off hours to get to the bottom. |
@shreyu86 Ok - please keep me update of any progress on this. |
I'm also running into this issue. I'm using registry:latest on docker.io. Here's my startup command:
It seems that setting the region doesn't solve the broken_pipe error I'm getting on push. |
I tried it outside the container and had the same issue |
@mattheworiordan read my comment please |
Same python libraries, different system deps. Pointing at libevent-dev ? Can anyone do tests with different ubuntu versions? |
using Ubuntu 12.04 |
Actually just compared my error more closely and it seems to be a slightly different error I'm experiencing. |
@dmp42 any official update/workaround on this? |
@shreyu86 for now, I would support specifying the region inside the boto.cfg file. |
Thanks! Shreyas On Fri, Sep 5, 2014 at 4:32 PM, Olivier Gambier notifications@github.com
|
I've created a set of small dockerfiles that do the workaround (boto.conf && remove aws region from sampe_config.yml ) - https://github.com/jvimr/docker.registry |
@jvimr you are a legend! works perfectly :) |
This looks like a gevent bug dealing with unicode. It's triggered by specifying the region in boto, which pulls the URL from the boto region file which has unicode strings. If you don't specify the region, it uses the default which is not unicode, so therefore it works. It can be reproduced (in both docker/ubuntu and Mac OS X) by doing the following:
If you change the host to a non-unicode, it works. Oddly, if you put the Also, if you have it in both a.py and b.py, it works. If you put a unicode string in b.py and a normal string in a.py, it will hang. This would be an ugly workaround:
or some way if specifying a Side note discovered while investigating: ADDENDUM
I went into a bit more detail on how it works in boto in: |
@chuegle !!!! Awesome research. Is there an upstream (gevent) ticket for this? Otherwise, do you have an ETA for this to hit a boto release? |
The gevent ticket (although there may be more than one): As far as a boto eta, I haven't submitted a patch and haven't heard back on my comments there, so I can't really say. I'll see if I have time this week to implement one of the fixes for boto and do a pull request, but would still have no idea how long it is until the next rev is pushed or if this change would make it in. |
Fixed thanks to @chuegle incredible work! |
Any idea when / version in which this will be made available ? |
@hartym was released with 0.9 IIRC. |
@dmp42 I could not start a registry container using 0.9/latest tag, backed on S3. The container is working fine with local filesystem backend, but S3 connection never worked. I could connect to the same bucket with the same aws keys using raw boto though. At best, the container was hanging after AWS ...somecrypticstring... line. For now, I did put aside the setup of my own registry, I will dive more into it early next year. Not sure my problem is related to this ticket, but all pointers I found around were heading me here. |
@hartym if you delay your deployment to next year, fair enough - if you still have time to test, can you copy your configuration, launch command, and log? Thanks a lot. |
@dmp42 seems like the "latest" image was not the same as 0.9.0, and after running brand new tests, I achieved to run the registry (with S3 storage on europe region and sqlalchemy search backend). Thanks for your help and sorry for bothering. |
@hartym happy you got it working! |
Following is the problem I noticed with 0.7.0
When I specify
s3_region
asus-west-2
in my config, registry is up but I cannot pull or push.If I comment out
s3_region
then everything is fine. I have confirmed on S3 that the region of my bucket is us-west-2Has anyone else experienced this? Logs show that registry is connecting to BUCKET_NAME.s3-us-west-2.amazonaws.com but I cannot pull or push.
I would appreciate any help/pointers on this issue.
The text was updated successfully, but these errors were encountered: