Dropbox bundle authorization via OSGi console

239 views
Skip to first unread message

Jonathan Giles

unread,
Aug 7, 2013, 12:11:52 AM8/7/13
to ope...@googlegroups.com
A bit of a newbie question here, but I've just now started to load the dropbox addon (which used to work), and I'm getting the following message:

16:08:51.359 DEBUG o.o.i.d.i.DropboxSynchronizer[:202] - creating Dropbox session throws an exception
com.dropbox.client2.exception.DropboxSSLException: javax.net.ssl.SSLException: hostname in certificate didn't match: <api.dropbox.com/199.47.219.234> != <*.dropbox.com>
        at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:416)
        at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:337)
        at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:192)
        at com.dropbox.client2.session.WebAuthSession.setUpToken(WebAuthSession.java:218)
        at com.dropbox.client2.session.WebAuthSession.getAuthInfo(WebAuthSession.java:158)
        at com.dropbox.client2.session.WebAuthSession.getAuthInfo(WebAuthSession.java:128)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.authorizeOpenHAB(DropboxSynchronizer.java:256)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.getSession(DropboxSynchronizer.java:228)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.isAuthorized(DropboxSynchronizer.java:199)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.activate(DropboxSynchronizer.java:171)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.updated(DropboxSynchronizer.java:813)
Caused by: javax.net.ssl.SSLException: hostname in certificate didn't match: <api.dropbox.com/199.47.219.234> != <*.dropbox.com>
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:228)
        at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:149)
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:130)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:495)
        at org.apache.http.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:62)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
        at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150)
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575)
16:08:51.377 DEBUG o.o.i.d.i.DropboxSynchronizer[:174] - Dropbox-Bundle isn't authorized properly, so the synchronization jobs won't be started! Please re-initiate the authorization process by restarting the Dropbox-Bundle through OSGi console.

Could someone please point out to me how to get to the OSGi console (on a linux system) and how to start/stop bundles on it?

Thanks!


Thomas Eichstädt-Engelen

unread,
Aug 7, 2013, 1:00:57 AM8/7/13
to ope...@googlegroups.com
Hi,

it depends a bit on how you'd started openHAB. "Normally" you'd executed the start.sh command within screen, right?

* Then you should attach to this screen und press enter.
* You should see a prompt like "osgi >". 
* Now you can type "ss dropbox" which means show shortstatus for all bundles with string 'dropbox' in their name.
* You should see a list (with length 1) containing the db bundle.
* Each row begins with a number which is the bundle id. 
* Now execute 'stop <bunldeid>' and 'start <bundleid>'

Here you go ;-)

Hope this helps,

Thomas E.-E.


--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ben Jones

unread,
Aug 7, 2013, 6:41:13 AM8/7/13
to ope...@googlegroups.com
I am getting the same message after updating to the latest 1.3.0 SNAPSHOT. Dropbox sync was working fine previously but now I am getting the exception below every few seconds. I have tried restarting the openHAB service many times but no luck. 

Any tips?!

22:38:00.892 ERROR o.o.i.d.i.DropboxSynchronizer[:844]- Synchronization files with Dropbox throws an exception
com.dropbox.client2.exception.DropboxSSLException: javax.net.ssl.SSLException: hostname in certificate didn't match: <api.dropbox.com/108.160.162.54> != <*.dropbox.com>
        at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:416)
        at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:337)
        at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:192)
        at com.dropbox.client2.RESTUtility.request(RESTUtility.java:122)
        at com.dropbox.client2.DropboxAPI.delta(DropboxAPI.java:2247)
        at org.openhab.io.dropbox.internal.DropboxSynchronizer.syncDropboxToLocal(DropboxSynchronizer.java:335)
Caused by: javax.net.ssl.SSLException: hostname in certificate didn't match: <api.dropbox.com/108.160.162.54> != <*.dropbox.com>
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:228)
        at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:149)
        at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:130)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:495)


Ben Jones

unread,
Aug 7, 2013, 5:36:08 PM8/7/13
to ope...@googlegroups.com
I can't seem to get my dropbox to re-authenticate. I tried running openHAB in debug on my windows pc, launched a vanilla install, and authenticated dropbox. I then copied the authfile.dbx to my Ubuntu server and restarted but I am still getting this hostname mismatch exception.

Thomas Eichstädt-Engelen

unread,
Aug 7, 2013, 6:16:07 PM8/7/13
to ope...@googlegroups.com
hmm, ok, will have a look at it … thanks for investigating.

Ben Jones

unread,
Aug 8, 2013, 1:10:57 AM8/8/13
to ope...@googlegroups.com
Not sure if this is relevant, but I found https://forums.dropbox.com/topic.php?id=45870.

Seems there is a more recent API (v1.7) but after having a look it seems they have completely re-written most of the API (compared to 1.5.2).


Ben Jones

unread,
Aug 11, 2013, 4:47:19 PM8/11/13
to ope...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages