incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Marino <mmar...@gmail.com>
Subject Re: running views return nothing with couchdb1.5.1
Date Wed, 21 May 2014 16:20:40 GMT
Yeah, that's the problem.  libmozjs.so is either not installed or not in a
path searched by the dynamic linker.  It's probably the latter, you can
search for it using e.g. find, locate, etc and either generate a link to it
e.g. in /usr/local/lib, or add the location to your search path.  Once you
do that, just make sure you can run couchjs.  Once you can, couch should be
able to build your views.


On Wed, May 21, 2014 at 6:03 PM, Ramanadham, Radhika <
radhika.ramanadham@emc.com> wrote:

> Here is what I get. Looks like libmozjs.so is missing?
>
> lglod078:/var/log/couchdb # which couchjs
> /usr/bin/couchjs
> lglod078:/var/log/couchdb # ldd `which couchjs`
>         linux-vdso.so.1 (0x00007fffb13ff000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007f2bf6d8b000)
>         libmozjs.so => not found
>         libplds4.so => /usr/lib64/libplds4.so (0x00007f2bf6b87000)
>         libplc4.so => /usr/lib64/libplc4.so (0x00007f2bf6982000)
>         libnspr4.so => /usr/lib64/libnspr4.so (0x00007f2bf6743000)
>         libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f2bf6508000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f2bf6159000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f2bf5f3b000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007f2bf5d37000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007f2bf5b2f000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f2bf708e000)
> lglod078:/var/log/couchdb # couchjs
> couchjs: error while loading shared libraries: libmozjs.so: cannot open
> shared object file: No such file or directory
> lglod078:/var/log/couchdb #
>
>
>
> -----Original Message-----
> From: Mike Marino [mailto:mmarino@gmail.com]
> Sent: Wednesday, May 21, 2014 11:59 AM
> To: user@couchdb.apache.org
> Subject: Re: running views return nothing with couchdb1.5.1
>
> Ok, that could indeed be an error from a library not find while running an
> external process (e.g. couchjs). Can you run couchjs?
>
> :~> which couchjs
> /usr/local/bin/couchjs
> :~> ldd `which couchjs`
> ... should resolve all libaries ...
> :~> couchjs
>
>
>
> On Wed, May 21, 2014 at 5:50 PM, Ramanadham, Radhika <
> radhika.ramanadham@emc.com> wrote:
>
> > Here is what I see in the log:
> >
> > [Wed, 21 May 2014 15:49:42 GMT] [error] [<0.202.0>] OS Process Error
> > <0.17168.143> :: {os_process_error,
> >
> > {exit_status,127}} [Wed, 21 May 2014 15:49:42 GMT] [error]
> > [<0.3093.3>] OS Process Error <0.17165.143> :: {os_process_error,
> >
> > {exit_status,127}} [Wed, 21 May 2014 15:49:42 GMT] [error] [<0.202.0>]
> > OS Process Error <0.17176.143> :: {os_process_error,
> >
> > {exit_status,127}} [Wed, 21 May 2014 15:49:42 GMT] [error]
> > [<0.3093.3>] OS Process Error <0.17174.143> :: {os_process_error,
> >
> > {exit_status,127}} [Wed, 21 May 2014 15:49:42 GMT] [error] [<0.202.0>]
> > OS Process Error <0.17172.143> :: {os_process_error,
> >
> > {exit_status,127}} [Wed, 21 May 2014 15:49:42 GMT] [error]
> > [<0.3093.3>] OS Process Error <0.17182.143> :: {os_process_error,
> >
> > {exit_status,127}}
> >
> > -----Original Message-----
> > From: Mike Marino [mailto:mmarino@gmail.com]
> > Sent: Wednesday, May 21, 2014 11:04 AM
> > To: user@couchdb.apache.org
> > Subject: Re: running views return nothing with couchdb1.5.1
> >
> > Ok, then for some reason your view can't be built.
> >
> > Can you output the log?  You should see error output when you request
> > the view.  (Best is to use friendpaste or something similar and send a
> > link.)
> >
> > Am 21.05.2014 um 16:54 schrieb "Ramanadham, Radhika" <
> > radhika.ramanadham@emc.com>:
> >
> > Sorry, looks like the images are filtered out.
> >
> >
> >
> > But, here is what gets returned- Error- An error occurred accessing
> > the view.
> >
> >
> >
> >
> >
> > *From:* Ramanadham, Radhika
> > [mailto:radhika.ramanadham@emc.com<radhika.ramanadham@emc.com>]
> >
> > *Sent:* Wednesday, May 21, 2014 10:47 AM
> > *To:* user@couchdb.apache.org
> > *Subject:* RE: running views return nothing with couchdb1.5.1
> >
> >
> >
> > Thanks Mike. I will clean up my reduce functions once I get this
> resolved.
> >
> >
> >
> > Reg the issue:  I am not sure where to look if views are building or not.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On the other hand, on couchdb server 1.5.0, I see the results:
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Mike Marino [mailto:mmarino@gmail.com <mmarino@gmail.com>]
> > Sent: Wednesday, May 21, 2014 10:32 AM
> > To: user@couchdb.apache.org
> > Subject: Re: running views return nothing with couchdb1.5.1
> >
> >
> >
> > Hi Radhika,
> >
> >
> >
> > What does the server status say in futon?  (i.e. does it note that the
> > views are building or not?)
> >
> >
> >
> > One side comment, the reduce functions that you posted will likely not
> > do what you expect when a rereduce is run.  I would suggest using
> > _stats (preferable solution,
> > http://couchdb.readthedocs.org/en/latest/couchapp/ddocs.html#builtin-r
> > educe-functions
> >
> > ).
> >
> >
> >
> > Cheers,
> >
> > Mike
> >
> >
> >
> >
> >
> > On Wed, May 21, 2014 at 4:25 PM, Ramanadham, Radhika <
> > radhika.ramanadham@emc.com> wrote:
> >
> >
> >
> > > Hi,
> >
> > >
> >
> > > I have some code that creates DB, documents and design documents
> > > with
> >
> > > views and lists.
> >
> > >
> >
> > > When I run views, I don't know why, but it returns nothing and waits
> >
> > > for ever. This is with couchdb1.5.1
> >
> > >
> >
> > > When I run the same code against my another couchdb server, only
> >
> > > difference being that the version is 1.5.0, it works perfect. All
> > > the
> >
> > > views return the right responses and results.
> >
> > >
> >
> > > Can anyone help me here? I am at a loss!
> >
> > >
> >
> > > Below is a snippet of my design doc:
> >
> > >
> >
> > > def createDesignDocForPerfStats():
> >
> > >     design = db.design('perfstats')
> >
> > >     resp = design.put(params={
> >
> > >         "_id":"_design/perfstats",
> >
> > >         "language": "javascript",
> >
> > >         "views":
> >
> > >         {
> >
> > >             "by_server": {
> >
> > >                 "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit([doc.Hostname,doc.test_id],{
> >
> > > 'Start_time':doc.start_time ,'CPU': doc.CPU, 'Memory': doc.Memory,
> >
> > > 'FileSystem':doc.FileSystem }) }"
> >
> > >             },
> >
> > >              "by_test_id": {
> >
> > >                 "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit(doc.test_id,{ 'Server Name':
> > > doc.Hostname,
> >
> > > 'Start_time':doc.start_time, 'CPU': doc.CPU, 'Memory': doc.Memory,
> >
> > > 'FileSystem':doc.FileSystem }) }"
> >
> > >             },
> >
> > >              "by_testid_starttime": {
> >
> > >                 "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit([doc.test_id, doc.start_time],{ 'Server
> > Name':
> >
> > > doc.Hostname, 'TestID':doc.test_id, 'CPU': doc.CPU, 'Memory':
> >
> > > doc.Memory, 'FileSystem':doc.FileSystem }) }"
> >
> > >             },
> >
> > >              #view is
> >
> > >
> >
> > http://10.247.32.71:5984/longevity/_design/perfstats51/_view/server?gr
> > oup=true
> >
> > >              "server": {
> >
> > >                  "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit([doc.test_id, doc.Hostname],null ) }",
> >
> > >                  "reduce": "function(keys, values) {return (null)}"
> >
> > >              },
> >
> > >             "cpu": {
> >
> > >                 "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit(doc.test_id, doc.CPU) }",
> >
> > >                 "reduce": "function(keys, values) "
> >
> > >                           "{ "
> >
> > >                           "avg =
> Math.round(sum(values)/values.length);"
> >
> > >                           "return(avg)"
> >
> > >                           " }"
> >
> > >             },
> >
> > >             #get avg cpu for all servers per time
> >
> > >             #
> >
> > >
> >
> > http://10.247.32.72:5984/longevity/_design/perfstats1/_view/cpu_by_sta
> > rttime?group=true
> >
> > >             "cpu_by_starttime": {
> >
> > >                 "map": "function(doc) { if ((doc.type ==
> >
> > > 'performance_stats'))  emit([doc.test_id,doc.start_time], doc.CPU)
> > > }",
> >
> > >                 "reduce": "function(keys, values) "
> >
> > >                           "{ "
> >
> > >                           "avg =
> Math.round(sum(values)/values.length);"
> >
> > >                           "return(avg)"
> >
> > >                           " }"
> >
> > >             },
> >
> > >         },
> >
> > >         "lists":{
> >
> > >             "sort":"function(head, req) {"
> >
> > >                     "var row;"
> >
> > >                     "var rows=[];"
> >
> > >                     "while(row = getRow()) {"
> >
> > >                         "rows.push(row)"
> >
> > >                     "};"
> >
> > >                     "rows.sort(function(a,b) {"
> >
> > >                     "return b.value-a.value"
> >
> > >                     "});"
> >
> > >                     "send(JSON.stringify({\"rows\" : rows[0]}))"
> >
> > >             "}"
> >
> > >         }
> >
> > >     })
> >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message