Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Base path (-p PATH) not working #258

jgoodall opened this Issue · 7 comments

6 participants


Installing forever locally (not -g) and trying to set the log file on the CLI with the following command returns the following error:
$ ./node_modules/forever/bin/forever start -p pwd -l logs/forever.log -o logs/out.log -e logs/err.log --pidFile pids/ server.js
Error: ENOENT, no such file or directory '/path/to/home/.forever/logs/forever.log'

Isnt the -p PATH supposed to set the base for logs and pids, or am I misinterpreting that?

how come -l and -o/-e behave different with respect to their root?



The -l option is currently set to use the forever config path unless the value provided for -l starts with a /. For now, at least, this is expected behavior.

@AvianFlu AvianFlu closed this

Ok, but isnt setting the 'forever config path' done using -p? If so, it doesnt seem to be working for me. If not, is that possible? Thanks.

@AvianFlu AvianFlu reopened this

I take it back, that option is actually broken. A workaround: forever set root /some/other/path will change the default forever root path. -p is supposed to be changing this, but isn't.


Why isn't this merged yet?


The docs about -p say:
-p PATH Base path for all forever related files (pid files, etc.)

However the pid dir is clearly not set in the latest version of forever:
screen shot 2013-05-03 at 10 19 18 pm


The -p option is still remains broken.
Forever always creates a ~/.forever directory with at least "config.json", "pids" and "sock" even if -p is given.

This is also a source of "forever list" not showing the processes type of errors: if HOME is not defined Forever will fail to read ~/.forever and fail to communicate with the monitor. Many upstart systems will run without a HOME env., so while Forever happily starts even if the directory cannot be created, you then cannot use the "list" or "stop" commands on the CLI.


Exactly, that's the actual problem I'm having with it. I'm a weird environment without a HOME directory and it's not letting me stop or restart. I believe this is the source of the problem!

Here are 2 other weird bits:

Shouldn't it at least tell me it's trying to read logs from where I tell it logs will be?

screen shot 2013-05-06 at 8 29 29 am

Aren't I setting the root by using -p? How come it's not telling me any of the following:

  1. root: /tmp
  2. Reading config from xyz.json (so I can tell what's going on)
  3. Config is a read-only command and options will not be applied

screen shot 2013-05-06 at 8 31 40 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.