我在Azure服务器上安装了Ruby on Rails应用程序(Ubuntu 64位)。我分别安装了Nginx和Thin作为我们的Web服务器和应用程序服务器。今天我的瘦服务器崩溃,我的网站崩溃了。我检查了日志但找不到任何可疑的东西。
这是我的瘦日志中的一个片段:
Using rack adapter
SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
This poses a security threat. It is strongly recommended that you
provide a secret to prevent exploits that may be possible from crafted
cookies. This will not be supported in future versions of Rack, and
future versions will even invalidate your existing user cookies.
Called from: /home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.0/lib/thin/backends/base.rb:63:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/thin:23:in `load'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/thin:23:in `<main>'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/ruby_executable_hooks:15:in `eval'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/ruby_executable_hooks:15:in `<main>'
Error during failsafe response: Missing template index/getkey, application/getkey with {:locale=>[:en], :formats=>[:gif, "image/*"], :handlers=>[:erb, :builder]}. Searched in:
* "/home/webuser/apps/production/app/views"
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/path_set.rb:58:in `find'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/lookup_context.rb:109:in `find'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:34:in `determine_template'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/renderer/template_renderer.rb:10:in `render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:36:in `render_template'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:17:in `render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:110:in `_render_template'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/streaming.rb:225:in `_render_template'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:103:in `render_to_body'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:88:in `render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:16:in `render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/home/webuser/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/core_ext/benchmark.rb:5:in `ms'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:39:in `render'
/home/webuser/apps/production/app/controllers/index_controller.rb:97:in `getkey'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__2157135730694343981__process_action__1990300394974926863__callbacks'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:76:in `render_exception'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:61:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/connection.rb:81:in `block in pre_process'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/connection.rb:79:in `catch'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/connection.rb:79:in `pre_process'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/connection.rb:54:in `process'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/connection.rb:39:in `receive_data'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/thin:23:in `load'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/thin:23:in `<main>'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/ruby_executable_hooks:15:in `eval'
/home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/bin/ruby_executable_hooks:15:in `<main>'
>> Writing PID to tmp/pids/thin.3000.pid
>> Using rack adapter
SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
This poses a security threat. It is strongly recommended that you
provide a secret to prevent exploits that may be possible from crafted
cookies. This will not be supported in future versions of Rack, and
future versions will even invalidate your existing user cookies.
Called from: /home/webuser/.rvm/gems/ruby-1.9.3-p545@woi/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.
我的索引控制器:
require "openssl"
require 'digest/sha2'
require 'base64'
require 'net/http'
require 'uri'
require 'cgi'
class IndexController < ApplicationController
def index
if params['_escaped_fragment_'] == '/Home' or params['_escaped_fragment_'] == '/home'
redirect_to "#{root_url}", :status => :moved_permanently
elsif params['_escaped_fragment_'] == '/Tv-Listings'
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/TVGuideDetailed?call=TVGuideDetailed&apikey=8a1e808b55fde9455cb3d8857ed88389&context=applicationname=sourcebits;headendid=2645&programmeimagesize=Large&channelimagesize=Large&Imagesize=Large&channelgenre=all&dateselected=0&mode=getTVGuideInfo&pageno=1&responseformat=json&responselanguage=English&starthour=0&totalhrdata=24"))
render :layout => false
return false
elsif params['_escaped_fragment_'] == '/Movies' or params['_escaped_fragment_'] == '/movies'
fromdatetime = Time.now.year.to_s + "-" + Time.now.month.to_s + "-" + Time.now.day.to_s + "+12:16"
todatetime = Time.now.year.to_s + "-" + Time.now.month.to_s + "-" + (Time.now + 4.day).day.to_s + "+23:59"
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/AllMovies?call=AllMovies&apikey=dd45045f8c68db9f54e70c67048d32e8&pageno=1&context=applicationname=website;headendid=2645&fromdatetime=#{fromdatetime}&todatetime=#{todatetime}&productionstartyear=2004&productionendyear=2015&programmeimagesize=xxlarge&castname=&isfavMovies=false&mode=getAllMovies&noCache=1389683687038&responseformat=json&responselanguage=English"))
render :layout => false
return false
elsif params['_escaped_fragment_'] == '/Videos' or params['_escaped_fragment_'] == '/videos'
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/VideosByFilter?call=VideosByFilter&apikey=53adaf494dc89ef7196d73636eb2451b&pageno=1&context=headendid=2645;applicationname=website&filtertype=popular&channelname=&videogenre=&programmeImageSize=xxlarge&mode=getAllVideos&noCache=1389685706035&responseformat=json&responselanguage=English"))
render :layout => false
return false
elsif params['_escaped_fragment_'] == '/Channels' or params['_escaped_fragment_'] == '/channels'
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/FeaturedProgramme?call=FeaturedProgramme&apikey=06138bc5af6023646ede0e1f7c1eac75&programmeimagesize=xxlarge&channelimagesize=xxlarge&imagesize=xxlarge&applicationname=website&operatorid=0&context=headendid=2645;applicationname=website&mode=featuredProgramme&pageno=1&responseformat=json&responselanguage=English"))
@popular = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/HybridChannels?call=HybridChannels&apikey=fa83a11a198d5a7f0bf77a1987bcd006&responseformat=json&responselanguage=English&pageno=1&languageid=0&channelimagesize=small&context=headendid%3D0%3Bapplicationname%3Dwebsite&hybridgenre=Popular&mode=filterByHybridGenre"))
render :layout => false
return false
elsif params['_escaped_fragment_'] == '/Mobile-Apps' or params['_escaped_fragment_'] == '/apps'
@testimonials = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/AppTestimonials?call=AppTestimonials&apikey=1fc214004c9481e4c8073e85323bfd4b&pageno=1&context=custid=1;msisdn=222;headendid=2645;applicationname=website&appid=1&mode=getAppTestimonials&responseformat=json&responselanguage=English"))
render :layout => false
return false
elsif params['_escaped_fragment_'] =~ /\/actor(.*)/
actorname = CGI::escape(params['_escaped_fragment_'].split("/").last.gsub(/CeNc/,"$#*!").gsub(/DqO/, '"').gsub(/PLus/, '+').gsub(/ObR/, '[').gsub(/CbR/, ']').gsub(/AtR/, '@').gsub(/EmPe/, '&').gsub(/HaSh/, '#').gsub(/StAr/, '*').gsub("-", " ").gsub("~", "-").gsub("$", "/").gsub(/DoLr/, "$").gsub("*", "?").gsub("PeRc", "%"))
result = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/CastIDByName?call=CastIDByName&apikey=bdf3f54642b2d80f8e87b6474eaaad11ece8058a&responseformat=json&responselanguage=English&context=custid=1;msisdn=222;headendid=2645;applicationname=website&castname=#{actorname}&mode=getActorId&pageno=1"))
result = result["getcastid"]["castidbyname"]["castid"]
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/CastDetails?apikey=375f9609c9962cce0ad6ccaaabd80362ecd2b07f&responseformat=json&responselanguage=english&context=custid=1;msisdn=222;headendid=2645;applicationname=website&castid=#{result}"))
@similaractors = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/SimilarCasts?call=SimilarCasts&apikey=731df0fc93417f72fcb56f09cd754f9382ae6373&context=custid=1;msisdn=222;headendid=2645;applicationname=website&userid=1&responseformat=json&responselanguage=English&castid=#{result}&mode=SimilarActor&pageno=1"))
@acotsmovie = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/CastProgrammesByGenre?call=CastProgrammesByGenre&apikey=0ad54e429b2b6238550f24701541130b978e4640&context=custid=1;msisdn=222;headendid=2645;applicationname=website&genre=film&imagesize=medium&pageno=1&userid=1&castid=#{result}&mode=MoviesByActor&responseformat=json&responselanguage=English"))
render :layout => false
return false
elsif params['_escaped_fragment_'] =~ /\/program(.*)/
programename = CGI::escape(params['_escaped_fragment_'].split("/").last.gsub(/CeNc/,"$#*!").gsub(/DqO/, '"').gsub(/PLus/, '+').gsub(/ObR/, '[').gsub(/CbR/, ']').gsub(/AtR/, '@').gsub(/EmPe/, '&').gsub(/HaSh/, '#').gsub(/StAr/, '*').gsub("-", " ").gsub("~", "-").gsub("$", "/").gsub(/DoLr/, "$").gsub("*", "?").gsub("PeRc", "%"))
result = JSON.parse(Net::HTTP.get('services.whatsonindia.com',"/UserStar/UserStarHost.svc/ProgrammeIDByName?call=SingleChannelIDByName&apikey=a4d2f0d23dcc84ce983ff9157f8b7f88&responseformat=json&responselanguage=English&context=custid=1;msisdn=222;headendid=2645;applicationname=website&programmename=#{programename}&mode=getProgrammeid&pageno=1&userid=-1"))
if result["getprogrammeidbyname"]
result = result["getprogrammeidbyname"]["programmeidbyname"]["programmeid"]
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/FullProgrammeDetail?call=FullProgrammeDetail&apikey=74071a673307ca7459bcf75fbd024e09&responseformat=json&responselanguage=English&context=custid=1;msisdn=222;headendid=2645;applicationname=website&pageno=1&programmeimagesize=large&channelimagesize=large&imagesize=large&programmeid=#{result}&starttime=&mode=fullProgrammeDetail&userid=-1"))
@similarprogrames = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/SimilarProgramme?call=SimilarProgramme&apikey=950a4152c2b4aa3ad78bdd6b366cc179&responseformat=json&responselanguage=English&pageno=1&context=custid=1;msisdn=222;headendid=2645;applicationname=website&programmeimagesize=large&channelimagesize=large&imagesize=large&programmeid=#{result}&mode=similarProgrammes&userid=-1"))
@castandcrew = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/ProgramCastAndCrew?call=ProgramCastAndCrew&apikey=c3c59e5f8b3e9753913f4d435b53c308&responseformat=json&responselanguage=English&context=custid=1;msisdn=222;headendid=2645;applicationname=website&pageno=1&programmeid=#{result}&mode=castNcrew&userid=-1"))
@webvideos = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/WebVideos?call=WebVideos&apikey=9461cce28ebe3e76fb4b931c35a169b0&responseformat=json&responselanguage=English&pageno=1&context=custid=1;msisdn=222;headendid=2645;applicationname=website&imagesize=large&programmeid=#{result}&mode=webVideos&userid=-1"))
@nextschedule = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/MoreProgrammeSchedule?call=MoreProgrammeSchedule&apikey=758874998f5bd0c393da094e1967a72b&responseformat=json&responselanguage=English&pageno=1&context=custid=1;msisdn=222;headendid=2645;applicationname=website&channelimagesize=large&programmeid=#{result}&mode=nextSchedule&userid=-1"))
@programename = CGI::unescape(programename)
else
@data = {}
@programename = CGI::unescape(programename)
end
render :layout => false
return false
elsif params['_escaped_fragment_'] =~ /\/channel(.*)/
channelname = CGI::escape(params['_escaped_fragment_'].split("/").last.gsub(/CeNc/,"$#*!").gsub(/DqO/, '"').gsub(/PLus/, '+').gsub(/ObR/, '[').gsub(/CbR/, ']').gsub(/AtR/, '@').gsub(/EmPe/, '&').gsub(/HaSh/, '#').gsub(/StAr/, '*').gsub("-", " ").gsub("~", "-").gsub("$", "/").gsub(/DoLr/, "$").gsub("*", "?").gsub("PeRc", "%"))
result = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/SingleChannelIDByName?call=SingleChannelIDByName&apikey=6a61d423d02a1c56250dc23ae7ff12f3&responseformat=json&responselanguage=English&context=custid=1;msisdn=222;headendid=2645;applicationname=website&channelname=#{channelname}&mode=getChannelid&pageno=1"))
if result["getsinglechannelidbyname"]
result = result["getsinglechannelidbyname"]["singlechannelidbyname"]["channelid"]
@data = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/SingleChannelDetail?call=SingleChannelDetail&apikey=352fe25daf686bdb4edca223c921acea&responseformat=json&responselanguage=English&pageno=1&channelimagesize=large&channelid=#{result}&context=custid=1;msisdn=222;headendid=2645;applicationname=website;ipaddress=127.0.0.1;useragent=Mozilla/5.0+(X11,+Linux+i686)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/28.0.1500.95+Safari/537.36&mode=channelDetails"))
@similarchannels = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/SimilarChannels?call=SimilarChannels&apikey=839ab46820b524afda05122893c2fe8e&responseformat=json&responselanguage=English&pageno=1&context=custid=1;msisdn=222;headendid=2645;applicationname=website&channelimagesize=large&imagesize=large&channelid=#{result}&mode=similarChannels"))
@toprated = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/TopProgrammeForChannel?call=TopProgrammeForChannel&apikey=f90f2aca5c640289d0a29417bcb63a37&responseformat=json&responselanguage=English&context=custid%3D1%3Bmsisdn%3D222%3Bheadendid%3D2645%3Bapplicationname%3Dwebsite&pageno=1&programmeimagesize=large&channelimagesize=large&imagesize=large&channelid=#{result}&languagename=English&hybridgenre=All&mode=channelPopularPrograms"))
@browse = JSON.parse(Net::HTTP.get('services.whatsonindia.com', "/UserStar/UserStarHost.svc/ChannelBrowsedProgrammes?call=ChannelBrowsedProgrammes&apikey=98d6f58ab0dafbb86b083a001561bb34&context=custid%3D1%3Bmsisdn%3D222%3Bheadendid%3D2645%3Bapplicationname%3Dwebsite&headendid=2645&userid=196878&channelid=#{result}&imagesize=large&pageno=1&hybridgenre=All&mode=getBrowseForChannel&responseformat=json&responselanguage=English"))
@channelname = CGI::unescape(channelname)
else
@data = {}
@channelname = CGI::unescape(channelname)
end
render :layout => false
return false
elsif params['_escaped_fragment_'] == "/Search/"
render :layout => false
return false
end
unless session[:pki]
@alg = "AES-256-CBC"
aes = OpenSSL::Cipher::Cipher.new(@alg)
aes.encrypt
key = aes.random_key
@pki = Base64.encode64(key).gsub(/\n/, '')
session[:pki] = @pki
session[:key] = key
end
end
def getkey
render :layout => false
end
end
崩溃的地方没有显示任何错误。我不知道为什么会这样,为什么会在上线一周后发生?
答案 0 :(得分:0)
您是否在config / initializers / secret_token.rb中设置了密钥?如下所示
*
#{YOURAPPLIACTION_NAME}::Application.config.secret_token = #{YOUR LONG SECRET TOKEN}
*
答案 1 :(得分:0)
我们每隔几天就崩溃一次,日志中没有任何提示。事实证明它是糟糕的内存芯片,在更换后它们一切顺利。
答案 2 :(得分:0)
找到上述情况的答案。希望将来对其他人有所帮助。
我有一个配置文件,它提供了错误,当我删除配置文件时,网站开始在V.M上正常运行。
另外,建议正确检查ruby应用程序的配置文件。
谢谢