-
Notifications
You must be signed in to change notification settings - Fork 731
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
phpIPAM 1.6 scan subnet returns live hosts but no hostnames #3746
Comments
Just a follow up on this one, The old IPAM setup this was to replace is running on Ubuntu 16.04 and phpIPAM version 1.4.3 and the following versions of mariadb and php
Comparing the 2 versions of the resolveIPaddresses.php code they are near enough identical - only difference is the stanzas handling error reporting. Old:
New:
Name resolution on the new server itself works fine from the OS. If I do a manual scan of a subnet on old server hostnames are returned alongside IP. On the new server the hostname field remains blank. I've trawled through a number of older posts in here which have had similar issues albeit on older versions of phpIPAM but none appeared to be pertinent to my situation. If anyone out there has any suggestions I'm all ears. regards Kiweegie |
I've just tested running the cronjob manually as below
It pulls back hostnames back but only does 4 and then stalls.
If I repeat the command it picks up same 4 devices and then stops. Web UI is populated with the hosts but this is only working for a single subnet. I've compared settings on that subnet versus others and same settings across the board so I dont understand why this one's being scanned OK but the rest are not. It's also not the first subnet listed so it doesn't appear to be doing in some sort of order then failing far as I can tell regards Kiweegie. |
To add to above, despite the hostnames being returned OK on this one subnet in the web UI it doestn't reflect successful scan under Resolve DNS names as shown Per another post i've seen on here I've amended the crons run every 90 mins in case its a timeout issue of some sort. I've seen when running ping scan manually on large subnet it does seem to take ages to complete. |
I have the same question. |
Same issue on 1.51 for me phpIPAM version: 1.5.1 |
@kiweegie did you manage to resolve this? i created a 1.6 server but still have the same issue |
No I'm afraid not. Not sure if my set up is exactly same as yours or not as I've got a 2 node setup using keepalived for failover between the 2. Ubuntu 22.04 Using the UI to scan subnets appears to do nothing. I get response in that it sees live hosts and I get a list of IPs which are "live" but without hostnames attached its not much use. Crontab setup as follows */90 * * * * /usr/bin/php /var/www/html/phpipam/functions/scripts/pingCheck.php If I run each of these commands from terminal from top to bottom I get output as follows pingCheck: Scan start, 345 subnets discoveryCheck: Scan start, 345 subnets /usr/bin/php /var/www/html/phpipam/functions/scripts/resolveIPaddresses.php I've fired up my old server running phpIPAM 1.4.3 (other versions below) and scanning on that works and returns hostnames when scanning from the UI. I did not have crontab setup to do this automatically before. Ubuntu 16.04.7 However if on the old server i try and run equivalent scripts (diff path) I get responsese immediately (loads of information flying past on screen). /usr/bin/php /var/www/phpipam/functions/scripts/pingCheck.php I've tried to compare these scripts between versions and can see various differences but not being a developer not entirely sure what I should be looking for. Checking syslog on the new server I'm seeing this error [Warning] Aborted connection 7165 to db: 'phpipam' user: 'phpipamDBUser' host: 'localhost' (Got an error reading communication packets) regards Kiweegie. |
Same Problem here with phpIPAM as Docker-Compose Setup -> phpipam/phpipam-www:1.5x |
Not had much spare time of late to look at this but took a few minutes this evening to check a couple of other bits. Figured as myself and one other on this post have been using same PHP version (7.4.33) but different phpIPAM versions then it might be something wrong in the PHP version. I tested via https://www.php.net/manual/en/function.gethostbyname.php with following basic php script and it returns a valid IP address when run
|
@kiweegie but we have the IP not the hostname, it's something in the reverse lookup i'm guessing |
Revisting this to advise I found the fix and it was simple in the end. Don't recall seeing this documented anywhere but looking at another issue today came across an old post which made the comment that they'd incorrectly added name servers on phpIPAM using hostname not IP. Guess what I'd done? Yep, added Name servers via hostname. I amended to using IP address and the hostnames now populate. Feel kinda stupid here but didn't see anything in documentation to mention that was a requirement. Hoperfully this helps out someone else in the same spot. |
Hi, I just want to add that if you are using powerdns then you need to define the reverse zones that you are doing lookups for in the recursor.conf. If your reverse zone isn't defined then the hosts will not populate even though it knows about the A record. |
Describe the bug
When using scan subnets feature (Discovery scans:Ping scan using fping) live hosts are discovered however hostnames are not returned. The scans are using DNS Servers for the applicable site.
NSlookup test from the server itself resolves hosts fine.
phpIPAM version
1.6.0
Versions of phpIPAM known to contain the issue (delete as appropriate).
Seeing same thing on our old instance running v1.4.3
Your Environment (please supply the following information):
Steps To Reproduce
Please include steps to reproduce the issue:
Administration > phpIPAM settings > Resolve DNS names = ON
Administration > phpIPAM settings > Scan type = fping
Subnets > Add Subnet > Set "Check hosts", "Discover new hosts" and "Resolve DNS names" = Yes
Screenshots and error logs
debugging is set to true in config.php
This is also set in the config.php - is this correct? Should these be edited to allow DNS names to be returned?
Additional Info
2 nodes running keepalived with mariadb set as master-master replication.
Modules enabled from default = IP request, SNMP Module,
Cheers Kiweegie.
The text was updated successfully, but these errors were encountered: