Page 1 of 1

Fatal error after IP change

PostPosted: Tue May 14, 2019 5:45 am
by evansgo
Hi,

I have 3 AP Pro's and no other Unifi kit (yet) and a few days ago I started tidying up my network ready for a USG and 16w Ubiquiti switch. As a result I set IP's to each of the AP's in place of DHCP. However ever since I have been getting this message on just one of them, roughly every 30 seconds (its not consistent)
uniFiAP Error getMessages: (1) FATAL error connecting to ip#: 192.168.10.5 wrong ip/ password or system down or ssh timed out or ..?
uniFiAP Error getMessages: (1) FATAL error connecting to ip#: 192.168.10.5 wrong ip/ password or system down or ssh timed out or ..?

It all looks fine in the controller and I have tried amending the IP to other ones, but get the same message albeit with the new IP.

Any suggestions where I can look to fix this?
Thanks

Fatal error after IP change

PostPosted: Tue May 14, 2019 6:16 am
by kw123
Did you update the ip numbers etc in plugin config?

Could post print config from menu?
And blank out the uid passwords.
and could you test:
open terminal
ssh userid@ipofap

if you get an error please delete file
~/.ssh/known_hosts
(or edit with nano and delete the line with the new ip address)

Karl




Sent from my iPhone using Tapatalk

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 6:39 am
by evansgo
Hi, yes I did the update in config. I did all three at the same time, but only the one is failing.

A little more info. I have reset the AP to DHCP and the errors went away, so I then tried 192.168.10.9 and that is also OK. But if I go back to 192.168.10.5 it fails - all the time I am amending the config as well. I double checked that the IP is free and it is and if I ping it when the AP is NOT set to .5 then I get no response. If I ping it when it is set to .5 then it works as expected, but unifiAP gives the errors.

I'll get the log shortly

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 6:45 am
by kw123
Check out the hosts file


