bee icon indicating copy to clipboard operation
bee copied to clipboard

308 Permanent Redirect loop querying for BZZ/

Open tmm360 opened this issue 3 years ago • 4 comments

Context

Using local node Bee 1.4.3 on LAN as a Full node.

Summary

I've tried to upload on a local node in LAN a sample file using Swarm Extension. File uploaded with success, but I'm not able to retrieve it back. Querying for its address http://<nodeIP>:1633/bzz/9f3ded7eb936d2d728904fb7e3be9181b08fa5eacafef0b053b9c0923420f267/ I keep to receive code 308 "Permanent Redirect" for the same address, and connection is aborted by browser with "ERR_TOO_MANY_REDIRECTS"

Expected behavior

The file should be retrievable, at least on localhost that received the upload. Or if chunks have been garbage collected, I could accept a 404, not a 308.

Actual behavior

I receive a loop with request headers:

GET http://<nodeIP>:1633/bzz/9f3ded7eb936d2d728904fb7e3be9181b08fa5eacafef0b053b9c0923420f267/ HTTP/1.1
Host: <nodeIP>:1633
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-GPC: 1
Accept-Encoding: gzip, deflate
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: fw_version=5.18.117; _pk_id.1.ca48=03192fd6d01eec24.1641952667.

and responses:

HTTP/1.1 308 Permanent Redirect
Content-Type: text/html; charset=utf-8
Location: /bzz/9f3ded7eb936d2d728904fb7e3be9181b08fa5eacafef0b053b9c0923420f267/
Vary: Accept-Encoding
Date: Wed, 09 Feb 2022 14:58:11 GMT
Content-Length: 106

<a href="/bzz/9f3ded7eb936d2d728904fb7e3be9181b08fa5eacafef0b053b9c0923420f267/">Permanent Redirect</a>.

tmm360 avatar Feb 09 '22 15:02 tmm360

me too

cyxywfh avatar Feb 10 '22 14:02 cyxywfh

@tmm360 thanks for submitting this bug report. I am not sure if you intentionally omitted the Steps to reproduce section from the bug report template, but giving some hints on how to reproduce, what was exactly uploaded, etc, would help us to eliminate guesswork and get to the bottom of this pronto. Thanks

acud avatar Feb 10 '22 16:02 acud

I know, sorry, but I was busy with other tasks and I was not able to leave for try to reproduce. Only reported thinking that a redirect would be a simple command to find in code. Anyway, MAYBE I was working with an expired postage batch, but I'm not sure. Sorry. If I will see it again, I will try to add more info.

tmm360 avatar Feb 10 '22 16:02 tmm360

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 12 '22 02:04 github-actions[bot]

@agazso this pr has solved this issue. I am closing this one as complete. https://github.com/ethersphere/bee/pull/3457

ghost avatar Oct 27 '22 04:10 ghost