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

The page isn't redirecting properly #247

Closed
hmrodrigues opened this issue Sep 18, 2015 · 64 comments
Closed

The page isn't redirecting properly #247

hmrodrigues opened this issue Sep 18, 2015 · 64 comments

Comments

@hmrodrigues
Copy link

After updating to version 16, after the login gives the error The page isn't redirecting properly.
Both Firefox and Midori give the error.

I'm using CentOS 7

@iliajie
Copy link
Collaborator

iliajie commented Sep 18, 2015

You should hard reset your browser's cache and restart Webmin.

@hmrodrigues
Copy link
Author

@qooob already did it. It says to many redirects

@iliajie
Copy link
Collaborator

iliajie commented Sep 18, 2015

What about putting cursor to URL line in Firefox and hitting enter? That shouldn't be the theme's case really..

@hmrodrigues
Copy link
Author

@qooob since was on a virtual machine, I recover from a snapshot without webmin and after the update of the theme the problem happened again

@iliajie
Copy link
Collaborator

iliajie commented Sep 18, 2015

Could you please try Chrome browser? Did you also try rebooting your machine?

In case it happens in Chrome, please make a screenshot from Chrome with DevTools opened.. I really have no idea why this could be happening.

Worth checking:

http://www.howtogeek.com/forum/topic/firefox-error-the-page-isnt-redirecting-properly

https://support.mozilla.org/en-US/questions/985967

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

I can confirm the same issue
Running CentOS7
Tested using Firefox and Safari on Mac (cleaned cache and cookies)

screen shot 2015-09-19 at 13 45 32

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

There is also Webmin cache. It could get stuck. Clear server side cache as well.

https://support.mozilla.org/en-US/questions/938531

What is your Webmin version, guys?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

I cleaned everything that could be cleaned, same behaviour.
Webmin 1.760.
Below is a snapshot of the webmin debug log (all logging enable), and the log goes on with same entries until firefox/safari stops trying to load the page.

4719 [19/Sep/2015 13:38:29.004928] - 10.10.0.58 - START "script=index.cgi"
4719 [19/Sep/2015 13:38:29.005235] - 10.10.0.58 - READ "/etc/webmin/miniserv.conf"
4719 [19/Sep/2015 13:38:29.005738] root 10.10.0.58 - READ "/usr/libexec/webmin/authentic-theme/config"
4719 [19/Sep/2015 13:38:29.007453] root 10.10.0.58 - READ "/usr/libexec/webmin/lang/en.UTF-8"
4719 [19/Sep/2015 13:38:29.008967] root 10.10.0.58 - READ "/etc/webmin/custom-lang"
4719 [19/Sep/2015 13:38:29.009169] root 10.10.0.58 - READ "/etc/webmin/custom-lang.en.UTF-8"
4719 [19/Sep/2015 13:38:29.018060] root 10.10.0.58 - READ "/usr/libexec/webmin/authentic-theme/lang/en.UTF-8"
4719 [19/Sep/2015 13:38:29.019280] root 10.10.0.58 - READ "/etc/webmin/authentic-theme/custom-lang"
4719 [19/Sep/2015 13:38:29.019509] root 10.10.0.58 - READ "/etc/webmin/authentic-theme/custom-lang.en.UTF-8"
4719 [19/Sep/2015 13:38:29.020702] root 10.10.0.58 - READ "/usr/libexec/webmin//defaultacl"
4719 [19/Sep/2015 13:38:29.020952] root 10.10.0.58 - READ "/etc/webmin/root.acl"
4719 [19/Sep/2015 13:38:29.021193] root 10.10.0.58 - READ "/etc/webmin//root.acl"
4719 [19/Sep/2015 13:38:29.021422] root 10.10.0.58 - READ "/etc/sysconfig/network"
4719 [19/Sep/2015 13:38:29.021788] root 10.10.0.58 - CMD "cmd=hostname"
4719 [19/Sep/2015 13:38:29.025883] root 10.10.0.58 - READ "/usr/libexec/webmin/virtual-server/module.info"
4719 [19/Sep/2015 13:38:29.073748] root 10.10.0.58 - READ "/usr/libexec/webmin/server-manager/module.info"
4719 [19/Sep/2015 13:38:29.085647] root 10.10.0.58 - READ "/etc/webmin/module.infos.cache"
4719 [19/Sep/2015 13:38:29.108561] root 10.10.0.58 - READ "/etc/webmin/installed.cache"
4719 [19/Sep/2015 13:38:29.119455] root 10.10.0.58 - READ "/usr/libexec/webmin/acl/module.info"
4719 [19/Sep/2015 13:38:29.119916] root 10.10.0.58 - READ "/etc/webmin/webmin.cats"
4719 [19/Sep/2015 13:38:29.120124] root 10.10.0.58 - READ "/etc/webmin/webmin.descs"
4719 [19/Sep/2015 13:38:29.120768] root 10.10.0.58 - READ "/usr/libexec/webmin/change-user/module.info"
4719 [19/Sep/2015 13:38:29.121586] root 10.10.0.58 - READ "/etc/webmin/authentic-theme/favorites.json"
4719 [19/Sep/2015 13:38:29.132471] root 10.10.0.58 - READ "/usr/libexec/webmin//module.info"
4719 [19/Sep/2015 13:38:29.133591] root 10.10.0.58 - STOP "runtime=0"

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Can you manually downgrade to let's say version 14 to see what will happen then?
https://github.com/qooob/authentic-theme/raw/master/.build/authentic-theme-14.00.wbt.gz