Sent from my iPhone using Tapatalk

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 6:50 am
by evansgo
    16:45:13 -
    16:45:13 -UniFi =============plugin config Parameters========
    16:45:13 -debugLevel ['Logic', 'Log', 'LogDetails']
    16:45:13 -logFile /Library/Application Support/Perceptive Automation/Indigo 7.3/Logs/com.karlwachs.uniFiAP/plugin.log
    16:45:13 -enableFINGSCAN True
    16:45:13 -enableBroadCastEvents all
    16:45:13 -ignoreNeighborForFing False
    16:45:13 -expirationTime 300 [sec]
    16:45:13 -sleep in main loop 4.0 [sec]
    16:45:13 -use curl or request /usr/bin/curl
    16:45:13 -cpu used since restart: 0:19.98
    16:45:13 -
    16:45:13 -====== used in ssh userid@switch-IP, AP-IP, USG-IP to get DB dump and listen to events
    16:45:13 -UserID
    16:45:13 -PassWd
    16:45:13 -promptOnServer -GW dict
    16:45:13 -promptOnServer -AP dict BZ.v
    16:45:13 -promptOnServer -SW dict US.v
    16:45:13 -promptOnServer -GW ctrl :~
    16:45:13 -promptOnServer -AP tail BZ.v
    16:45:13 -promptOnServer -GW tail
    16:45:13 -promptOnServer -SW tail US.v
    16:45:13 -GW tailCommand /usr/bin/tail -F /var/log/messages
    16:45:13 -GW dictCommand mca-dump | sed -e 's/^ *//'
    16:45:13 -SW tailCommand /usr/bin/tail -F /var/log/messages
    16:45:13 -SW dictCommand mca-dump | sed -e 's/^ *//'
    16:45:13 -AP tailCommand /usr/bin/tail -F /var/log/messages
    16:45:13 -AP dictCommand mca-dump | sed -e 's/^ *//'
    16:45:13 -read DB Dict every {GW:60,AP:60,SW:60} [sec]
    16:45:13 -restart listeners if NoMessage for 180[sec]
    16:45:13 -
    16:45:13 -====== CONTROLLER WEB ACCESS , set parameters and reporting
    16:45:13 - curl data={WEB-UserID:..,WEB-PassWd:..} https://controllerIP: ..--------------
    16:45:13 -Mode: off, ON, reports only ON
    16:45:13 -WEB-UserID
    16:45:13 -WEB-PassWd
    16:45:13 -Controller port# 8443
    16:45:13 -Controller site Name# default
    16:45:13 -Controller API WebPage /api/s/
    16:45:13 -get blocked client info from Cntr every 180[sec]
    16:45:13 -
    16:45:13 -====== VIDEO / camera NVR stuff ----------------------
    16:45:13 -= get camera DB config and listen to recording event logs
    16:45:13 - ssh NVR-UNIXUserID@NVR-IP
    16:45:13 -NVR-VIDEO enabled False
    16:45:13 -NVR-UNIXUserID
    16:45:13 -NVR-UNIXpasswd
    16:45:13 -promptOnServer -VD dict vbox-unifi
    16:45:13 -promptOnServer -VD tail vbox-unifi
    16:45:13 -VD tailCommand /usr/bin/tail -F /var/lib/unifi-video/logs/motion.log
    16:45:13 -VD dictCommand not implemented
    16:45:13 -= getting snapshots and reading and changing parameters
    16:45:13 - curl data={WEB-UserID:..,WEB-PassWd:..} https://NVR-IP#: .... for commands and read parameters
    16:45:13 - requests(http://IP-NVR:7080/api/2.0/snapshot/cam ... tream=True) for snap shots
    16:45:13 -imageSourceForSnapShot noImage
    16:45:13 -imageSourceForEvent noImage
    16:45:13 -NVR-WEB-UserID
    16:45:13 -NVR-WEB-passWd
    16:45:13 -NVR-API Key
    16:45:13 -
    16:45:13 -AP ip# enabled / disabled
    16:45:13 -192.168.10.4 True
    16:45:13 -192.168.10.9 True
    16:45:13 -192.168.10.6 True
    16:45:13 -192.168.10.5 False
    16:45:13 -192.168.1.x False
    16:45:13 -SW ip#
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -192.168.1.x False
    16:45:13 -
    16:45:13 - False USG/UGA gateway/router
    16:45:13 -192.168.10.100 Controller / cloud Key IP#
    16:45:13 - Video NVR-IP#

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 6:50 am
by evansgo
Nothing odd in the host file

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 7:17 am
by kw123
Having bf
Will check later.




Sent from my iPhone using Tapatalk

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 8:41 am
by kw123
can you do:

ssh userid@ipofap

?

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 9:09 am
by evansgo
Sorry forgot to reply, yes I could

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 9:36 am
by kw123
how long does it take? > some seconds..?

are you doing the ssh from the same box as the plugin ie = indigo server?

Re: Fatal error after IP change

PostPosted: Tue May 14, 2019 10:21 am
by kw123
if you use the latest version:
please switch on debug # 7 = expect and #6 connection

post the results (blank the passwords ). it can be a lot !!

you should see the details for the error with #7 alone, i believe the #6 is the returned data - which you don't need for this.

Karl
ps please always mention your Version number, osx ..

Re: Fatal error after IP change

PostPosted: Wed May 15, 2019 5:39 am
by evansgo
Sorry been away. I'll try some experimenting agin now I have a little time.

Re: Fatal error after IP change

PostPosted: Wed May 15, 2019 5:40 am
by kw123
I am out for 3 weeks. Can just use my cell phone.


Sent from my iPhone using Tapatalk

Re: Fatal error after IP change

PostPosted: Wed May 15, 2019 6:08 am
by evansgo
Working now, thanks so much for the pointers.

I removed the ssh hosts file and 'forgot' the AP to reset it. I did both those things together so not sure which fixed it, but it is all happy now.

Re: Fatal error after IP change

PostPosted: Wed May 15, 2019 6:39 am
by kw123
Likely the hosts file.

Glad it works
I will try to add the hostsfile management.
Pibeacon does that already.



Sent from my iPhone using Tapatalk