question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

forever list fails : [Errno 2] No such file or directory

See original GitHub issue

Had the same problem as described in #85. I solved it by adding /usr/local/bin to sudo’s secure_path in the geerlingguy/centos8 box.

[vagrant@nodejs ~]$ sudo -l
Matching Defaults entries for vagrant on nodejs:
    !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin,
    env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE KDEDIR LS_COLORS",
    env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE",
    env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES",
    env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME
    LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
    secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin\:/usr/local/bin

User vagrant may run the following commands on nodejs:
    (ALL) ALL
    (ALL) NOPASSWD: ALL

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
geerlingguycommented, Apr 15, 2022

For now I’ve updated the book example to use rockylinux8 and the full path to forever since it’s not in root’s $PATH. I also updated the examples in this repo. Thanks for posting, and sorry for the trouble!

1reaction
arikbcommented, Mar 12, 2022

I solved it using the laziest way - I changed forever in the playbook to /usr/local/bin/forever

Read more comments on GitHub >

github_iconTop Results From Across the Web

forever list fails : [Errno 2] No such file or directory #85 - GitHub
Using Ansible 2.4.2.0; Darwin When running the nodejs provisioning playbook, it keeps failing when it reaches this task: ...
Read more >
Ansible Error: "[Errno 2] No such file or directory"
This is because the $PATH is not updated with the path of kubectl. You can add the path to $PATH also instead of...
Read more >
Python FileNotFoundError: [Errno 2] No such file or directory ...
This error tells you that you are trying to access a file or folder that does not exist. To fix this error, check...
Read more >
hydra-forever - npm
A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever). Latest version: 2.0.7, last published: 2 years ago ......
Read more >
Troubleshooting AWS Cloud9
Use the following information to identify and address issues with AWS Cloud9. If your issue isn't listed or you need additional help, see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found