Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

"Add Server" adds server to list, but then genghis can't connect to it #35

Closed
matthurne opened this issue Sep 28, 2012 · 5 comments
Closed

Comments

@matthurne
Copy link

When I add a server via the "Add Server" button with an IP address or hostname (e.g. "pegasus" or "192.168.1.20"), the server is added to the list. However, the databases column in the list is blank, and the size column displays NaN undefined. If I refresh the page, the server is no longer on the list. If I tail the log while adding the server, I see the following error and trace:

localhost - - [28/Sep/2012:08:28:45 EDT] "POST /servers HTTP/1.1" 500 93
http://localhost:5678/ -> /servers
NameError - undefined local variable or method `name' for #<Genghis::Server:0x007f4c3403bda8>:
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/genghisapp-2.0.2/genghis.rb:502:in `add_server'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/genghisapp-2.0.2/genghis.rb:607:in `block in <class:Server>'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `block in compile!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `[]'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (3 levels) in route!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (2 levels) in route!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in `block in process_route'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `catch'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `process_route'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in `block in route!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `each'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `route!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in `dispatch!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `block in call!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `block in invoke'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `catch'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `block in call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in `synchronize'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `call'
    /home/matt/.rvm/gems/ruby-1.9.3-p194@genghis/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
    /home/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
    /home/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
    /home/matt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
@bobthecow
Copy link
Owner

Thanks for reporting this. I've fixed it in the v2.1.0 development branch, and I pushed a pre-release gem out. Give that one a shot?

gem install genghisapp --pre

@matthurne
Copy link
Author

Thanks, that fixed it.

@bobthecow
Copy link
Owner

Awesome.

@rtorcato
Copy link

this is the same error i get but i'm using php. latest 2.1.5 doesn't connect and save servers.

@bobthecow
Copy link
Owner

@rtorcato Can you open a new issue for that? It would help if you could add more details, as well. I just tested with v2.1.5 (php) and had no problem connecting and adding servers.

Thanks!

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

No branches or pull requests

3 participants