工头立即终止 [英] Foreman terminates immediately
问题描述
我最近在其他计算机上安装了OSX 和 Ubuntu.然后,我尝试为两个OS都安装Redis和管工.这两个错误均未引发任何标志,并且似乎已成功执行.但是,每当我以foreman start
开始工头时,我在两台计算机上都遇到以下问题:
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 to execute successfully. However, whenever I go to start foreman with foreman start
, I run into the below issue on both computers:
23:48:35 web.1 | started with pid 1316
23:48:35 redis.1 | started with pid 1317
23:48:35 worker.1 | started with pid 1318
23:48:35 redis.1 | [1317] 11 Jun 23:48:35.180 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
23:48:35 redis.1 | [1317] 11 Jun 23:48:35.181 * Increased maximum number of open files to 10032 (it was originally set to 256).
23:48:35 redis.1 | [1317] 11 Jun 23:48:35.181 # Creating Server TCP listening socket *:6379: bind: Address already in use
23:48:35 redis.1 | exited with code 1
23:48:35 system | sending SIGTERM to all processes
23:48:35 worker.1 | terminated by SIGTERM
23:48:35 web.1 | terminated by SIGTERM
由于某种原因,这似乎对我来说是个问题,因为Redis或Foreman似乎找不到成功执行所需的文件,但我不确定.
For some reason, it seems like a path issue to me because it seems like Redis or Foreman cannot find the files they need to use to successfully execute, but I'm not exactly sure.
在OSX上,我使用了gem install foreman
和Brew install Redis
.
On OSX I used gem install foreman
and Brew install Redis
.
在Ubuntu上,我使用了以下内容:
On Ubuntu I used the following:
Redis:
$ cd ~
$ wget http://download.redis.io/redis-stable.tar.gz
$ tar xvzf redis-stable.tar.gz
$ cd redis-stable
$ make
$ make test
领班:
$ gem install foreman
我在OSX上的PATH如下:
My PATH on OSX is as follows:
/Users/c/.rvm/gems/ruby-2.1.0/bin:/Users/c/.rvm/gems/ruby-2.1.0@global/bin:/Users/c/.rvm/rubies /ruby-2.1.0/bin:/Users/c/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin>
在Ubuntu上,我的PATH是:
On Ubuntu, my PATH is:
/usr/local/bin:/usr/lib/postgresql:/usr/lib/postgresql/9.3:/usr/lib/postgresql/9.3/lib:/usr/lib/postgresql/9.3/bin:/usr /share/doc:/usr/share/doc/postgresql-9.3:/usr/share/postgresql:/usr/share/postgresql/9.3:/usr/share/postgresql/9.3/man:$PATH
/usr/local/bin:/usr/lib/postgresql:/usr/lib/postgresql/9.3:/usr/lib/ postgresql/9.3/lib:/usr/lib/postgresql/9.3/bin:/usr/share/doc:/usr/share/doc/postgresql-9.3:/usr/share/postgresql:/usr/share/postgresql/9.3:/usr/share/postgresql/9.3/man:$PATH
Redis服务器似乎确实执行一次成功,然后失败,并显示以下消息:
Redis-server does seem to execute successfully once, and then it fails with the message:
[1457] 12 Jun 00:02:48.481 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[1457] 12 Jun 00:02:48.482 * Increased maximum number of open files to 10032 (it was originally set to 256).
[1457] 12 Jun 00:02:48.483 # Creating Server TCP listening socket *:6379: bind: Address already in use
尝试$ redis-server stop
返回:
[1504] 12 Jun 00:05:56.173 # Fatal error, can't open config file 'stop'
我需要帮助弄清楚如何使Foreman和Redis一起工作,以便可以在浏览器中以127.0.0.1的格式查看本地文件
I need help figuring out how to get Foreman and Redis working together so that I can view my local files in the browser at 127.0.0.1
编辑
Redis确实启动了,但是当我导航到localhost:6379时没有任何反应.我还尝试了寻找过程的建议.发现
Redis does start, but nothing happens when I navigate to localhost:6379. I also tried the suggestion of finding processes. It found
c 751 0.0 0.0 2432768 596 s005 R+ 2:03PM 0:00.00 grep redis
c 616 0.0 0.0 2469952 1652 s004 S+ 2:01PM 0:00.05 redis-server *:6379
尝试kill
该过程将导致
kill:用法:kill [-s sigspec | -n signum | -sigspec] pid |工作规格 ...或杀死-l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
推荐答案
尝试使用以下命令启动Redis服务器:
Try starting Redis server with the following command :
redis-server <path to your config file>
还要检查
ps aux | grep redis
,然后找到进程:
kill <process id>
重新启动Redis服务器.
Restart your redis server.
这篇关于工头立即终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!