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

[BUG] Configuration Build Failed #437

Closed
MeCJay12 opened this Issue Mar 19, 2019 · 12 comments

Comments

Projects
None yet
2 participants
@MeCJay12
Copy link

MeCJay12 commented Mar 19, 2019

Please prefix your issue title with one of the following: [BUG], [ISSUE], [FEATURE REQUEST], [MODULE REQUEST], [OTHER].

Replace everything between stars with current version of your facileManager and module installations:
fM Version : 3.4
{Module Name} Version : 3.3.1

In raising this issue, I confirm the following (please check boxes, eg [X]):

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm posting isn't already solved and no duplicates exist in closed issues and opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.

(BUG | ISSUE) Expected Behavior:
When clicking the push updates button in the top bar, updates would be pushed to servers. Also, in the servers menu, when clicking the wrench next to a server that the config for the server would be built. This appears to be a results of updating to 3.4 and 3.3.1. Found this old post but the information seems to be out of date.

(BUG | ISSUE) Actual Behavior:
"Configuration build failure". Old name servers started doing the same.

(BUG | ISSUE) Steps to reproduce:
Attempt to push update or build config

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 19, 2019

What errors do you get when you run the configuration build manually from your DNS server?

sudo php /usr/local/facileManager/fmDNS/client.php buildconf debug
@MeCJay12

This comment has been minimized.

Copy link
Author

MeCJay12 commented Mar 19, 2019

That's the command I was looking for!

So when I run that command I get:
Server is not found.

I re-ran the install script and it connected to the server fine. The server showed up in the WebUI. I enable the server and make my changes (I use IP rather than hostname, run-as bind, and /var/lib/bind/zones instead of /etc/bind/zones). When I go to push the config from the server I get the same error.

If I run the command right after the install script, I get:
DNS server is disabled.
which makes sense. Even without making any changes, other than IP, I still get failed to build config.

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 20, 2019

For some reason your client is not found in the database when querying based on serial number, but it is found when the client is disabled. If it's found in the latter scenario then it should be found always.
Any chance you can post the contents of /usr/local/facileManager/config.inc.php or email it (support at facilemanager ..dot.. com)? Also, what are your fM server and fmDNS client environments (OS, PHP, MySQL versions)?

@MeCJay12

This comment has been minimized.

Copy link
Author

MeCJay12 commented Mar 20, 2019

/usr/local/facileManager/config.inc.php (with added ``):

`<?php

/**
 * Contains configuration details for facileManager
 *
 * @package facileManager
 *
 */

/** facileManager server */
define('FMHOST', 'Redacted-IP/facileManager/');

/** Account number */
define('AUTHKEY', 'default');

/** Server unique serial number */
define('SERIALNO', '225775909');`

The environment is all Ubuntu Server 16.04, PHP 7.0.33-0ubuntu0.16.04.2, and (on the server) MySQL Ver 14.14 Distrib 5.7.25.

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 20, 2019

If you run the following SQL query on your database, do you get a valid result that includes your DNS server?

SELECT * FROM `fm_dns_servers` WHERE `server_status`!='deleted' AND `account_id`='1' AND `server_serial_no`='225775909' AND server_installed='yes';
@MeCJay12

This comment has been minimized.

Copy link
Author

MeCJay12 commented Mar 20, 2019

mysql> use facileManager
Database changed
mysql> SELECT * FROM "fm_dns_servers" WHERE "server_status"!='deleted' AND "account_id"='1' AND "server_serial_no"='225775909' AND server_installed='yes';
Empty set (0.00 sec)

UI at the time the command was run
Capture

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 20, 2019

Interesting. So there seems to be some kind of mismatch in the data. What do you get for this query?

SELECT server_name,server_serial_no,server_status,server_installed,account_id FROM `fm_dns_servers`;

Ideally, the server_serial_no needs to match what's in config.inc.php on the DNS servers.

@MeCJay12

This comment has been minimized.

Copy link
Author

MeCJay12 commented Mar 20, 2019

mysql> SELECT server_name,server_serial_no,server_status,server_installed,account_id FROM fm_dns_servers;
+----------------+------------------+---------------+------------------+------------+
| server_name | server_serial_no | server_status | server_installed | account_id |
+----------------+------------------+---------------+------------------+------------+
| IP-Prefix.75 | 679942854 | active | yes | 1 |
| IP-Prefix.78 | 852573034 | active | yes | 1 |
| IP-Prefix.77 | 187136358 | active | yes | 1 |
| IP-Prefix.77 | 831863742 | deleted | yes | 1 |
| IP-Prefix.78 | 343920963 | deleted | yes | 1 |
| IP-Prefix.77 | 965106748 | deleted | yes | 1 |
| IP-Prefix.75 | 249826481 | deleted | yes | 1 |
+----------------+------------------+---------------+------------------+------------+
7 rows in set (0.00 sec)

Interesting. The serial above doesn't match any of these.

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 20, 2019

I don't see the serial number in that output that is from your config.inc.php file. If you update your config.inc.php file on the DNS servers with their respective serial numbers from the database query (for the active results), this issue should become resolved. You can either manually change that file or remove it and run through the installer again. It does make me wonder how the serial numbers got mismatched in the first place though.

@MeCJay12

This comment has been minimized.

Copy link
Author

MeCJay12 commented Mar 20, 2019

You are right. If I take the serials from the query and load them into the DNS servers it work again. It looks like when I first install the DNS servers the serial is correct then when I change the server from its reported hostname to its IP the serial gets changed in the server.

@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 20, 2019

Great! I've also confirmed the serial number changes after changing the hostname which is indeed unexpected behavior. A fix will be coming in the next release.

WillyXJ pushed a commit that referenced this issue Mar 20, 2019

WillyXJ
fmDNS - #437 - Serial number changing fix
Fixed an issue where serial numbers for servers change after editing the server details.
@WillyXJ

This comment has been minimized.

Copy link
Owner

WillyXJ commented Mar 21, 2019

This is now fixed in fmDNS 3.3.2 and later.

@WillyXJ WillyXJ closed this Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.