Reply
Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14
Accepted Solution

When connecting using java client, what data transfers initially?

What we've noticed is that sometimes we can't connect to the server when the internet connection is slow. It seems like when the connection is first made, there's a large chunk of data that gets downloaded. It maxes out the connection, causes high ping times etc., but ultimately fails connection. 

 

It's even worse when we're on a VPN. We have employees who are way back in the woods, and aren't able to always connect. Just curious what is this big chunk of data.

 

We have almost 5k devices in AC2, I'm sure that adds to it to some degree, but it seems excessive like it's downloading a whole new client again or something.


Accepted Solutions
Highlighted
Veteran Member
Posts: 4,823
Registered: ‎03-02-2015
Kudos: 934
Solutions: 217

Re: When connecting using java client, what data transfers initially?

[ Edited ]

I see your issue.
as mentioned in linked help page:
'Program parameter can be passed in those files using -D<parameter> syntax.'
So it has to be: -DneverTimeoutConnection

===================================================
We all work for KUDOs here.
Thx

View solution in original post


All Replies
Ubiquiti Employee
Posts: 766
Registered: ‎05-28-2012
Kudos: 391
Solutions: 79

Re: When connecting using java client, what data transfers initially?

Hi @elmorekevin,

 

yes, after login client fetches data for all devices, but after that updates are minimal in most cases. Stable connection between client and server is need when network is large. We will look how to mitigate this issue in future releases.

Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

@UBNT-Karolis Any chance you all have been able to take a look at this issue? I must be hitting some sort of time-out when connecting using the java client.

 

We have almost 5000 devices being monitored. I am on a 6 Mbps connection, have to be on a VPN, and when I try to connect I download about 17 MB of data in 39 seconds before AC2 says "Can't connect to server." When it does work, I think it downloads more than 20 MB of data.

 

I can connect to the html client just fine, it only seems to download about 8 MB of data during its initial load.

 

Is there a time-out limit that could be increased for the java client? Maybe if I reduced the number of column in the device list, would that reduce the amount of data transferred?

 

 

Ubiquiti Employee
Posts: 766
Registered: ‎05-28-2012
Kudos: 391
Solutions: 79

Re: When connecting using java client, what data transfers initially?

@elmorekevin we will try improve this situation for the next release. Currently there are no options to tweak this.

Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

[ Edited ]

@UBNT-Karolis Does it have anything to do with how many columns are displayed for each user? We're downloading 20+ MB just to connect to our server using the java client, and I think this is just device data, not a program update.

Ubiquiti Employee
Posts: 766
Registered: ‎05-28-2012
Kudos: 391
Solutions: 79

Re: When connecting using java client, what data transfers initially?

@elmorekevin,

 

no it does not, it will fetch this data anyway. You can try using neverTimeoutConnection startup option, set this for both Server and Client. Here is manual how to add startup options: https://help.ubnt.com/hc/en-us/articles/360004061093-airControl-Server-and-Desktop-Client-Startup-Op...

 

The downside of using this option is that Server will not disconnect the Client upon actuall timeout.

Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

@UBNT-Karolis Thanks for the information, I will try that next time we have issues on a slow connection. I assume that will leave an open session, which doesn't seem to matter much as I've just checked and here is a list of users with their many many open sessions. I do wish there were a way to clear these open sessions. 

2018-08-01 10_33_23-Task Switching.png

Veteran Member
Posts: 4,823
Registered: ‎03-02-2015
Kudos: 934
Solutions: 217

Re: When connecting using java client, what data transfers initially?

Restart of AC2 server service drops them, but i guess you can't just restart without seeing other issues.
(at least worked with older AC2.1 betas)
===================================================
We all work for KUDOs here.
Thx
Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