I guess you could manually remove Webmin session by deleting /var/webmin/sessiondb.pag

I don't see how this issue is related to the theme.

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

I downgraded to version 14. Works without any problems as before.

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Can you also clear the cookies? If not just run it in incognito mode, click Ctrl+Shift+N (for Chrome), does it work then?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Tried the incognito mode
v14: works
v16: same behaviour, redirect loop

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Reply from Firefox Forums:

To solve this problem there is no need to delete all of your cookies, simply delete the ones associated with your google and youtube accounts. Here's how:

  • Click Tools/Options/Privacy
  • Click "Remove Individual Cookies"
  • In the Cookies Window type "accounts" (no quotes) into the Search box
  • Select all the cookie names starting with: accounts.google.com and accounts.youtube.com
  • Click Remove Cookie

You should now be able to reach your Gmail or Youtube login page as usual.
This is how I was able to solve my problem. Deleting other google.com and youtube.com cookies did not help, only after I deleted the account cookies I was able to get back to the login page.

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

I tried different versions of Firefox in Linux, OS X, Windows - I can not reproduce the bug.

Please be kind making video screencast for the whole process of signin in, while keeping DevTools opened. (you can send it to me privately in case you are worried about URLs or make it in full-screen mode).

I have no clue why this is happening and I have very strong premonition that it's not theme related!

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

I hope your premonition is right :)
Anyhow, I did a screen cast so you can see what I see, below is the link
https://youtu.be/c7mjJFtxY9g

@andreychek
Copy link

I've been doing some testing on various browsers, and so far I haven't been able to reproduce this issue.

I'll continue reviewing the issue, though I may ask Jamie to see if he has any input.

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Ok, I think I know where the problem lies! You shouldn't use that module to change the theme.

Please goto Webmin->Webmin Configuration->Themes. After you set Authentic Theme globally and see nice login (Authentic Theme login screen) - you will be fine!

Try it and let me know. Make sure that in Webmin->Change Language and Theme you have default theme set first. Then do procedure above!

Helped?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Well... Tried the above, exactly as described by you.
Now I get the nice looking login, but after the login goes again in the loop.

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

That should not be happening! :|

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

I can not reproduce it on and browser, in any OS.

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Well I'm pretty sure it's not the browser... It's something happening within webmin+authentic theme.
I will try running some stack traces on webmin se wtf is doing

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Do you have any dependencies on any perl modules or anything within webmin ?
What can differ between our environments is that mine is a fresh one, with webmin 1.760 installed.
I've tried removing the theme completely also clean all traces of it from the fs/cache and installed directly the v16... still no go. cleaned again... installed v15.51... that one works fine.

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

That is so wired. Reboot the system!! I think personally, it's stuckness of Webmin cache somewhere..

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Did you try Chrome?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Tried Firefox, Safari, Chrome ( Mac OS X )
v15.51 works fine
v16.00 redirect loop
I suspect some dependency to something which was left around in webmin before 1.760, because I installed directly the latest version... otherwise, don't know how big are the changes between 15.51 and 16.
Forgot to mention, I also rebooted the webmin machine...

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

Changes are huge! Installed directly? Using Webmin->Webmin Configuration->Themes and then install theme?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

Yes

@iliajie
Copy link
Collaborator

iliajie commented Sep 19, 2015

I don't know why it's happening. Will see what others will say on testing! Please wait..

@andreychek
Copy link

I don't imagine you have a machine experiencing this issue, that we could remotely access and log in to? A test system, perhaps?

@zamolxe
Copy link

zamolxe commented Sep 19, 2015

@qooob
You are not alone there :)
You can try to reproduce my environment:
Clean CentOS7 install (up to date), then install the webmin-1.760 rpm...
That should come with v14 of your theme... Just upgrade to the latest one...
I think you will get the same results like me.
I can also provide the list of rpm's installed.

@andreychek
I can bring one machine up for testing and grant access to that one.. (if I will reproduce the issue)

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

Are you sure is prt($ENV{'REQUEST_URI'}) and not print ?

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Yes, I got that manual function there..

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

