nightscout / android-uploader

nightscout android uploader
GNU General Public License v3.0
66 stars 118 forks source link

upgrade mongo driver to 3.0.3 to prepare for mongolab upgrades #193

Closed jasoncalabrese closed 9 years ago

jasoncalabrese commented 9 years ago

This will be a hotfix going directly to master

jasoncalabrese commented 9 years ago

Compiles, but haven't tested yet, going to see if travis like it

rnpenguin commented 9 years ago

FYI, the reason we never updated the mongo driver was because it was the culprit of all that mysterious data usage; not sure if it is the case with the latest but it was definitely opening more connections than needed and using 10x or more data

jasoncalabrese commented 9 years ago

Yeah, I remember that issue, hoping the newest version would work, but enough changed to break the tests. Think xdrip already upgraded to 3.0. We might also be able to use 2.13 (http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers)

jasoncalabrese commented 9 years ago

Getting an error, when trying to upload:

Seems like a known issue: https://jira.mongodb.org/browse/JAVA-1958

09-22 23:26:59.839    8155-8645/com.nightscout.android W/System.err﹕ [cluster-ClusterId{value='560245e717add80562a02585', description='null'}-ds041673.mongolab.com:41673] INFO org.mongodb.driver.cluster - Exception in monitor thread while connecting to server ds041673.mongolab.com:41673
09-22 23:26:59.839    8155-8645/com.nightscout.android W/System.err﹕ com.mongodb.MongoException: java.lang.NoClassDefFoundError: com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient
09-22 23:26:59.839    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:125)
09-22 23:26:59.839    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at java.lang.Thread.run(Thread.java:818)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ Caused by: java.lang.NoClassDefFoundError: com.mongodb.connection.ScramSha1Authenticator$ScramSha1SaslClient
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.ScramSha1Authenticator.createSaslClient(ScramSha1Authenticator.java:61)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:42)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.DefaultAuthenticator.authenticate(DefaultAuthenticator.java:32)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:99)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:44)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
09-22 23:26:59.840    8155-8645/com.nightscout.android W/System.err﹕ ... 2 more
jareware commented 9 years ago

I'm new to this project so I don't really know about the architecture, but what's the reasoning behind interfacing directly with Mongo from the uploader? Not needing a separate server process?

jasoncalabrese commented 9 years ago

It was an old method from before the rest api, we're not going to continue with it

jareware commented 9 years ago

@jasoncalabrese sounds good! If I wanted to read up on where the project's headed, where should I go? :)

jasoncalabrese commented 9 years ago

Most of the discussion is over at https://gitter.im/nightscout/public, the NS uploader isn't being activly worked on now, the dev version has support for MQTT and Share BLE, but there are still some glitches that need work. The xdrip uploader is more active right now, but doesn't have mqtt support yet.