hoodiehq-archive / my-first-hoodie

⛔ deprecated
Other
157 stars 35 forks source link

Waiting for CouchDB FAILED #18

Closed kschaper closed 11 years ago

kschaper commented 11 years ago

Hello,

unfortunately Hoodie's first run fails on my machine:

$ hoodie start
npm WARN package.json hornhaut@1.0.0 No repository field.

> hornhaut@1.0.0 start /Users/kai/dev/hornhaut
> node node_modules/hoodie-app/bin/start
...
Initializing...
CouchDB started: http://couch.hornhaut.dev:80
Waiting for CouchDB [---*--] FAILED

ERR! Error: Timed out waiting for CouchDB. These logs may help:
ERR!  /Users/kai/Library/Hoodie/Apps/hornhaut/couch.stderr
ERR!  /Users/kai/Library/Hoodie/Apps/hornhaut/couch.stdout
ERR!  /Users/kai/Library/Hoodie/Apps/hornhaut/couch.log
ERR!     at Request._callback (/Users/kai/dev/hornhaut/node_modules/hoodie-app/lib/couch.js:129:37)
ERR!     at self.callback (/Users/kai/dev/hornhaut/node_modules/hoodie-app/node_modules/request/index.js:142:22)
ERR!     at Request.EventEmitter.emit (events.js:95:17)
ERR!     at ClientRequest.self.clientErrorHandler (/Users/kai/dev/hornhaut/node_modules/hoodie-app/node_modules/request/index.js:246:10)
ERR!     at ClientRequest.EventEmitter.emit (events.js:95:17)
ERR!     at Socket.socketErrorListener (http.js:1499:9)
ERR!     at Socket.EventEmitter.emit (events.js:95:17)
ERR!     at net.js:813:16
ERR!     at process._tickCallback (node.js:415:13)
ERR!     at net.js:813:16
ERR!     at process._tickCallback (node.js:415:13)

Stopping CouchDB...

couch.stderr:

heart_beat_kill_pid = 17217
heart_beat_timeout = 11
heart: Sat May 18 18:46:35 2013: Erlang has closed.
/usr/local/Cellar/couchdb/1.3.0/bin/couchdb: line 305: echo: write error: Broken pipe
heart: Sat May 18 18:46:35 2013: Executed "/usr/local/Cellar/couchdb/1.3.0/bin/couchdb -k" -> 256. Terminating.

Im on Mac OS X 10.6.8 Snow Leopard, CouchDB 1.3.0, Node 0.10.6 and NPM v1.2.18. All installed via Homebrew. However, I'm not shure if there still some remains from a former pkg Node installation. I installed local-tdl but it might not work.

~/.local-tld.json:

{
  "4001": {
    "name": "hello"
  }
}

I created a "Hello World" Node script that listens to that port. It works with IP + port but not with http://hello.dev.

Any ideas are much appreciated.

Kai

gr2m commented 11 years ago

try to update local-tld

npm -g install local-tld

That helped me the other day

adamyeats-zz commented 11 years ago

Hi @kschaper !

Would you be able to run cat ~/Library/LaunchAgents/ie.hood.local-tld-service.plist and paste the output of that here?

kschaper commented 11 years ago

@gr2m It's a fresh install @adamyeats here it is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>ie.hood.local-tld-service</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/bin/node</string>
                <string>/usr/local/share/npm/lib/node_modules/local-tld/bin/local-tld-service</string>
        </array>
        <key>KeepAlive</key>
        <true/>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>
gr2m commented 11 years ago

The contents of your ~/.local-tld.json are definitely wrong, it should rather look like:

{"4001":{"name":"hornhaut","aliases":{"www":true}},"4002":{"name":"couch. hornhaut"}}

Hm ... is the local-tld running at all? Could you double check with ps aux | grep local-tld?

kschaper commented 11 years ago

@gr2m What I previously posted wasn't the full ~/.local-tdl.json - it was the part of the "Hello World" script only. This is the complete data:

{
  "6004": {
    "name": "hornhaut",
    "aliases": {
      "www": true
    }
  },
  "6005": {
    "name": "admin.hornhaut"
  },
  "6006": {
    "name": "couch.hornhaut"
  },
  "4001": {
    "name": "hello"
  }
}

local-tld is running:

$ ps aux | grep local-tld
kai      34736   0,0  0,3  3028660  21388   ??  S    10:52am   0:01.56 /usr/local/bin/node /usr/local/share/npm/lib/node_modules/local-tld/bin/local-tld-service
kschaper commented 11 years ago

For some reasons it works now:

Initializing...
CouchDB started: http://couch.hornhaut.dev:80
Waiting for CouchDB [--*---] SUCCESS

Unfortunately I have absolutely no idea why. But thank you all anyway.