Welcome Guest Login Register Member List
ExpressionEngine Forums
Advanced Search
Username: Password:
Remember Me? forgot password?
You are here: Forum Home  >  Usage  >  Troubleshooting  >  Thread
   
1 of 2
1
2
Next
Stats doesn’t work, everything else does
 
bjones
Posted: 10 June 2009 01:19 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

Love the program, just digging into it. I installed it to a subdomain on Dreamhost, and it works great, except for Stats. I get a 404 error when I try to view them.

I’m using version 1.7 on Dreamhost, as I said. I really know very, very little about how this all works, so it’s likely something I simply overlooked or something I inadvertently broke.

Thanks in advance for any help anyone can give me.

Here’s the log:

Processing ApplicationController#index (for 75.28.95.133 at 2009-06-09 18:11:04) [GET]
  
Session ID: 5affaa1f6bdf64576a2287922f0a101c


ActionController
::RoutingError (No route matches "/failed_auth.html" with {:method=>:get}):
    /
vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:66:in `recognize_path'
    /vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:386:in 
`recognize'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:182:in `handle_request'
    
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:123:in 
`dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `synchronize'
    
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:132:in 
`dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in `dispatch'
    
/dh/passenger/lib/phusion_passenger/railz/request_handler.rb:38:in `process_request'
    /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:197:in 
`main_loop'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'
    
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/utils.rb:176:in 
`safe_fork'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in 
`main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:149:in `start'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:192:in 
`start'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:260:in `spawn_rails_application'
    
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:121:in `lookup_or_add'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:254:in 
`spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:75:in `synchronize'
    
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:74:in `synchronize'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:253:in 
`spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:148:in `spawn_application'
    
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:285:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in 
`__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    /dh/passenger/bin/passenger-spawn-server:50

Rendering /home/...redacted.../tracks/public/404.html (404 Not Found) 
Profile
 
Reinier Balt
Posted: 10 June 2009 07:19 AM   [ Ignore ]   [ # 1 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

It’s a longshot, but could you try to add the following line to your /config/routes.rb file at line 69 (before the map.resources :recurring_todos line)

map.stats ‘stats’, :controller => ‘stats’, :action => ‘index’

Profile
 
bjones
Posted: 10 June 2009 02:41 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10
Reinier Balt - 10 June 2009 07:19 AM

It’s a longshot, but could you try to add the following line to your /config/routes.rb file at line 69 (before the map.resources :recurring_todos line)

map.stats ‘stats’, :controller => ‘stats’, :action => ‘index’

Thanks for the suggestion. Unfortunately, it appears to be unresolved. Log message is the same.

I also noticed that the XML export option isn’t working either. I don’t know how they’d be related, but in the interests of full information for anyone trying to help, I’ll throw it out there just in case. Everything else that I’ve tried works perfectly, and I think I’ve tried at least all the basic functions.

Profile
 
Reinier Balt
Posted: 10 June 2009 02:46 PM   [ Ignore ]   [ # 3 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

I assume you restarted Tracks.

Is there more in the log above the message you copied which belongs to the getting of stats?

Profile
 
bjones
Posted: 10 June 2009 02:59 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10
Reinier Balt - 10 June 2009 02:46 PM

I assume you restarted Tracks.

Is there more in the log above the message you copied which belongs to the getting of stats?

How would I go about restarting it? I logged out and logged back in, and cleared the cache, but I’m guessing there’s more to it than that. It’s hosted on Dreamhost.

Profile
 
bjones
Posted: 10 June 2009 03:41 PM   [ Ignore ]   [ # 5 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

Actually I’m just going to go ahead and try to reinstall. I discovered some other things that I overlooked during the first installation. Frankly, I don’t know how in the world the thing is running in the first place—I never updated the config/database or /environment files, and it wasn’t using the mysql database I set up for it (it’s blank, no tables). But all my todos were saving, I accessed them from multiple computers, multiple internet connections and my iPhone.

I followed the instructions from the wiki (I thought I did, anyway…must have missed something). I really like this program, save a few improvements that I’ve seen mentioned elsewhere in the forums, I think it’s exactly what I need—if I can get it working. It does what it needs to do, and since I don’t know the programming language (yet, anyway), I’m not tempted to fiddle with it.

It would still be useful for me to know how to restart it (as well as any other basic commands I’ll likely need to know), so if anyone wants to walk me through those, I’d very much appreciate it. Thanks again.

Profile
 
bjones
Posted: 10 June 2009 04:51 PM   [ Ignore ]   [ # 6 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

Ok, reinstalled, and now it’s actually using the mysql database, so that’s good.

I tried stats, didn’t work. Tried modifying the suggested file, didn’t work. The error and the log file are still the same.

I discovered this blog post (http://alexbrie.net/1960/dreamhost-and-mod_rails-for-your-tiny-rails-application/) that says how to restart (it says to touch tmp/restart.txt from ssh), and tried that, but no dice.

Profile
 
bjones
Posted: 10 June 2009 05:07 PM   [ Ignore ]   [ # 7 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

More clues:

Running it at MY.TRACKS.DOMAIN, stats doesn’t work.

But if I run the server from ssh (script/server -e production), and then go to MY.TRACKS.DOMAIN:3000, stats DOES work.

Thoughts?

Profile
 
Reinier Balt
Posted: 11 June 2009 02:23 PM   [ Ignore ]   [ # 8 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

If everything works from :3000 then the issue has something to do with the setup of Tracks on Dreamhost. Are you running from a subdir, i.e. my.tracks.domain/tracks or from a subdomain, i.e. tracks.my.tracks.domain

Since you are useing passenger on dreamhost, could you delete (rename) the .htaccess file in /public

And could you copy-and-past some of the log above the entry you already posted?

Profile
 
bjones
Posted: 11 June 2009 03:57 PM   [ Ignore ]   [ # 9 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10
Reinier Balt - 11 June 2009 02:23 PM

If everything works from :3000 then the issue has something to do with the setup of Tracks on Dreamhost. Are you running from a subdir, i.e. my.tracks.domain/tracks or from a subdomain, i.e. tracks.my.tracks.domain

Since you are useing passenger on dreamhost, could you delete (rename) the .htaccess file in /public

And could you copy-and-past some of the log above the entry you already posted?

It’s running from a subdomain: I visit tracks.my.tracks.domain to access it. The folder containing everything (the app and config folders, etc.) is tracks.my.tracks.domain/tracks . When setting up the subdomain, dreamhost asks for a “Web directory”, which the wiki entry (http://www.getontracks.org/wiki/Dreamhost/) said to set to my.domain.name/tracks/public, which I did.

I have access to the .htaccess file in /public, renaming it didn’t help.

Here’s a longer log: I logged in, clicked the context menu, then clicked stats.

Processing LoginController#login (for 70.130.190.74 at 2009-06-11 08:47:37) [POST]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6
  Parameters
: {"user_login"=>"bjones", "action"=>"login", 
"authenticity_token"=>"a9ada249a0bffab199cd0dc0d36fe31845944723", "controller"=>"login", "user_password"=>"[FILTERED]", "user_noexpiry"=>"on", "login"=>"Sign In ยป"}
Cookie set
: tracks_login=bjones; path=/; expires=Fri, 11 Jun 2010 15:47:37 GMT
Cookie set
: auth_token=c79af17fcc6cf5ecd97fdfb5eb59896d313999f8; path=/; expires=Thu, 25 Jun 2009 15:47:37 GMT
Redirected to http
://gtd.bjones.net/
Completed in 185ms (DB: 270) | 302 Found [http://gtd.bjones.net/login]


Processing TodosController#index (for 70.130.190.74 at 2009-06-11 08:47:37) [GET]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6
Rendering template within layouts
/standard
Rendering todos
/index
Completed in 417ms 
(View: 173, DB: 293) | 200 OK [http://gtd.bjones.net/]


Processing UnobtrusiveJavascriptController#generate (for 70.130.190.74 at 2009-06-11 08:47:38) [GET]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6
  Parameters
: {"page_path"=>["index.js"]}
Completed in 1ms 
(View: 0, DB: 380) | 200 OK [http://gtd.bjones.net/behaviours/index.js]


Processing ContextsController#index (for 70.130.190.74 at 2009-06-11 08:47:43) [GET]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6
Rendering template within layouts
/standard
Rendering contexts
/index
Completed in 29ms 
(View: 17, DB: 89) | 200 OK [http://gtd.bjones.net/contexts]


Processing UnobtrusiveJavascriptController#generate (for 70.130.190.74 at 2009-06-11 08:47:44) [GET]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6
  Parameters
: {"page_path"=>["contexts.js"]}
Completed in 1ms 
(View: 0, DB: 135) | 200 OK [http://gtd.bjones.net/behaviours/contexts.js]


Processing ApplicationController#index (for 70.130.190.74 at 2009-06-11 08:47:47) [GET]
  
Session ID: 48147bfa1fccbbd25165d031970a8ab6


ActionController
::RoutingError (No route matches "/failed_auth.html" with {:method=>:get}):
    /
vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:66:in `recognize_path'
    /vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:386:in 
