Skip to content
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

302 ERR_TOO_MANY_REDIRECTS #431

Closed
tree1123 opened this issue Apr 23, 2021 · 16 comments
Closed

302 ERR_TOO_MANY_REDIRECTS #431

tree1123 opened this issue Apr 23, 2021 · 16 comments

Comments

@tree1123
Copy link

it seems everything is ok。
but when i Go to http://serverip

the url become http://serverip/accounts/login/?next=/accounts/login/
and tell me ERR_TOO_MANY_REDIRECTS

why?

@catborise
Copy link
Collaborator

how do you install it? docker? or manual?

@tree1123
Copy link
Author

how do you install it? docker? or manual?

manual CentOS 8.2

and when i enter supervisorctl status
gstfsd RUNNING
novncd RUNNING
webvirtcloud RUNNING

it seems everything is OK

but when i Go to http://serverip
ERR_TOO_MANY_REDIRECTS 302 Happen

@tree1123
Copy link
Author

First when i Go to http://serverip
show me 502 BadWay

then i enter setsebool -P httpd_can_network_connect 1

502 disappear and 302 Happen

who can help me ?

@tree1123
Copy link
Author

tree1123 commented Apr 24, 2021

when i enter wget localhost:8000

-2021-04-23 23:26:34-- http://localhost:8000/
正在解析主机 localhost (localhost)... ::1, 127.0.0.1
正在连接 localhost (localhost)|::1|:8000... 失败:拒绝连接。
正在连接 localhost (localhost)|127.0.0.1|:8000... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:/accounts/login/?next=/ [跟随至新的 URL]
--2021-04-23 23:26:34-- http://localhost:8000/accounts/login/?next=/
正在连接 localhost (localhost)|127.0.0.1|:8000... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:/accounts/login/?next=/accounts/login/ [跟随至新的 URL]
--2021-04-23 23:26:34-- http://localhost:8000/accounts/login/?next=/accounts/login/
正在连接 localhost (localhost)|127.0.0.1|:8000... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found

@ycadin
Copy link

ycadin commented Apr 24, 2021

Same issue on Ubuntu 20.04 (from Safari) after manual installation (I followed instructions given on the GitHub main page).

@catborise
Copy link
Collaborator

can you please try it with docker or podman.
you will find the instructions at wiki page.

@tree1123
Copy link
Author

Same issue on Ubuntu 20.04 (from Safari) after manual installation (I followed instructions given on the GitHub main page).

do you solved the problem? I try everything,but it donot work

@tree1123
Copy link
Author

can you please try it with docker or podman.
you will find the instructions at wiki page

OK thank you .
which way is better in centos8. 2
docker?

@ycadin
Copy link

ycadin commented Apr 25, 2021 via email

@tree1123
Copy link
Author

Tried on CentOS 7 (following your instructions) then with Docker: ALWAYS the same error "too many redirections". I'm really curious to understand the reason of the issue. With cURL (if it can helps) : gen8lm2:webvirtcloud root# docker run -d -p 8888:80 -p 6080:6080 retspen/webvirtcloud:1 274f972df1a6f02d1d4f375a790719d76db75b7d34188d0d631b400260389ea8 gen8lm2:webvirtcloud root# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 274f972df1a6 retspen/webvirtcloud:1 "/sbin/my_init" 6 seconds ago Up 3 seconds 0.0.0.0:6080->6080/tcp, :::6080->6080/tcp, 0.0.0.0:8888->80/tcp, :::8888->80/tcp loving_ramanujan gen8lm2:webvirtcloud root# curl localhost:8888 gen8lm2:webvirtcloud root# curl -I localhost:8888 HTTP/1.1 302 Found Server: nginx/1.14.0 (Ubuntu) Date: Sun, 25 Apr 2021 00:07:05 GMT Content-Type: text/html; charset=utf-8 Content-Length: 0 Connection: keep-alive Location: /accounts/login/?next=/ Vary: Accept-Language, Cookie Content-Language: en Le dim. 25 avr. 2021 à 00:00, catborise @.***> a écrit :

can you please try it with docker or podman. you will find the instructions at wiki page. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#431 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUM2JVB3UYUYINWWZHENOTTKM5RHANCNFSM43OEWTMQ .
-- Sincèrement, Yannick Cadin Diablotin - La formation Unix, Linux, xBSD, OS X, Solaris, AIX, HP-UX

