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

Beer Sample + Rails + Remote database servers

12 replies [Last post]
  • Login or register to post comments
Tue, 02/05/2013 - 04:20
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

Hey Guys,

When running rails server, I keep getting a

couchbase.rb:58:in `initialize': Connection failed: Connection refused (error=0x18) (Couchbase::Error::Connect)

with the following config:

common: &common
  hostname: 192.168.166.101
  port: 8091
  username:
  password:
  pool: default
 
development:
  <<: *common
  bucket: beer-sample
 
production:
  <<: *common
  bucket: beer-sample

When I connect through IRB, it works:

irb(main):004:0> c = Couchbase.connect("http://192.168.166.101:8091/pools/default")
=> #<Couchbase::Bucket:0x915efc4 "http://192.168.166.101:8091/pools/default/buckets/default/" default_format=:document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>

Anything I am missing?

Top
  • Login or register to post comments
Tue, 02/05/2013 - 06:42
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

Switched my install from Ubuntu 12.04 to 10.04, since 12.04 wasn't super supported yet. Getting this error now:

couchbase.rb:58: [BUG] Segmentation fault
ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]

Trying the 1.2.1 gem give me the same as well..

Top
  • Login or register to post comments
Tue, 02/05/2013 - 09:49
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

More infos:

When I set @default_options[:couchbase][:hostname] manually in rack/session.rb it works.

So it seems the example is not grabbing anything from the config/couchbase.yml file?

Top
  • Login or register to post comments
Thu, 02/07/2013 - 09:55
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

Could you please post libcouchbase version and ruby gem version here?

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
Thu, 02/07/2013 - 10:37
scalabl3
Offline
Joined: 07/18/2012
Groups:

if we can't solve it easily through just figuring out any version mismatches, I'll try to spin up an ubuntu 10.04 vm... reply to the thread if the problem is still happening...

__________________

@scalabl3
Technical Evangelist
Couchbase Inc.
 

Top
  • Login or register to post comments
Wed, 02/13/2013 - 13:10
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

Still happens!

ruby-1.9.3-p374
rails 3.2.8
ubuntu server 12.04

Top
  • Login or register to post comments
Wed, 02/13/2013 - 13:19
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

could you post output of the following commands?

$ apt-cache show libcouchbase2-core

and

$ gem list couchbase

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
Thu, 02/14/2013 - 02:46
muqtada321
Offline
Joined: 02/14/2013
Groups: None

The message in the couchbase log is logged twice with 30-60 seconds between each. Ordinarily Id put an entry in the hosts file, but I want to avoid doing this for obvious reasons.Services

Top
  • Login or register to post comments
Fri, 02/15/2013 - 01:25
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

apt-cache show libcouchbase2-core

Package: libcouchbase2-core
Source: libcouchbase
Version: 2.0.3-443
Architecture: i386
Maintainer: Couchbase SDK Team <support@couchbase.com>
Installed-Size: 184
Depends: libc6 (>= 2.7)
Homepage: <a href="http://www.couchbase.com/develop/c/current<br />
Priority:" title="http://www.couchbase.com/develop/c/current<br />
Priority:">http://www.couchbase.com/develop/c/current<br />
Priority:</a> optional
Section: libs
Filename: pool/lucid/main/libc/libcouchbase/libcouchbase2-core_2.0.3-443_i386.deb
Size: 70138
SHA256: 5f80a62191855fb01e800c8c97387e357088a3313a21748e79d8c327dcff151b
SHA1: acbda8a5796ab16f99b85175860889d091246c02
MD5sum: 0ec070bb1945bbe4ad27f9a25d9c64b5
Description: library for the Couchbase protocol, core files
 libcouchbase is a library implementing Couchbase protocol.
 .
 This package provides the Couchbase client library but without any IO backend.
 
Package: libcouchbase2-core
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 168
Maintainer: Couchbase SDK Team <support@couchbase.com>
Architecture: i386
Source: libcouchbase
Version: 2.0.2-416
Depends: libc6 (>= 2.7)
Description: library for the Couchbase protocol, core files
 libcouchbase is a library implementing Couchbase protocol.
 .
 This package provides the Couchbase client library but without any IO backend.
Homepage: http://www.couchbase.com/develop/c/current

*** LOCAL GEMS ***
 
couchbase (1.2.1, 1.2.0, 1.2.0.z.beta5)
couchbase-model (0.5.1)

As you can see, i've tried a few different gem versions; but all with the same result. My feeling is that the config somehow doesn't get picked up and falls back to localhost.

Top
  • Login or register to post comments
Tue, 02/19/2013 - 02:51
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

stijlfigurant wrote:
More infos:

When I set @default_options[:couchbase][:hostname] manually in rack/session.rb it works.

So it seems the example is not grabbing anything from the config/couchbase.yml file?

You are correct, the session and cache stores doesn't use connection options from confing/couchbase.yml

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
Tue, 02/19/2013 - 02:57
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

stijlfigurant wrote:
Switched my install from Ubuntu 12.04 to 10.04, since 12.04 wasn't super supported yet. Getting this error now:

couchbase.rb:58: [BUG] Segmentation fault
ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]

Trying the 1.2.1 gem give me the same as well..

The issue has been fixed in libcouchbase (CCBC-180) https://github.com/couchbase/libcouchbase/commit/aadb912dc8d69bcf67805ad...

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
Tue, 02/19/2013 - 03:13
stijlfigurant
Offline
Joined: 02/05/2013
Groups: None

Wonderful, will try this out later today and let you know if it worked.

Thank you!

Top
  • Login or register to post comments
Tue, 02/19/2013 - 04:28
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

libcouchbase 2.0.4 hasn't released yet, but you can try to use "snapshot" repository, where we are uploading the most recent version which passed tests, just switch your repo to this one

deb http://packages.couchbase.com/snapshot/ubuntu precise precise/main

__________________

Find me on FreeNode IRC in #libcouchbase channel

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