It's better to find printed stuff..

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

HTTP/1.0 500 Perl execution failed Server: MiniServ/1.760 Date: Sun, 20 Sep 2015 11:53:28 GMT Content-type: text/html; Charset=iso-8859-1 Connection: close
Error - Perl execution failed

Undefined subroutine &main::prt called at /usr/libexec/webmin/authentic-theme/authentic-lib.cgi line 2009.

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Like I said :) It's cache issue! In the end of the file there should be

sub prt {
    my ($____v) = @_;
    use Data::Dumper;
    print '<div style="color: red">';
    print Dumper $____v;
    print '</div>';
}

Do you have this in your file? Did you really restart Webmin? Did you restart machines? (please say as it is, I need it for the future reference)

You could get error about not having use Data::Dumper.

Take a look at this line:
https://github.com/qooob/authentic-theme/blob/master/authentic-lib.cgi#L2358

OK instead of prt($ENV{'REQUEST_URI'}) do this:

print '++++' . $ENV{'REQUEST_URI'} . '++++';

What is the output?

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

In case you have / from $ENV{'REQUEST_URI'}, just manually update your .lib file and restart Webmin.

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

If I query https://1.2.3.4:10000 the output is / and the loop is gone.

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

But what do you query on regular basis?

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

This is what you should do?

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

Usually I go directly yo https://1.2.3.4:10000/ and sometimes directly to https://1.2.3.4:10000/dhcpd
There is nothing fancy about the queries

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Second will never work!!

What do you get on the print if you query the first example: https://1.2.3.4:10000/ ?

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Actually, if I query https://1.2.3.4:10000/fsdump/ it works without left menu. I wouldn't recommend doing this. Why not just query https://1.2.3.4:10000... However https://1.2.3.4:10000/ works also just fine in my case.

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

Ok.. I found out the root cause...
After installing perl-Data-Dumper to get your function working... Everything worked without any issues.
Just to confirm, I removed perl-Data-Dumper... got back the loop...
Can someone else confirm this ?

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Reallly??? Let me check. This is only possible if I forgot to remove it somewhere - that would be bad!

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Checking...

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

Fix for it is following:
replace the use with eval in front...

sub prt {
    my ($____v) = @_;
    eval "use Data::Dumper";
    print '<div style="color: red">';
    print Dumper $____v;
    print '</div>';
}

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

But this function is not intended to run on users.. and I just checked it - there is not a single place where I would call it..

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

I've seen... Don't know what is actually going on wrong in there, but like I said...
Installing that package made it work all the time... removing it got the loop back.
Patching your prt function, fixed the issue without having to install the dumper rpm again.

You can check to see if you can reproduce the loop by removing the dumper from your system.

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

Listen, thank you so much, pal!! I wouldn't believe this unless I tried to simply renaming it something else. I got redirect loop. You're right.. Fixing... Thanks!!!

@iliajie iliajie closed this as completed Sep 20, 2015
@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

:)

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

Glad to give something back to the community!
Thanks for a nice troubleshooting weekend :)

iliajie pushed a commit that referenced this issue Sep 20, 2015
@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

...but do you realize that this function also in all previous versions? How come it's alright with those versions and fails with 16. Any thoughts? ;)

@zamolxe
Copy link

zamolxe commented Sep 20, 2015

To be honest with you... I have no idea why it brakes. :|

@iliajie
Copy link
Collaborator

iliajie commented Sep 20, 2015

I see. Alright! Thank you anyway!! ;)

@spye
Copy link

spye commented Oct 12, 2015

Just coming in to this thread... I just wanted to point out that I am having exactly the same issue as above, with Webmin 1.770 and Authentic 16. Tried all the same steps before coming to this page: clearing local cache, server cache, restarting webmin, rebooting server, changing webmin to non-SSL, switching ports... tried it all, same issue. Also running CentOS 7.

@spye
Copy link

spye commented Oct 12, 2015

And.... I just found your v17 update. So here's what I did to fix the bug: I edited /etc/webmin/config, and changed referrers_none=1 to 0. Then I manually added /webmin on the URL after logging in (which is when I get the redirect loop), and that gave me access to the webmin config, where I could then go and manually update the theme to the version available from this repo. I had this happen on several CentOS 7 systems with this same configuration, so it was definitely reproducible for me, but this fix resolved it completely. Odd though, that v17 of your theme doesn't appear to address bug #247, so I'm guessing I missed an update somewhere that caused it to break in the first place.

@iliajie
Copy link
Collaborator

iliajie commented Oct 12, 2015

That should address the issue. The problem could be in the stuck cache, so you need to restart Webmin or machine in case it doesn't help.

iliajie pushed a commit that referenced this issue Dec 7, 2016
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

5 participants