Bluepill not work properly


(Abel Van) #1

I don’t think this is related to discourse itself, after I install discourse by hand, rather than docker, on ubuntu, it works well (in fact, my VPS is just 1GM RAM and SWAP 128M, it is not allowed to change it).

But today, I find it has some problem to start discourse, since when I try to run bulepill stop/start it gives me the folloing error:

/home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/system.rb:23:in `kill': no implicit conversion of false into Integer (TypeError)
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/system.rb:23:in `pid_alive?'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/controller.rb:89:in `block in cleanup_bluepill_directory'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/controller.rb:87:in `each'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/controller.rb:87:in `cleanup_bluepill_directory'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/lib/bluepill/controller.rb:15:in `initialize'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/bin/bluepill:77:in `new'
        from /home/discourse/.rvm/gems/ruby-2.2.2/gems/bluepill-0.1.1/bin/bluepill:77:in `<top (required)>'
        from /home/discourse/.rvm/gems/ruby-2.2.2/bin/bluepill:23:in `load'
        from /home/discourse/.rvm/gems/ruby-2.2.2/bin/bluepill:23:in `<main>'
        from /home/discourse/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
        from /home/discourse/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'

The error raise up still after I try to update/reintall bluepill and all gems.

Any one can help me?


(Sam Saffron) #2

Considering we have not been using bluepill for almost 2 years … I wonder … why are you not using our Docker based install? It is the only install supported here.


(Abel Van) #3

The VPS(bandwagon) does not support docker. It run in openvz.


(Sam Saffron) #4

Nothing we can do to help you here, you are running an unsupported setup.


(Abel Van) #5

Yeah, I know, but any suggestion for why the problem occurrs? it works properly, and the error happens like a gost.


(Sam Saffron) #6

Yes, don’t use bluepill, use runit or something else that is sane and not a buggy piece of software.


(Abel Van) #7

thanks, I will have a try.


#8

What about systemd services?

https://aur.archlinux.org/cgit/aur.git/tree/discourse-sidekiq.service?h=discourse
https://aur.archlinux.org/cgit/aur.git/tree/discourse-unicorn.service?h=discourse
https://aur.archlinux.org/cgit/aur.git/tree/discourse-update.service?h=discourse

I run that stuff about ~1 year now. Works fine.


(Robert) #9

I experienced this error:

/var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/system.rb:23:in `kill': no implicit conversion of false into Integer (TypeError)
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/system.rb:23:in `pid_alive?'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/controller.rb:89:in `block in cleanup_bluepill_directory'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/controller.rb:87:in `each'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/controller.rb:87:in `cleanup_bluepill_directory'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/controller.rb:15:in `initialize'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/bin/bluepill:77:in `new'
        from /var/lib/gems/2.1.0/gems/bluepill-0.1.1/bin/bluepill:77:in `<top (required)>'
        from /usr/local/bin/bluepill:23:in `load'
        from /usr/local/bin/bluepill:23:in `<main>'

I found something related on github:

Hence, I changed in the /var/lib/gems/2.1.0/gems/bluepill-0.1.1/lib/bluepill/controller.rb:

Before:

next if pid || System.pid_alive?(pid)

After:

 next if pid && System.pid_alive?(pid)

This fixed the error for me.


(Sam Saffron) #10

Bluepill is dead and has not been used or supported for multiple years now, if you want to go off the beaten path and do a custom install, use runit not bluepill