`recognize'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:182:in `handle_request'
    
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:123:in 
`dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `synchronize'
    
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:122:in `dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:132:in 
`dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:39:in `dispatch'
    
/dh/passenger/lib/phusion_passenger/railz/request_handler.rb:38:in `process_request'
    /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:197:in 
`main_loop'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:340:in `start_request_handler'
    
/dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:298:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/utils.rb:176:in 
`safe_fork'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:296:in `handle_spawn_application'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in 
`main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:149:in `start'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:192:in 
`start'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:260:in `spawn_rails_application'
    
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:121:in `lookup_or_add'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:254:in 
`spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:75:in `synchronize'
    
/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:74:in `synchronize'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:253:in 
`spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:148:in `spawn_application'
    
/dh/passenger/lib/phusion_passenger/spawn_manager.rb:285:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in 
`__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:332:in `main_loop'
    
/dh/passenger/lib/phusion_passenger/abstract_server.rb:182:in `start_synchronously'
    /dh/passenger/bin/passenger-spawn-server:50

Rendering /home/bjones26/gtd.bjones.net/tracks/public/404.html (404 Not Found) 

Thanks again for all your help.

Profile
 
Reinier Balt
Posted: 11 June 2009 06:38 PM   [ Ignore ]   [ # 10 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

I’m out of options. I suspect that the routing is not ok. But the change you made did not work.

Do you have access to the apache logs? Is there something in the error_log ?

Profile
 
bjones
Posted: 11 June 2009 06:55 PM   [ Ignore ]   [ # 11 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

The apache log file within the tracks installation doesn’t say anything, but I have a separate log folder, which has an error log. It says:

[Thu Jun 11 08:43:57 2009] [error] [client 75.28.95.133] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/users
[Thu Jun 11 08:43:57 2009] [error] [client 75.28.95.133] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/users
[Thu Jun 11 08:43:59 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public
[Thu Jun 11 08:43:59 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public
[Thu Jun 11 08:44:12 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/
[Thu Jun 11 08:44:12 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/
[Thu Jun 11 08:44:14 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/
[Thu Jun 11 08:44:14 2009] [error] [client 70.130.190.74] File does not exist: /home/bjones26/gtd.bjones.net/tracks/public, referer: http://gtd.bjones.net/ 

I don’t suspect this helps a whole lot. I’ll fiddle with it some more, and if I stumble across the answer, I’ll post the resolution.

Once again, thank you for taking the time to look into this.

Profile
 
Reinier Balt
Posted: 11 June 2009 07:04 PM   [ Ignore ]   [ # 12 ]  
Sr. Member
RankRankRankRank
Total Posts:  580
Joined  2006-10-05

hmm, this could be a permission problem. The file does not exist error should not happen. Is the path correct?

Furthermore, could you check that all files are chmod 755

Also you could try to disable fastcgi support so that only passenger is enabled. Perhaps the both are conflicting?

Profile
 
bjones
Posted: 11 June 2009 11:58 PM   [ Ignore ]   [ # 13 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10
Reinier Balt - 11 June 2009 07:04 PM

hmm, this could be a permission problem. The file does not exist error should not happen. Is the path correct?

Furthermore, could you check that all files are chmod 755

Also you could try to disable fastcgi support so that only passenger is enabled. Perhaps the both are conflicting?

None of those helped. Path is correct, everything is 755 and I tried disabling fastcgi support.

Profile
 
bjones
Posted: 12 June 2009 07:19 AM   [ Ignore ]   [ # 14 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

I guess one of the main questions, coming at this from a non-programmer point of view, is why is the stats page different?

I mean, you click any of the other menu items and you get my.tracks.domain/contexts, /projects, /tickler or what have you. But stats is the only one that returns a 404. So how is that page generated, and what makes it different than all of the others? Is that a helpful trail to follow at all?

Profile
 
bjones
Posted: 12 June 2009 10:04 PM   [ Ignore ]   [ # 15 ]  
Newbie
Rank
Total Posts:  12
Joined  2009-06-10

Ok, I put a support request in with Dreamhost and they got back to me:

The problem you’re running into here is related to our site statistics
page we keep and make available for all domains. You usually access this
by browsing to /stats on the domain. This is causing a routing error with
your rails application.

failed_auth.html is the file it attempts to load when you fail the
authentication for the /stats page. Unfortunately, our system isn’t set
up to allow you ignore this by default. You might be able to set up some
kind of custom htaccess rules to get around this, but we can’t support
those. Sorry about that! You might try seeing if you can map the /stats
action or controller to a different route so you can access it.

So, it seems it’s not a permissions thing. The solution that comes to mind is to make the Tracks stats output to /statistics or whatever, but I have no idea how difficult that would be to accomplish. I know nothing about the custom .htaccess rules the tech suggests. Perhaps someone could tell me how to do either of those, or maybe there’s a better solution?

Once we figure this out, I (or someone) should update the Dreamhost entry on the wiki.

Profile
 
   
1 of 2
1
2
Next
 
‹‹ NoMethodError in Recurring_todos#index      Printing tasks ››

Powered By ExpressionEngine
Template Design By Sonnenvogel.com
Select a theme:

ExpressionEngine Discussion Forum - Version 2.1.2 (20091002)
Script Executed in 0.1630 seconds

Atom Feed
RSS 2.0