We added this -neverTimeoutConnection option to /opt/Ubiquiti/Aircontrol2/airControl2Server.vmoptions (followed by a line break as req'd). Unfortunately this caused the service to not start--not even a log was generated.  We're using Java 1.8.0_1117 with 2.1GA.

 

We got lucky and found /opt/Ubiquiti/AirControl2/nohup.out which contained:

Unrecognized option: -neverTimeoutConnection
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Do we have the wrong command here or this command isn't supported in this version? @UBNT-Karolis

 

Thanks!

Veteran Member
Posts: 4,823
Registered: ‎03-02-2015
Kudos: 934
Solutions: 217

Re: When connecting using java client, what data transfers initially?

First update to AC2.1 stable release. GA is outdated.
===================================================
We all work for KUDOs here.
Thx
Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

Sorry I didn't realize the distinction between GA and stable. I think we are on the stable. The web gui at the top shows 2.1, not 2.1GA.

--- airControl server diagnostic page generated on 2018.11.21 10:58:49 ---

Server Version           : v2.1-180316-1259
Server Name              : 
Server Uptime            : 01:01:13
Database Version         : PostgreSQL 9.5.9 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55), 64-bit
Database Schema Version  : 13.0
OS Name                  : Linux
OS Version               : 3.16.0-77-generic
JRE Version              : 1.8.0_111
JRE Architecture         : 64 bit
Server UUID              : 8cf6e575-3296-31c0-aaef-e0dc1d76fdac
Java Classpath           : /opt/Ubiquiti/AirControl2/.install4j/i4jruntime.jar:/opt/Ubiquiti/AirControl2/lib/ac.jar:/opt/Ubiquiti/AirControl2/lib/activation.jar:/opt/Ubiquiti/AirControl2/lib/commons-cli-1.3.1.jar:/opt/Ubiquiti/AirControl2/lib/commons-codec.jar:/opt/Ubiquiti/AirControl2/lib/commons-dbcp2-2.1.1.jar:/opt/Ubiquiti/AirControl2/lib/commons-logging.jar:/opt/Ubiquiti/AirControl2/lib/commons-pool2-2.4.2.jar:/opt/Ubiquiti/AirControl2/lib/gson-2.5.jar:/opt/Ubiquiti/AirControl2/lib/hk2-api-2.5.0-b42.jar:/opt/Ubiquiti/AirControl2/lib/hk2-locator-2.5.0-b42.jar:/opt/Ubiquiti/AirControl2/lib/hk2-utils-2.5.0-b42.jar:/opt/Ubiquiti/AirControl2/lib/jackson-annotations-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/jackson-core-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/jackson-databind-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/jackson-jaxrs-base-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/jackson-jaxrs-json-provider-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/jackson-module-jaxb-annotations-2.9.2.jar:/opt/Ubiquiti/AirControl2/lib/javassist-3.18.1-GA.jar:/opt/Ubiquiti/AirControl2/lib/javax.annotation-api-1.2.jar:/opt/Ubiquiti/AirControl2/lib/javax.inject-2.4.0-b31.jar:/opt/Ubiquiti/AirControl2/lib/javax.ws.rs-api-2.1.jar:/opt/Ubiquiti/AirControl2/lib/jersey-client.jar:/opt/Ubiquiti/AirControl2/lib/jersey-common.jar:/opt/Ubiquiti/AirControl2/lib/jersey-container-servlet-core.jar:/opt/Ubiquiti/AirControl2/lib/jersey-container-servlet.jar:/opt/Ubiquiti/AirControl2/lib/jersey-entity-filtering-2.26.jar:/opt/Ubiquiti/AirControl2/lib/jersey-guava-2.25.1.jar:/opt/Ubiquiti/AirControl2/lib/jersey-hk2.jar:/opt/Ubiquiti/AirControl2/lib/jersey-media-multipart-2.26.jar:/opt/Ubiquiti/AirControl2/lib/jersey-server.jar:/opt/Ubiquiti/AirControl2/lib/jetty-all-9.4.7.v20170914.jar:/opt/Ubiquiti/AirControl2/lib/jsch.jar:/opt/Ubiquiti/AirControl2/lib/mail.jar:/opt/Ubiquiti/AirControl2/lib/mimepull-1.9.6.jar:/opt/Ubiquiti/AirControl2/lib/postgresql-42.1.4.jar:/opt/Ubiquiti/AirControl2/lib/start.jar:/opt/Ubiquiti/AirControl2/lib/swagger-annotations-2.0.0-SNAPSHOT.jar:/opt/Ubiquiti/AirControl2/lib/validation-api-1.1.0.Final.jar
--- Memory usage ---
Free memory : 1.46 GB
Used memory : 1.39 GB
Total memory: 2.85 GB
Max memory  : 10.67 GB
Veteran Member
Posts: 4,823
Registered: ‎03-02-2015
Kudos: 934
Solutions: 217

Re: When connecting using java client, what data transfers initially?

Well you're on latest AC2.1 stable version.

Can you attach your both
airControl2Server.vmoptions and airControl2Client.vmoptions files?
or at least content of both
===================================================
We all work for KUDOs here.
Thx
Regular Member
Posts: 478
Registered: ‎09-16-2013
Kudos: 153
Solutions: 14

Re: When connecting using java client, what data transfers initially?

Here's the airControl2Server.vmoptions file from the Ubuntu server that causes the Java VM to not start (including the trailing line break):

-Xmx12288m
-neverTimeoutConnection


Here's the airControl2Client.vmoptions (from my Windows machine. I'm configuring the -neverTimeoutConnection on another user's machine). Odd I don't see a line break at the end of this file--but anyway, no issues on my client.

-classpath/p C:\Users\kelmore/.AirControl2/lib/ac.jar
Highlighted
Veteran Member
Posts: 4,823
Registered: ‎03-02-2015
Kudos: 934
Solutions: 217

Re: When connecting using java client, what data transfers initially?

[ Edited ]

I see your issue.
as mentioned in linked help page:
'Program parameter can be passed in those files using -D<parameter> syntax.'
So it has to be: -DneverTimeoutConnection

===================================================
We all work for KUDOs here.
Thx
Reply