2015-05-14 145 views
9

我已经在ubuntu 10.04上配置并安装了couchdb 1.6.1。虽然配置和安装它说成功完成。但是当我启动couchdb时,它给了我错误。Couchdb未启动。 - 未能启动Mochiweb:eaddrinuse

当第一次启动..

Apache CouchDB 1.6.1 (LogLevel=info) is starting. 

Apache CouchDB has started. Time to relax. 

**[info] [<0.32.0>] Apache CouchDB has started on http://127.0.0.1:5984/** 

当local.ini再次

Apache CouchDB 1.6.1 (LogLevel=info) is starting. 

**Failure to start Mochiweb: eaddrinuse** 

[error] [<0.127.0>] {error_report,<0.31.0>, 
        {<0.127.0>,crash_report,[[{initial_call, 
          {mochiweb_socket_server,init,['Argument__1']}}, 
         {pid,<0.127.0>}, 
         {registered_name,[]}, 
         {error_info, 
          {exit,eaddrinuse, 
           [{gen_server,init_it,6}, 
           {proc_lib,init_p_do_apply,3}]}}, 
         {ancestors, 
          [couch_secondary_services,couch_server_sup, 
          <0.32.0>]}, 
         {messages,[]}, 
         {links,[<0.95.0>]}, 
         {dictionary,[]}, 
         {trap_exit,true}, 
         {status,running}, 
         {heap_size,987}, 
         {stack_size,24}, 
         {reductions,467}], 
         []]}} 
{"init terminating in do_boot",{{badmatch,{error,{bad_return,{{couch_app,start,[normal,["/usr/local/etc/couchdb/default.ini","/usr/local/etc/couchdb/local.ini"]]},{'EXIT',{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{application_master,start_it_old,4}]}}}}}},[{couch,start,0},{init,start_it,1},{init,start_em,1}]}} 

Crash dump was written to: erl_crash.dump 
init terminating in do_boot() 

开始我改变了 港5983也从127.0 IP地址为0.0.0.0 .0.1 没有帮助

当我执行sudo netstat的-tulpn

我获得以下输出

TCP 0 0 127.0.0.1:5984 0.0.0.0:* LISTEN 21688/beam.smp

CouchDB的-sApache CouchDB未运行

在此先感谢

+0

确实卷曲'http:// localhost:5984 /'给你任何回应? –

+0

你好Akshat感谢回复,它不给我任何回应...我想等待连接couchdb -s说Apache CouchDB没有运行。 – Satish

+0

您可以使用htop等实用工具手动杀死couchdb。只需安装它。在终端上键入htop。按F4搜索couchdb和F9 +输入杀死它。看看它是否有帮助。 –

回答

0

即使我面临同样的问题。我只是做了..

sudo apt-get update

sudo apt-get install couchdb 

注:我刚刚重新安装的CouchDB现在它的正常工作。在重新安装之前,我做了下面的配置。

安装ICU和使用定位找到ICU-config命令:

locate icu-config 


sudo apt-get install libicu-dev 

了解更多详情请参考以下链接

https://wiki.apache.org/couchdb/Error_messages

0

我面临同样的问题...

幸运的是,Couchdb错误消息文档中有一个修复程序。 https://wiki.apache.org/couchdb/Error_messages

问题

$ CouchDB的
阿帕奇CouchDB的0.9.0a747640(LogLevel的=信息)正在启动。 未启动Mochiweb:eaddrinuse {“init终止在do_boot”,{{badmatch,{error,shutdown}},[{couch_server_sup,start_server,1},{erl_eval,do_apply,5},{erl_eval,exprs,5 },{初始化,start_it,1},{初始化,start_em,1}]}}

解决方案

编辑您的/etc/couchdb/couch.ini文件并更改端口设置为可用港口。

但我没有couch.ini,但有default.ini。 我改变了另一个端口,我猜想应该是免费的,它的工作

2

如果你来这里是因为你最近升级你的CouchDB 2.0,请确保你更新了local.ini配置文件。 Web服务器配置部分已更改(名称从httpd更改为chttpd)。因为端口指令没有被拾取,并且默认为80,这与Web服务器相同。

+0

我发现如果你有* chttpd和httpd集合,你会得到这个错误。评论出httpd部分为我工作。 – Doug

1

根据所提供的错误信息条目,CouchDB的是已经高达&运行您的计算机/服务器上的端口5984

**Failure to start Mochiweb: eaddrinuse** 

这就是为什么当您运行基于Linux的机器上须藤netstat的-tulpn命令,你得到的输出如下:

tcp 0 0 127.0.0.1:5984 0.0.0.0:* LISTEN 21688/beam.smp 

解决方案:

couchdb不是您尝试使用它的服务脚本。它只是试图重新启动并失败,因为一个已经在运行(erlang beam.smp进程仍在运行)。

检查&使用以下命令杀死所有CouchDB的过程:

/bin/ps aux | grep couchdb | grep -v grep | awk '{print $2}' | xargs killl 

开始CouchDB的再次使用以下命令,使用root Linux用户:

service couchdb start 

注:

  • 当你进入CouchDB的-s命令,你当你进入CouchDB的-d命令,你越来越像Apache CouchDB is not running.

原因上述消息越来越像Apache CouchDB is not running.

  • 消息输出,您正在执行上述命令作为非特权Linux用户帐户。

    尝试执行上述命令为root或couchDB运行linux用户帐户。

  • 0

    我也遇到了这个错误开始的CouchDB在Ubuntu 16.04

    的原因是Erlang的端口5984上运行,你会运行命令“netstat的-tulpn”

    0 0时是这样的下面127.0.0.1:5984 0.0.0.0:* LISTEN 13967/beam.smp

    以超级用户模式打开文件/etc/couchdb/default.ini并将httpd端口更改为某个其他可用的端口,能够在没有任何失败的情况下启动couchdb。