Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpush status doesn't get PID file from Rpush.config #224

Closed
nahaylo opened this issue Dec 5, 2015 · 5 comments
Closed

rpush status doesn't get PID file from Rpush.config #224

nahaylo opened this issue Dec 5, 2015 · 5 comments

Comments

@nahaylo
Copy link
Contributor

nahaylo commented Dec 5, 2015

I changed default path to PID file, e.g: config.pid_file = 'tmp/pids/rpush.pid'

It allows to start

rpush start
* Booting Rails 'development' environment... ✔

and stop

rpush stop
* Booting Rails 'development' environment... ✔
* Stopping Rpush (pid 27478)... ✔

But getting status of process fails

rpush status
* Rpush isn't running? /tmp/rpush.pid does not exist.
@nahaylo
Copy link
Contributor Author

nahaylo commented Dec 5, 2015

After some investigation I've found the reason.
It causes because start and stop load the rails environment, but status isn't.
Fix should be simple, I'm going to create a pull-request.

@huteri
Copy link

huteri commented Dec 10, 2015

Are you sure you got it right? because I got this error

/Users/huteri/.rvm/gems/ruby-2.1.2/bundler/gems/rpush-aee00e0e2a82/lib/rpush/daemon/rpc/client.rb:6:in `initialize': No such file or directory - connect(2) for "/tmp/rpush.31718.sock" (Errno::ENOENT)

when trying to rpush status -e production, and with rpush start -e production

@nahaylo
Copy link
Contributor Author

nahaylo commented Dec 10, 2015

@huteri
just checked it works for me

rpush status -e production
* Booting Rails 'production' environment... ✔
* Rpush isn't running? /tmp/pids/rpush.pid does not exist.

BTW: It seems that my pull-request is not green, need to fix test :)

@huteri
Copy link

huteri commented Dec 10, 2015

@nahaylo try to start the rpush first in production then execute rpush status -e production again. It works good on development though

@nahaylo
Copy link
Contributor Author

nahaylo commented Dec 10, 2015

@huteri ok, I've got what you mean.
The problem is that

rpush start -e production
* Booting Rails 'production' environment... ✔

didn't return correct status code. For some reason (in my case I simply don't have properly configured production environment, and I think the same for in your case), it didn't started the daemon and didn't reported that.
You can check this, simple start and than try to stop, you will receive the same error.
Or, run this

rpush start
* Booting Rails 'development' environment... ✔
# and then
ps auwx | grep rpush
vitaliy         44039   0,0  0,0  2423372    228 s002  R+    2:51     0:00.00 grep rpush
vitaliy         43977   0,0  0,7  2595356  59532   ??  S     2:51     0:00.18 rpush | 0 queued | 4 dispatchers 

and

rpush start -e production
* Booting Rails 'production' environment... ✔
# and then
ps auwx | grep rpush
vitaliy         44099   0,0  0,0  2432788    560 s002  R+    2:52     0:00.00 grep rpush

But this is out of scope of this issue. I'd create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants