Unable to connect to the UCP Node Server. Error: xhr poll error


(Bob Reiber) #1

I know there are dozens of threads on this and I went through at least 10 of them and cant get this fixed. UCP login and functionality seem to work, it’s just that irritating message that keeps popping up in the corner. Suggestions welcomed.

PBX Version: 14.0.16.4
PBX Distro: 12.7.8-2012-1.sng7

Things I’ve looked at so far that have not worked:

  • chown and yum upgrade
  • fwconsole ucpnode stop/start
  • fwconsole restart
  • different browsers (edge, chrome, and android)
  • advanced settings show port 8001 and 8003 for http/https
  • firewall has UCP service set to Internet
  • Sysadmin -> Port Management shows that https access to UCP at port 4443
  • rebuilt lets encrypt certificate, made sure it was default, made sure it the self signed was deleted, and made sure that the correct certificate was in fact installed
  • tried accessing the pbx on the same LAN via internal address

***update
Here are some more things I tried based on recommendations in this thread

  • turned off firewall
  • made sure there is no double NAT issue
  • verified that the LE cert is default
  • tried making a self signed cert the default and then set the LE cert back to default, both times doing a fwconsole restart
  • hit f12 in the browser and searched the errors it shows (pictures further down the thread)
  • tried * uninstalling ucp, zulu, and all associated dependencies and then reinstalling everything except zulu
  • upgrading ucp to the edge version doesn’t seem be possible
  • renewed and reinstalled cert
  • verified that xmpp is running with command fwconsole pm2 --list
  • turned on xmpp for all users in user manager (fwconsole resrtart afterwards for good measure)
  • looked at memory. Dont see any errors to that effect, VM has 4 gb of memory.

(Itzik) #2

It usually means that the web browser cannot communicate with FreePBX or http or https ports specified in advanced settings.


(Bob Reiber) #3

To test that I turned off the firewall and got the same result. Anywhere else I can look?


(Lorne Gaetz) #4

There are a few things that can cause this:

  • Browser needs a route thru to the secure UCP Nodejs port (default 8003) as set in Advanced settings, which means that any intermediate NAT device and/or firewall must allow that traffic
  • UCP service must be running (dashboard will show status)
  • Node must be configured with a proper TLS cert, path as set in Advanced Settings. By default FreePBX will use whatever cert is set as default in Certman
  • Changes to UCP Nodejs probably require a service restart, either fwconsole restart or fwconsole restart ucp

Pressing F12 on the browser session will allow you to read the console errors and there may be a clue there to the issue.


(Sentinel) #5

was this solved? We are seeing this issue after upgrading from 14 to 15


(Itzik) #6

Did you follow the troubleshooting steps? If so, please tell us what you see.


(Bob Reiber) #7

This is not working yet and it started happening on another server. fwconsole restart ucp did not do it and here is what I see in Advanced Settings

image


(Jonathan P) #8

In cert manager. Change the default cert check box to “self signed” then click back to the lets encrypt cert. This fixed it instantly for us.


(Bob Reiber) #9

Hmm, this one doesn’t seem to work for me either. I made a new self signed cert which I then made default. Ran the fwconsole restart again, logged out and back in and no difference. Tried with both the self signed and the lets encrypt cert.


(Bob Reiber) #10

Here’s what I get when I hit F12

image

More specifically

image

And here is more on the error

image


(Jonathan P) #11

Under system admin cert manager. Did you click re-install cert ?


#12

After you do this, then fwconsole pm2 --list to see whether it’s actually running. If not, you can find logs in /var/log/asterisk/ucp_err.log.


(Bob Reiber) #13

Yeah, forgot to mention to that. Might be overboard but my procedure was

  1. in Cert Manager create a new self signed cert and make it default
  2. in https setup install the new cert with a bogus fqdn
  3. fwconsole restart
  4. check in UCP just for the heck of it, obviously doesnt resolve the issue
  5. in Cert Manager make the old Lets Encrypt cert default again
  6. reinstall the cert in https set up
  7. fwconsole restart
  8. log out and back into UCP

no difference. I checked on my cell phone (on the ATT data network, not wifi) and see an additional message

image


(Jonathan P) #14

Did you check the xmp settings under “user groups” for all users in user manager for ucp ?


(Bob Reiber) #15

Seems to be

image

Completely forgot there was a UCP error log. Here’s what I’m seeing a bunch of

2021-02-05 04:43 -08:00: { Error: MySQL server has gone away code: 2006 }
There was an error with MySQL Connection


(Bob Reiber) #16

Searching the forums for that error turns up dozens more threads on this same issue. Looking through some of the suggestions that also dont seem to be working

  • uninstalling ucp, zulu, and all associated dependencies and then reinstalling everything except zulu
  • upgrading ucp to the edge version doesn’t seem be possible
    image
  • uninstalling user manager, not sure i even want to try this one
    image

#17

Are you running out of memory? Can you dig into that mysql error a little more? A mysql error doesn’t suggest to me to start uninstalling modules.


(Itzik) #18

Try a LE cert and see if you still have this problem.


(Bob Reiber) #19

I only made a self signed cert to try the suggestion to switch back and forth and see what happens. I was using a LE cert before and since.


(United States) #20

I’d like to add to this as I’m having the same issue:
Clean install of FreePBX 15 SNG7 (Asterix 16) distro.
At first use, without changing anything, UCP works great (version 15.0.6.20)
As soon as I update it to version 15.0.6.26 along with all the rest of the updates, UCP Daemon and XMPP Daemon will stop working.
Tried fwconsole restart, under fwconsole pm2 --list XMPP is stopped, UCP is errored (15 restarts).
fwconsole start xmpp\ucp doesn’t change it.
I tried messing around with previous PBX versions before (though it was our Firewall or the Certs) but nothing helped.
Is there something wrong with the 15.0.6.26 version of UCP or something?