Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jun 15, 2019 9:49 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Weird auth issue with freshly installed remote poller
PostPosted: Fri Nov 16, 2018 12:21 am 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
This is weird..

I've installed a new remote poller on a vm running CentOS7, it all went well and it's registered to the main poller and everthing BUT it can't log in via web.

I have reset the password to 'admin' and still doesn't work. I double checked the md5 string with https://www.md5online.org

Code:
MariaDB [rcacti02]> select * from user_auth;
+----+----------+----------------------------------+-------+---------------+---------------+----------------------+-----------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+------------+-----------+------------------+--------+-----------------+----------+-------------+
| id | username | password                         | realm | full_name     | email_address | must_change_password | password_change | show_tree | show_list | show_preview | graph_settings | login_opts | policy_graphs | policy_trees | policy_hosts | policy_graph_templates | enabled | lastchange | lastlogin | password_history | locked | failed_attempts | lastfail | reset_perms |
+----+----------+----------------------------------+-------+---------------+---------------+----------------------+-----------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+------------+-----------+------------------+--------+-----------------+----------+-------------+
|  1 | admin    | 21232f297a57a5a743894a0e4a801fc3 |     0 | Administrator |               |                      | on              | on        | on        | on           | on             |          2 |             1 |            1 |            1 |                      1 | on      |         -1 |        -1 | -1               |        |               0 |        0 |           0 |
|  3 | guest    | 43e9a4ab75570f5b                 |     0 | Guest Account |               | on                   | on              | on        | on        | on           | 3              |          1 |             1 |            1 |            1 |                      1 |         |         -1 |        -1 | -1               |        |               0 |        0 |           0 |
+----+----------+----------------------------------+-------+---------------+---------------+----------------------+-----------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+------------+-----------+------------------+--------+-----------------+----------+-------------+
2 rows in set (0.00 sec)


What's going on? poller is running fine and cacti.log doesn't show any errors so I'm assuming the db connection is fine. I double checked that as well, I guess I'd get a different error if there is something wrong with the database connection.

Any ideas?

Only oddity I can think of is that I had installed this remote poller and registered to the main poller before but I disabled it and deleted on the main poller before re installing it. Is it possible there is some stale crap somewhere? Anyway the web auth should be locally, right?

I removed the remote poller cacti's directory completely before re installing it.

Thanks

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Fri Nov 16, 2018 3:49 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
On the new poller, check the auth_method setting, see what that is set to.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Fri Nov 16, 2018 2:57 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
netniV wrote:
On the new poller, check the auth_method setting, see what that is set to.

Code:

MariaDB [rcacti02]> select * from settings where name="auth_method";
+-------------+-------+
| name        | value |
+-------------+-------+
| auth_method | 1     |
+-------------+-------+
1 row in set (0.00 sec)


What should it be?

btw I've mysql to logg every query and this is the only thing I see when I try to log in


Code:
          Connect   [email protected] as anonymous on rcacti02
                   32 Query     SHOW GLOBAL VARIABLES LIKE 'version'
                   32 Query     SELECT @@sql_mode
                   32 Query     SET SESSION sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
                   32 Query     SELECT timezone FROM poller WHERE id = '3'
                   32 Query     SET SESSION time_zone = 'Pacific/Auckland'
                   32 Query     SELECT cacti FROM version LIMIT 1
                   32 Query     SHOW GLOBAL VARIABLES LIKE 'version'
                   32 Query     SELECT @@sql_mode
                   32 Query     SET SESSION sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
                   32 Query     SELECT timezone FROM poller WHERE id = '3'
                   32 Query     SET SESSION time_zone = 'Pacific/Auckland'
                   32 Query     SELECT COUNT(*) FROM poller_output_boost


The first line doesn't look right..not sure what it means

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Sat Nov 17, 2018 8:27 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
That all looks fine to me. Auth Method 1 is built in auth. Also, please note that whilst you are connecting to the remote poller, if it believes it has an online connection to the master, you will effectively be logging in there.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Sat Nov 17, 2018 5:26 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
I blew them away, re installed main and remote.

Same behavior, I'm able to log in right after I finished the install. The notes below indicate you should be able to login to the remote poller and depending whether it's online or offline you should see more or less.

Code:
NOTE: You are logged into a Remote Data Collector. When 'online', you will be able to view and control much of the Main Cacti Web Site just as if you were logged into it. Also, it's important to note that Remote Data Collectors are required to use the Cacti's Performance Boosting Services 'On Demand Updating' feature, and we always recommend using Spine. When the Remote Data Collector is 'offline', the Remote Data Collectors Web Site will contain much less information. However, it will cache all updates until the Main Cacti Database and Web Server are reachable. Then it will dump it's Boost table output back to the Main Cacti Database for updating.
NOTE: None of the Core Cacti Plugins, to date, have been re-designed to work with Remote Data Collectors. Therefore, Plugins such as MacTrack, and HMIB, which require direct access to devices will not work with Remote Data Collectors at this time. However, plugins such as Thold will work so long as the Remote Data Collector is in 'online' mode.


When the session expired on both, the main prompted me to change my password, which is odd I'm pretty sure I forcefully changed it during the install.. and of course I couldn't log back in to the remote any longer.

The main poller shows all these failed attempts under "View user log" ...Also a bit confusing, is this actually showing login attempts to the remote poller without mentioning to which one? or is it somehow getting redirected to the main poller instead and failing?

I'm running the beta2 release, I didn't download any further patches.

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Sat Nov 17, 2018 6:20 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
When the user account is first created using the cacti.sql it is marked as needing its password changed. Before you can install, you must login and that SHOULD force to immediately change it before you can continue the installation. Once changed, the flag is removed.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Sat Nov 17, 2018 9:52 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
I know that.

I've manually created a new username & password on the remote poller database and nothing.

it's very weird, there must be something on my installations causing this. I seem to be the only having this problem :S

I'll try to start over and install both as primary servers to see if it's got nothing to do with remote poller setup on my environment.

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Fri Dec 07, 2018 6:23 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Did you get it a second time?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Tue Dec 11, 2018 3:56 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 180
Yes, I did, same result.

I just gave up on it until I feel keen again to re-install both VMs from the scratch.

I can't even think of what sort of misconfig or mis-whatever I could have done to get into that state, IF it's something I've done.

_________________
Cacti - 1.1.37
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
 Post subject: Re: Weird auth issue with freshly installed remote poller
PostPosted: Tue Dec 18, 2018 7:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2499
Maybe next time we can get me in to see what's going on :)

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group