Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Mobile

can't get Couchbase mobile server to start on Android simulators

5 replies [Last post]
  • Login or register to post comments
Fri, 11/04/2011 - 16:18
Marcelo
Offline
Joined: 11/04/2011
Groups: None

I also posted this question on the Couchbase google group. I'm having difficulty getting the couchbase server to start on all Android simulators (using Android 2.1 v7 mainly). I've tried on several different IDEs (Eclipse and IDEA) with similar results, that is, the couchbaseStarted() method is never called.

A logcat output is available here: http://pastebin.com/xdw6kmBh

The log output is for a test using the GrocerySync app but I get similar results following the instructions here: http://www.couchbase.org/get/couchbase-mobile-for-android/current

I'm using the contents of the latest android-couchbase-dp.zip file.

Anyone experiencing similar problems or have suggestions as to what the problem might be?

Thanks,
Marcelo

Top
  • Login or register to post comments
Fri, 11/04/2011 - 18:30
Marcelo
Offline
Joined: 11/04/2011
Groups: None

Stepping through the CouchbaseService code I see that mHandler receives a COMPLETE message, however, the couchbaseRunThread is null so the startCouchbaseService() method is called. From that point on, I see the couchbaseRunThread being started:

couchbaseRunThread = new Thread() {
   public void run() {
      ErlangThread.setHandler(mHandler);
      ErlangThread.start_erlang(bindir, sopath, argv);
      Log.i(CouchbaseMobile.TAG, "Erlang thread ended.");
   }
};      

From that point on I don't see where couchbaseStarted() is called?

Could this be the problem?

Top
  • Login or register to post comments
Sat, 11/05/2011 - 16:12
mschoch
Offline
Joined: 08/03/2011
Groups: None

Thanks for trying to help us debug this issue. The start_erlang method is not expected to return in normal operation. The couchbaseStarted() method should be called from within the erl_message method of the ErlangThread class.

Can you check your logs and see if that "Erlang thread ended." message appears?

The google group is probably the best place to work through these issues, it sounds as though others are running into a similar problem.

marty

Top
  • Login or register to post comments
Sat, 11/05/2011 - 18:01
Marcelo
Offline
Joined: 11/04/2011
Groups: None

Hi Marty,

The "Erlang thread ended." message does not appear in the log files. I set a break point in the erl_message method of ErlangThread but it is never triggered - I'm assuming that's where the COUCHBASE_STARTED is sent back, eventually bubbling up to the main activity class.

I saw your new post on google group regarding this issue and I'll make sure to keep an eye on it. I unfortunately don't have a real device to work with, so I can only attest to seeing the problem on the emulators at the moment.

Thanks,
Marcelo

Top
  • Login or register to post comments
Thu, 05/17/2012 - 15:00
rafaelivang
Offline
Joined: 05/17/2012
Groups: None

Hi Marcelo,

Could you solve your problem?
Actually I am having the same problem as you had.
I saw that couchbaseStarted() is called in line 95 in couchbaseService.class from couchbase-2.0.0-db-31.jar
Which case COUCHBASE_STARTED I think is sent as a message since class ErlangThread.class in line 34 with this sentence Message.obtain(mHandler, CouchbaseService.COUCHBASE_STARTED, new URL(url)).sendToTarget();
Well It's all what i have found and I even don't know how to pass the URL and port to start couchbase in an android device.
Do you have a suggestion?

Thanks,
Ivan

Top
  • Login or register to post comments
Fri, 05/18/2012 - 09:20
Marcelo
Offline
Joined: 11/04/2011
Groups: None

Hi Ivan,

It's been quite some time since I've worked with this so I don't fully remember all the details. However, I do remember part of my problem was not allocating enough memory when starting the emulator. When creating your AVD devices, make sure to specify an SD Card of 16 Mb.

Cheers,
Marcelo

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker