Login Problem After Upgrade to 1.2.11

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Login Problem After Upgrade to 1.2.11

Post by patrickr »

After upgrading to 1.2.11 I found that we couldn't log in to Cacti.
It appears that the cause it being referred to a bug in https://github.com/Cacti/cacti/issues/3436.

The problem is that I have installed a new VM running CentOS 7 and can confirm that this isn't the issue. While I am able to log in and complete the initial install as well as log in and log out, once I close my browser, I am no longer able to log back into the system.

I have put our original system back in place as it's poller at least seems to be gathering data and sending the daily reports we need. We just can't log in to manage the graphs or system.

Any help would be appreciated.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Login Problem After Upgrade to 1.2.11

Post by TheWitness »

Edit the config.php and comment out $cacti_cookie_domain, until you have a valid Cookie domain set.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Re: Login Problem After Upgrade to 1.2.11

Post by patrickr »

TheWitness wrote: Sat Apr 25, 2020 10:18 am Edit the config.php and comment out $cacti_cookie_domain, until you have a valid Cookie domain set.
I have done that. On multiple different machines. Everything works until I close the browser and try to go back in. Something else appears to be broken.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Login Problem After Upgrade to 1.2.11

Post by TheWitness »

Well, other common things:

1) Unable to write to /var/lib/php/session
2) Full File System in /var/lib/php/session
3) Using session cookies (keep me logged in) and switching between http and https (I've seen this, but was never able to reproduce)
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Login Problem After Upgrade to 1.2.11

Post by TheWitness »

I've confirmed 3), but it's to be expected. If you start a session using https, and then switch to httpd, logout, and then attempt to login again, it will not work until you close your browser and go in as http again. This is due to an expired cookie already having been setup as secure, which is incompatible with http handler on the server side.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Re: Login Problem After Upgrade to 1.2.11

Post by patrickr »

TheWitness wrote: Sat Apr 25, 2020 12:35 pm I've confirmed 3), but it's to be expected. If you start a session using https, and then switch to httpd, logout, and then attempt to login again, it will not work until you close your browser and go in as http again. This is due to an expired cookie already having been setup as secure, which is incompatible with http handler on the server side.
We don't switch between http and https. The system is forwarding all http traffic to https.
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Re: Login Problem After Upgrade to 1.2.11

Post by patrickr »

TheWitness wrote: Sat Apr 25, 2020 12:35 pm I've confirmed 3), but it's to be expected. If you start a session using https, and then switch to httpd, logout, and then attempt to login again, it will not work until you close your browser and go in as http again. This is due to an expired cookie already having been setup as secure, which is incompatible with http handler on the server side.
I created a new server yesterday that is running CentOS 7, PHP 7.3 and MariaDB 10.4.
After installing LAMP and Cacti, I was able to log in and out multiple times using local and LDAP authentication. The only time the login didn't work was if I used a saved login on Firefox.
This morning I attempted to login and am getting the same login loop as on our old server. I don't understand why it worked yesterday but doesn't work this morning.
THIS IS FRUSTRATING AND NEEDS TO BE FIXED!!
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Login Problem After Upgrade to 1.2.11

Post by netniV »

The cookie domain issue is resolved and will be in this weekends release. However, your issues seem to go beyond that so maybe usie the developer tools in your browser to verify the cookie states and ensure they match your site details. It is likely that your session is keeping you running and once that expires, cacti will attempt to read the cookie.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Re: Login Problem After Upgrade to 1.2.11

Post by patrickr »

netniV wrote: Fri May 01, 2020 1:02 pm The cookie domain issue is resolved and will be in this weekends release. However, your issues seem to go beyond that so maybe usie the developer tools in your browser to verify the cookie states and ensure they match your site details. It is likely that your session is keeping you running and once that expires, cacti will attempt to read the cookie.
I don't believe so. The cookie issue appears to be more than just commenting out a line in the configuration. When I am able to log into our console, if I close the page and open another, I am being asked to login again.

I am hopeful that the new release will help resolve these issues.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Login Problem After Upgrade to 1.2.11

Post by TheWitness »

I don't see this issue, but I'm also using sessions cookies (keep me signed in) feature too.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
patrickr
Posts: 23
Joined: Thu Apr 23, 2020 11:46 am

Re: Login Problem After Upgrade to 1.2.11

Post by patrickr »

TheWitness wrote: Tue May 05, 2020 9:30 pm I don't use this issue, but I'm also using sessions cookies (keep me signed in) feature too.
Even if I click on "Keep me logged in", I am still prompted to login again after closing the browser window.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Login Problem After Upgrade to 1.2.11

Post by TheWitness »

I don't know what to say. When you figure it out though share with others.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests