Error in forever.js with Ubuntu 12.04

617 views
Skip to first unread message

mengy007

unread,
Sep 11, 2012, 10:01:30 PM9/11/12
to lo...@googlegroups.com
I have already installed and configured working deployments in about 5 other Ubuntu 12.04 VMs. I can't figure out what I'm doing or not doing for this one.

Everything instals fine but when I go to  run the harvester, I get this...

Starting Log.io harvester...
No directory, logging in with HOME=/

/usr/local/lib/node_modules/forever/lib/forever.js:617
    procs.forEach(function (proc) {
          ^
TypeError: Object Error: EACCES, mkdir '/.forever' has no method 'forEach'
    at Object.format (/usr/local/lib/node_modules/forever/lib/forever.js:617:11)
    at /usr/local/lib/node_modules/forever/lib/forever.js:495:28
    at /usr/local/lib/node_modules/forever/lib/forever.js:127:14
    at /usr/local/lib/node_modules/forever/lib/forever.js:80:20
    at /usr/local/lib/node_modules/forever/node_modules/utile/node_modules/mkdirp/index.js:25:29
    at Object.oncomplete (/usr/local/lib/node_modules/forever/node_modules/utile/node_modules/mkdirp/index.js:37:53)
Launching forever process...
info:    Forever processing file: /usr/local/bin/log.io-harvester

fs.js:240
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/.forever/f-yh.log'
    at Object.openSync (fs.js:240:18)
    at Object.startDaemon (/usr/local/lib/node_modules/forever/lib/forever.js:391:14)
    at /usr/local/lib/node_modules/forever/lib/forever/cli.js:229:13
    at /usr/local/lib/node_modules/forever/lib/forever/cli.js:134:5
    at Object.oncomplete (/usr/local/lib/node_modules/forever/lib/forever.js:343:11)
Done.
Done.

Bruno Ratnieks

unread,
Sep 11, 2012, 10:20:37 PM9/11/12
to lo...@googlegroups.com

It seems that the user does not have a valid home directory environment variable.

Which user are you using to start the service?

Meng Yang

unread,
Sep 11, 2012, 10:40:35 PM9/11/12
to lo...@googlegroups.com

I'm running it with sudo

Bruno Ratnieks

unread,
Sep 12, 2012, 8:54:54 AM9/12/12
to lo...@googlegroups.com
try using "sudo -E" to preserve the enviroment.

Bruno

Meng Yang

unread,
Sep 12, 2012, 9:30:28 AM9/12/12
to lo...@googlegroups.com
I get the same exact error. I actually get the same "No directory" message for my working installs as well. I think the problem is within the forever module. For the other installs I had to force forever back to version 0.9.0 from 0.10.0 to get them to work but for this one, neither one works. I also tried going back as far as 0.8.2, same error.

Meng

gwlc

unread,
Nov 6, 2012, 2:16:14 PM11/6/12
to lo...@googlegroups.com
I have the same problem and find the solution: 

issue is the 'home' folder is not existing, 
1. check the log.io home diretory
    cat /etc/passwd |grep logio 
              logio:x:999:999::/usr/local/lib/node_modules/log.io/home:/bin/sh
2. create a folder "/usr/local/lib/node_modules/log.io/home" or change the path in passwd file. 
3. start server 
Reply all
Reply to author
Forward
0 new messages