-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error syncing tables to S3 after upgrading to 2.5.0 from 2.4.2 - "invalid key: " #5909
Comments
Very strange, the only change was updating the version from 2.4.2 to 2.5.0? |
The error comes from here: https://github.com/grafana/loki/blob/8f024954539b5eb706ab3ef967c4b1696ad04fd6/pkg/storage/stores/shipper/storage/cached_client.go#L149-L148 And in your errors it shows up as an empty string The objects being iterated over come from a bucket list operation and this implies it's getting back an object which has a blank key which is strange. What object storage are you using? |
@sandeepsukhani I wonder if instead of erroring we should log the error and continue? WDYT? |
@slim-bean I am using HCP which is S3 compatible.
Could this error be related to files being deleted in the bucket that Loki itself didn't do? Looking at the different index folders I see files that were deleted but no compactor file can be found: And for loki_index_19095 which the error is about the content looks like this: Loki is constantly trying to read specific index folders all the time besides the newest one |
It's not expected for an index folder to be empty unless there were no logs for the entire day.. |
i do suspect their is either an edge case here where this particular s3 implementation returns a list operation slightly different from others. i think we should not error and fail though in this scenario and instead move on to the next index item, ill work with the team to make that change. not sure about the missing folder. when you say "deleted that loki didnt do" do you mean you know another person or process is deleting files outside of loki? |
Also the storage I use (HCP) does not support aws signature_version2. |
This is an issue we also have that is stopping us from updating. Same problem, same storage (HCP). |
Yep, same problem for me using Loki2.5.0 and HCP. |
I seem to be observing the same issue with Ceph as backend, for a newly setup loki installation though (didn't work yet, but be a different issue). At least the stack trace is the same, though. |
Sorry for the trouble here folks. @sandeepsukhani could you take a look at this, #5909 (comment) I think that not all object stores do a list query exactly the same and we should probably change this to not error. We've been doing a lot of changes in main, once we get things a little more stable in the next couple weeks we'll see if we can get an RC for a 2.5.1 which fixes this for folks to try 👍 |
Running loki inside the debugger, I realized what was wrong in my case: I messed up configuration, specifically I had setup following s3 configuration:
resulting in requests similar to Working configuration:
This might be not specific to the originally posted issue, unless there was some kind of magic that catched the bucket name from the URL. Would probably be a good input validation and docs hint anyway that this kind of configuration is wrong, the error message was barely helpful, and I only was able to understand what's going on after running the debugger for two hours. |
I think it is the same issue as fixed in PR #3173. However, I can't verify it since I am failing to create an account on Hitachi Cloud. I have opened PR #6123 with a possible fix. If someone wants to unblock themselves then they can try the docker image |
HI,
I csnt pull that image.
Regards,
Greg
…On Mon, May 9, 2022 at 6:48 PM Sandeep Sukhani ***@***.***> wrote:
I think it is the same issue as fixed in PR #3173
<#3173>. However, I can't verify it
since I am failing to create an account. I have opened PR #6123
<#6123> with a possible fix. If
someone wants to unblock themselves then they can try the docker image
grafana/loki:v2.5.0-with-pr-6123-a630ae3 which has the fix on top of
v2.5.0. Please let me know if it works or not so that we can proceed
accordingly.
—
Reply to this email directly, view it on GitHub
<#5909 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJQK7X3YI6WC2MGNRBVJU43VJDGM5ANCNFSM5TLBNHHQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Never mind, The pull worked with a bit of fiddling.
…On Wed, May 11, 2022 at 2:11 PM g faz ***@***.***> wrote:
HI,
I csnt pull that image.
Regards,
Greg
On Mon, May 9, 2022 at 6:48 PM Sandeep Sukhani ***@***.***>
wrote:
> I think it is the same issue as fixed in PR #3173
> <#3173>. However, I can't verify it
> since I am failing to create an account. I have opened PR #6123
> <#6123> with a possible fix. If
> someone wants to unblock themselves then they can try the docker image
> grafana/loki:v2.5.0-with-pr-6123-a630ae3 which has the fix on top of
> v2.5.0. Please let me know if it works or not so that we can proceed
> accordingly.
>
> —
> Reply to this email directly, view it on GitHub
> <#5909 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJQK7X3YI6WC2MGNRBVJU43VJDGM5ANCNFSM5TLBNHHQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Hi,
Looks like you might be on a winner. 2.5.0 was dying almost immediately
whereas your patched version is staying up, collecting logs and displ;aying
data. I'll leave it running overnight and give you an update in the
morning.
Cheers,
Greg
…On Wed, May 11, 2022 at 2:24 PM g faz ***@***.***> wrote:
Never mind, The pull worked with a bit of fiddling.
On Wed, May 11, 2022 at 2:11 PM g faz ***@***.***> wrote:
> HI,
> I csnt pull that image.
> Regards,
>
> Greg
>
> On Mon, May 9, 2022 at 6:48 PM Sandeep Sukhani ***@***.***>
> wrote:
>
>> I think it is the same issue as fixed in PR #3173
>> <#3173>. However, I can't verify it
>> since I am failing to create an account. I have opened PR #6123
>> <#6123> with a possible fix. If
>> someone wants to unblock themselves then they can try the docker image
>> grafana/loki:v2.5.0-with-pr-6123-a630ae3 which has the fix on top of
>> v2.5.0. Please let me know if it works or not so that we can proceed
>> accordingly.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#5909 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AJQK7X3YI6WC2MGNRBVJU43VJDGM5ANCNFSM5TLBNHHQ>
>> .
>> You are receiving this because you commented.Message ID:
>> ***@***.***>
>>
>
|
Facing this same issue with GCS Storage as well using Loki v2.6.0, also this seems not been fixed in the higher version, so please can someone add those changes for GCS storage as well. |
After upgrading from 2.4.2 to 2.5.0, the reader instance of Loki can no longer sync index tables with S3 storage.

Problem occours when trying to search for anything via Grafana interface:
On the log for the read instance the following can be seen:
The following stacktrace can be observed after restarting the container:
Downgrading back to 2.4.2 resolves this issue and objects can be seen downloaded from the S3 storage.
Config used for Loki:
Container args:
Any idea what is going on here?
The text was updated successfully, but these errors were encountered: