Weird auth issue with freshly installed remote poller

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

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Weird auth issue with freshly installed remote poller

#1 Post by Pucho » Fri Nov 16, 2018 12:21 am

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: Select all

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: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

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.

netniV
Cacti Guru User
Posts: 2685
Joined: Sun Aug 27, 2017 12:05 am

Re: Weird auth issue with freshly installed remote poller

#2 Post by netniV » Fri Nov 16, 2018 3:49 am

On the new poller, check the auth_method setting, see what that is set to.

User avatar
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weird auth issue with freshly installed remote poller

#3 Post by Pucho » Fri Nov 16, 2018 2:57 pm

netniV wrote:On the new poller, check the auth_method setting, see what that is set to.

Code: Select all


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: Select all

          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: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

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.

netniV
Cacti Guru User
Posts: 2685
Joined: Sun Aug 27, 2017 12:05 am

Re: Weird auth issue with freshly installed remote poller

#4 Post by netniV » Sat Nov 17, 2018 8:27 am

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.

User avatar
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weird auth issue with freshly installed remote poller

#5 Post by Pucho » Sat Nov 17, 2018 5:26 pm

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: Select all

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: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

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.

netniV
Cacti Guru User
Posts: 2685
Joined: Sun Aug 27, 2017 12:05 am

Re: Weird auth issue with freshly installed remote poller

#6 Post by netniV » Sat Nov 17, 2018 6:20 pm

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.

User avatar
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weird auth issue with freshly installed remote poller

#7 Post by Pucho » Sat Nov 17, 2018 9:52 pm

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: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

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.


User avatar
Pucho
Cacti User
Posts: 180
Joined: Wed Jul 20, 2016 8:00 pm

Re: Weird auth issue with freshly installed remote poller

#9 Post by Pucho » Tue Dec 11, 2018 3:56 pm

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: Select all

SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code: Select all

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.


Post Reply