我正在AWS Ubuntu实例上运行Rails服务器。我正在尝试从Windows桌面上的浏览器访问服务器。直到昨天,这一直工作得很好。从昨天开始,我开始在浏览器上显示空白页面,并显示以下消息:
This site can’t be reached The webpage at http://10.110.104.76:3000/ might be temporarily down or it may have moved permanently to a new web address.
ERR_CONNECTION_ABORTED
这是我启动Rails服务器时看到的:
rails s
=> Booting Puma
=> Rails 5.0.7.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
我完全感到困惑-为什么这几个月来一切正常,从昨天开始突然停止工作?请帮忙!
我什至尝试跑步
sudo ufw allow 3000
允许端口访问端口3000但没有运气!
使用IP启动rails时,出现以下错误:
rails s -b 10-110-104-76
=> Booting Puma
=> Rails 5.0.7.1 application starting in development on http://10-110-104-76:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://10-110-104-76:3000
Exiting
/home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:272:in `initialize': getaddrinfo: Temporary failure in name resolution (SocketError)
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:272:in `new'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:272:in `add_tcp_listener'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:105:in `block in parse'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:88:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/binder.rb:88:in `parse'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/runner.rb:151:in `load_and_bind'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/single.rb:96:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/puma/launcher.rb:184:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/puma-3.12.0/lib/rack/handler/puma.rb:70:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/rack-2.0.6/lib/rack/server.rb:297:in `start'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands/server.rb:104:in `start'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/railties-5.0.7.1/lib/rails/commands.rb:18:in `<top (required)>'
from /home/ubuntu/workspace/rails/ActiveJob-Report-Generation/cfps_app/bin/rails:9:in `require'
from /home/ubuntu/workspace/rails/ActiveJob-Report-Generation/cfps_app/bin/rails:9:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.4.4/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
from /home/ubuntu/workspace/rails/ActiveJob-Report-Generation/cfps_app/bin/spring:15:in `require'
from /home/ubuntu/workspace/rails/ActiveJob-Report-Generation/cfps_app/bin/spring:15:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'