i try

curl -I localhost

HTTP/1.1 302 Found
Server: nginx/1.14.1
Date: Sun, 25 Apr 2021 00:25:27 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: /accounts/login/?next=/
Vary: Accept-Language, Cookie
Content-Language: en

@ycadin
Copy link

ycadin commented Apr 25, 2021 via email

@tree1123
Copy link
Author

I meant you can reproduce the issue, while looking at the headers, with in fact (I added the L option which fakes the typical behavior of a web browser): curl -IL localhost:8888 Le dim. 25 avr. 2021 à 02:26, tree1123 @.> a écrit :

Tried on CentOS 7 (following your instructions) then with Docker: ALWAYS the same error "too many redirections". I'm really curious to understand the reason of the issue. With cURL (if it can helps) : gen8lm2: webvirtcloud root# docker run -d -p 8888:80 -p 6080:6080 retspen/webvirtcloud:1 274f972df1a6f02d1d4f375a790719d76db75b7d34188d0d631b400260389ea8 gen8lm2: webvirtcloud root# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 274f972df1a6 retspen/webvirtcloud:1 "/sbin/my_init" 6 seconds ago Up 3 seconds 0.0.0.0:6080->6080/tcp, :::6080->6080/tcp, 0.0.0.0:8888->80/tcp, :::8888->80/tcp loving_ramanujan gen8lm2: webvirtcloud root# curl localhost:8888 gen8lm2:webvirtcloud root# curl -I localhost:8888 HTTP/1.1 302 Found Server: nginx/1.14.0 (Ubuntu) Date: Sun, 25 Apr 2021 00:07:05 GMT Content-Type: text/html; charset=utf-8 Content-Length: 0 Connection: keep-alive Location: /accounts/login/?next=/ Vary: Accept-Language, Cookie Content-Language: en Le dim. 25 avr. 2021 à 00:00, catborise @.
> a écrit : … <#m_5671499286464406501_m_-5992401153406263839_> can you please try it with docker or podman. you will find the instructions at wiki page. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#431 (comment) <#431 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUM2JVB3UYUYINWWZHENOTTKM5RHANCNFSM43OEWTMQ . -- Sincèrement, Yannick Cadin Diablotin - La formation Unix, Linux, xBSD, OS X, Solaris, AIX, HP-UX i try curl -I localhost HTTP/1.1 302 Found Server: nginx/1.14.1 Date: Sun, 25 Apr 2021 00:25:27 GMT Content-Type: text/html; charset=utf-8 Content-Length: 0 Connection: keep-alive Location: /accounts/login/?next=/ Vary: Accept-Language, Cookie Content-Language: en — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#431 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUM2JUZ455BE5GYRLQSFQDTKNOURANCNFSM43OEWTMQ .
-- Sincèrement, Yannick Cadin Diablotin - La formation Unix, Linux, xBSD, OS X, Solaris, AIX, HP-UX

i enter

curl -IL localhost

HTTP/1.1 302 Found
Server: nginx/1.14.1
Date: Sun, 25 Apr 2021 01:06:41 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: /accounts/login/?next=/accounts/login/
Vary: Accept-Language, Cookie
Content-Language: en

HTTP/1.1 302 Found
Server: nginx/1.14.1
Date: Sun, 25 Apr 2021 01:06:41 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: /accounts/login/?next=/accounts/login/
Vary: Accept-Language, Cookie
Content-Language: en

HTTP/1.1 302 Found
Server: nginx/1.14.1
Date: Sun, 25 Apr 2021 01:06:41 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
Location: /accounts/login/?next=/accounts/login/
Vary: Accept-Language, Cookie
Content-Language: en

curl: (47) Maximum (50) redirects followed

@catborise
Copy link
Collaborator

i found the problem. it is related with django otp. after package updates it breaks... i will send patch

@ycadin
Copy link

ycadin commented Apr 25, 2021

Thanks in advance

@tree1123
Copy link
Author

i found the problem. it is related with django otp. after package updates it breaks... i will send patch

everything is ok,thank you

@ycadin
Copy link

ycadin commented Apr 26, 2021

Far better indeed. (Simply pip uninstall the 3 incriminated modules then installing them again with the right versions.)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants