# Switchtower problem: Application error and no logs

**URL:** <https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779>\
**Category:** Rails\
**Created:** [November 19, 2005, 7:57pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779 "2005-11-19T19:57:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 7:57pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/1 "2005-11-19T19:57:21Z")

</div>

I’ve just tried to deploy my rails application with switchtower. It  
appears to have been transferred correctly, but I can’t get it to  
work. When I try to open a page, it takes forever, before  
“Application error - Rails application failed to start properly”  
shows up (even in development mode). No log files show up, so I  
cannot find out what’s wrong.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 8:32pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/2 "2005-11-19T20:32:36Z")

</div>

On Nov 19, 2005, at 11:56 AM, Jeroen Heijmans wrote:

> I’ve just tried to deploy my rails application with switchtower. It  
> appears to have been transferred correctly, but I can’t get it to  
> work. When I try to open a page, it takes forever, before  
> “Application error - Rails application failed to start properly”  
> shows up (even in development mode). No log files show up, so I  
> cannot find out what’s wrong.

A few things that commonly bite me in production:

- Are the permissions on the log directory (and log files, if  
applicable) such that they can be written to by the appropriate user?

- If using apache, is your .htaccess file configured correctly for  
production?

- Does anything show up in the apache access/error logs?

- Jamis

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 8:45pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/3 "2005-11-19T20:45:55Z")

</div>

On 19-nov-2005, at 20:30, Jamis B. wrote:

> A few things that commonly bite me in production:
> 
> - Are the permissions on the log directory (and log files, if  
> applicable) such that they can be written to by the appropriate user?

Yes, they are. Also, if I read it correctly, Switchtower should set  
these permissions.

> - If using apache, is your .htaccess file configured correctly for  
> production?

I’m using the same .htaccess file that works for my non-Switchtower-  
deployed application, which works fine. It is really just the  
default .htaccess file, but with FastCGI.

> - Does anything show up in the apache access/error logs?

Yes, the requests show up in the log, but no errors are listed.

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 8:58pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/4 "2005-11-19T20:58:56Z")

</div>

On Nov 19, 2005, at 12:43 PM, Jeroen Heijmans wrote:

> On 19-nov-2005, at 20:30, Jamis B. wrote:
> 
> > A few things that commonly bite me in production:
> > 
> > - Are the permissions on the log directory (and log files, if  
> > applicable) such that they can be written to by the appropriate user?
> 
> Yes, they are. Also, if I read it correctly, Switchtower should set  
> these permissions.

It should, yes. But if you’ve tried to run something by hand (like a  
migration) before your app ever ran, the log files will be created  
with you as the owner, and may not be writable by the web user.  
Anyway, you’ve said the permissions are good, so this isn’t the problem.

Are there any files in the log directory?

> Yes, the requests show up in the log, but no errors are listed.  
> Ok. Now for the obvious questions then, just to get them out of the way:

- You’ve verified that the fastcgi processes are indeed running?
- You’ve tried restarting apache?
- You’ve tried killing the fastcgi listeners?
- Do you have any other rails/fastcgi applications on that machine?

Sorry I can’t give more on-target advice. Hard to know what the issue  
is without actually sitting down at the machine.

- Jamis

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 9:07pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/5 "2005-11-19T21:07:29Z")

</div>

On 19-nov-2005, at 20:57, Jamis B. wrote:

> It should, yes. But if you’ve tried to run something by hand (like  
> a migration) before your app ever ran, the log files will be  
> created with you as the owner, and may not be writable by the web  
> user. Anyway, you’ve said the permissions are good, so this isn’t  
> the problem.
> 
> Are there any files in the log directory?

No, there aren’t any.

> - You’ve verified that the fastcgi processes are indeed running?
> - You’ve tried restarting apache?
> - You’ve tried killing the fastcgi listeners?
> - Do you have any other rails/fastcgi applications on that machine?
> 
> Sorry I can’t give more on-target advice. Hard to know what the  
> issue is without actually sitting down at the machine.

No problem, I appreciate the help. I cannot restart apache, as I am  
not allowed to on my webhost’s machine. I was able to kill the  
fastcgi/ruby processes, and I killed them, but that didn’t help.

I’m running my current (non-Switchtower-deployed) application on the  
same server, and there are possibly other users doing the same  
(although I can’t tell).

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 19, 2005, 9:07pm UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/6 "2005-11-19T21:07:29Z")

</div>

Ever try running dispatch.fcgi directly?

---

<div class="post-metadata">

**Author:** ![rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rails](https://www.ruby-forum.com/u/rails)\
**Post date:** [November 20, 2005, 11:43am UTC](https://www.ruby-forum.com/t/switchtower-problem-application-error-and-no-logs/48779/7 "2005-11-20T11:43:15Z")

</div>

No, but I did now, and I got some useful information in the log. Thanks!
