Project

General

Profile

Bug #977

Cannot Create Web App

Added by bigfoot65 about 8 years ago. Updated almost 8 years ago.

Status:
New
Priority:
Medium
Assignee:
Category:
ubuntu
Target version:
-
Start date:
09/27/2012
Due date:
% Done:

0%


Description

Creating a new web app yields a "HTTP error 500" message.

History

#1 Updated by bigfoot65 about 8 years ago

  • Subject changed from Cannot Create Web App to Cannot Create Web App (Ubuntu)

#2 Updated by bigfoot65 about 8 years ago

  • Subject changed from Cannot Create Web App (Ubuntu) to Cannot Create Web App
  • Category changed from Custom Webapps to ubuntu

#3 Updated by bigfoot65 about 8 years ago

Found this in the apache log:

Errno::EACCES (Permission denied - /var/hda/web-apps/adminer):
  /usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir'
  /usr/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
  /usr/lib/ruby/1.8/fileutils.rb:217:in `mkpath'
  /usr/lib/ruby/1.8/fileutils.rb:215:in `reverse_each'
  /usr/lib/ruby/1.8/fileutils.rb:215:in `mkpath'
  /usr/lib/ruby/1.8/fileutils.rb:201:in `each'
  /usr/lib/ruby/1.8/fileutils.rb:201:in `mkpath'
  app/models/webapp.rb:58:in `before_create_hook'
  app/controllers/webapp_controller.rb:27:in `create'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

grep: /var/log/messages: No such file or directory

Your HDA services have been restarted.
Your HDA services have been restarted.

#4 Updated by bigfoot65 about 8 years ago

/var/hda/web-apps is owned by www-data:apache.

#5 Updated by bigfoot65 about 8 years ago

This is my HDA:

bigfoot@zeus:~$ ls -l /var/hda/web-apps/
total 40
drwxr-xr-x 5 www-data apache 4096 Aug  2 18:13 adito
drwxr-xr-x 4 www-data apache 4096 Aug  2 18:10 greyhole-log
-rw-r--r-- 1 root     root      0 Sep 24 20:01 htpasswd
drwxr-xr-x 4 www-data apache 4096 Aug  2 18:10 linfo
drwxrwxr-x 4 www-data users  4096 Sep 11 20:54 loganalyzer
drwxr-xr-x 4 www-data apache 4096 Aug  2 18:05 monit
drwxrwxr-x 3 www-data users  4096 Aug 19 09:09 munin
drwxrwxr-x 4 www-data users  4096 Aug 21 19:03 phpmyadmin
drwxr-xr-x 4 www-data apache 4096 Aug  2 20:06 upsmon
drwxrwxr-x 4 www-data users  4096 Sep 24 16:56 webmin
drwxr-xr-x 4 www-data apache 4096 Aug  2 18:14 znc

#6 Updated by Othey about 8 years ago

I am seeing the same in my logs

Errno::EACCES (Permission denied - /var/hda/web-apps/music):
  /usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir'
  /usr/lib/ruby/1.8/fileutils.rb:243:in `fu_mkdir'
  /usr/lib/ruby/1.8/fileutils.rb:217:in `mkpath'
  /usr/lib/ruby/1.8/fileutils.rb:215:in `reverse_each'
  /usr/lib/ruby/1.8/fileutils.rb:215:in `mkpath'
  /usr/lib/ruby/1.8/fileutils.rb:201:in `each'
  /usr/lib/ruby/1.8/fileutils.rb:201:in `mkpath'
  app/models/webapp.rb:58:in `before_create_hook'
  app/controllers/webapp_controller.rb:27:in `create'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /var/hda/platform/html/public/500.html (500 Internal Server Error)

#7 Updated by Othey about 8 years ago

This is my hda

adam@server:~$ ls -l /var/hda/web-apps/
total 48
drwxrwxr-x 4 www-data www-data 4096 Jul  7 00:50 couchpotato
drwxrwxr-x 4 www-data users    4096 Sep 27 22:13 gallery2
drwxrwxr-x 4 www-data users    4096 Jul 10 10:15 greyhole-log
-rw-r--r-- 1 root     root        0 Sep 25 10:31 htpasswd
drwxrwxr-x 4 www-data users    4096 Sep 27 20:08 invaders
drwxrwxr-x 4 www-data users    4096 Jul 10 22:46 monitorix
drwxrwxr-x 4 www-data users    4096 Jul  8 22:01 phpsysinfo
drwxrwxr-x 4 www-data users    4096 Sep 27 20:33 phpyahtzee
drwxrwxr-x 4 www-data www-data 4096 Jul  5 21:37 sabnzbd
drwxrwxr-x 4 www-data users    4096 Sep 27 20:33 scicalc
drwxrwxr-x 4 www-data www-data 4096 Jul  5 21:21 sickbeard
drwxrwxr-x 4 www-data users    4096 Sep 27 18:44 solitaire
drwxrwxr-x 4 www-data www-data 4096 Jul  5 21:51 webmin

#8 Updated by ksburgess almost 8 years ago

I am seeing very similar in my apache logs. Has a workaround for this been found, or just waiting on the bugfix?

#9 Updated by sachinwfs almost 8 years ago

There is a workaround posted in the forums by bigfoot65:

Change the permissions of the /var/hda/web-apps folder to 777:

sudo chmod 777 /var/hda/web-apps

Next create the web app.

The ownership of the new folder will be something like nobody:nogroup. Change it to your first admin user:

sudo chown -R firstadminuser:users /var/hda/web-apps/appname

Also available in: Atom