Foreman terminates immediately

后端 未结 3 493
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-06 03:35

I recently installed OSX and Ubuntu on different computers. I then attempted to install redis and foreman for both OS\'s. Both errors threw no flags, and seemed

相关标签:
3条回答
  • 2021-02-06 03:38

    Try starting Redis server with the following command :

    redis-server <path to your config file>
    

    Also, check if there's an instance of Redis server already running by

    ps aux | grep redis 
    

    and then if process is found :

    kill <process id>
    

    Restart your redis server.

    0 讨论(0)
  • 2021-02-06 03:46

    This one liner will kill any existing redis-servers and then start a new redis-server. When run in Foreman it doesn't send a SIGTERM which causes Foreman to quit, sending a SIGINT lets Foreman continue.

    (ps aux | grep 6379 | grep redis | awk '{ print $2 }' | xargs kill -s SIGINT) && redis-server

    In Procfile.dev:

    redis: (ps aux | grep 6379 | grep redis | awk '{ print $2 }' | xargs kill -s SIGINT) && redis-server

    0 讨论(0)
  • 2021-02-06 03:55
    1. List the redis server running using terminal command : ps aux | grep redis
    2. In list note down 'pid' number of the server which you want to terminate Example pid: 5379
    3. use command : kill 5379
    0 讨论(0)
提交回复
热议问题