Redmine 500 error
Added by Konstantin Okorochkov over 10 years ago
Hi, I already install redmine by this manual:
http://www.redmine.org/projects/redmine/wiki/install_Redmine_25x_on_Centos_65_complete
but when i go "http://myserverip" i get this error:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.
Maybe anyone knows where the problem is?
THX a lot!
Replies (15)
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
Hi Konstantin,
Can you please attach the last error in the log/production.log please?
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
Connecting to database specified by database.yml
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
Started GET "/" for 192.168.0.4 at 2014-07-14 15:57:18 +0400
Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 3.7ms
ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine_db.settings' doesn't exist: SHOW FULL FIELDS FROM `settings`):
app/models/setting.rb:226:in `check_cache'
app/controllers/application_controller.rb:97:in `user_setup'
Started GET "/" for 192.168.0.4 at 2014-07-14 15:57:41 +0400
Processing by WelcomeController#index as HTML
Completed 500 Internal Server Error in 1.5ms
ActiveRecord::StatementInvalid (Mysql2::Error: Table 'redmine_db.settings' doesn't exist: SHOW FULL FIELDS FROM `settings`):
app/models/setting.rb:226:in `check_cache'
app/controllers/application_controller.rb:97:in `user_setup'
and so on, many times.
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
It seems you didn't run the migration of the database.
To do so, cd to your Redmine installation path and run:
RAILS_ENV=production bundle exec rake db:migrate
After that, you can load defaults:
RAILS_ENV=production bundle exec rake redmine:load_default_data
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: Can't create/write to file '/tmp/#sql_1de5_0.MYI' (Errcode: 13): SHOW FULL FIELDS FROM `schema_migrations`
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activesupport-3.2.17/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/mysql2_adapter.rb:213:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:259:in `execute_and_free'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:426:in `columns'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/schema_cache.rb:16:in `yield'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/schema_cache.rb:16:in `default'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/schema_cache.rb:16:in `block in initialize'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:101:in `yield'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:101:in `default'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:101:in `column_for'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:430:in `visit_Arel_Attributes_Attribute'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/visitor.rb:19:in `visit'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:134:in `block in visit_Arel_Nodes_SelectCore'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:134:in `map'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:134:in `visit_Arel_Nodes_SelectCore'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/mysql.rb:41:in `visit_Arel_Nodes_SelectCore'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:121:in `block in visit_Arel_Nodes_SelectStatement'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:121:in `map'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:121:in `visit_Arel_Nodes_SelectStatement'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/mysql.rb:36:in `visit_Arel_Nodes_SelectStatement'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/visitor.rb:19:in `visit'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/visitor.rb:5:in `accept'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/to_sql.rb:19:in `accept'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/arel-3.0.3/lib/arel/visitors/bind_visitor.rb:11:in `accept'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:587:in `get_all_versions'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:745:in `migrated'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:668:in `current_version'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:685:in `block in migrate'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:685:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:685:in `detect'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:685:in `migrate'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:570:in `up'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/migration.rb:551:in `migrate'
/usr/local/rvm/gems/ruby-1.9.3-p547/gems/activerecord-3.2.17/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
Try:
chmod 775 tmp
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
Martin Denizet wrote:
Try:
[...]
Sorry, I misread that.
That's not the solution.
Would you hard drive be full?
Test with:
df -h
Otherwise your MySQL could have a permission problem.
What's the output of:
ll /tmp
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
Didnt help, is this /tmp folder? or something else?
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
[root@crytek redmine]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_crytek-lv_root
50G 5.8G 41G 13% /
tmpfs 1.8G 228K 1.8G 1% /dev/shm
/dev/vda1 485M 67M 393M 15% /boot
/dev/mapper/vg_crytek-lv_home
46G 180M 43G 1% /home
[root@crytek redmine]# ll /tmp
total 60
drwxr-xr-x 2 root root 4096 Jul 14 14:48 keyring-cvXxgf
drwxr-xr-x 2 root root 4096 Jul 14 14:48 orbit-gdm
drwxr-xr-x 2 root root 4096 Jan 1 1970 orbit-root
drwxr-xr-x 2 root root 4096 Jul 15 10:13 orbit-root-2828a868
drwxr-xr-x 3 root root 4096 Jul 15 04:57 passenger.1.0.7710
drwxr-xr-x. 2 root root 4096 Jul 14 14:48 pulse-IeUtyxiMLV63
drwxr-xr-x. 2 root root 4096 Jul 14 14:48 pulse-InIUa7q55sdd
drwxr-xr-x 2 root root 4096 Jul 14 10:35 virtual-root.1Kd1wl
drwxr-xr-x. 2 root root 4096 Jul 11 16:15 virtual-root.3WiD2h
drwxr-xr-x. 2 root root 4096 Jul 11 17:03 virtual-root.BFcnAB
drwxr-xr-x 2 root root 4096 Jul 14 14:48 virtual-root.e6XU5F
drwxr-xr-x. 2 root root 4096 Jul 11 16:35 virtual-root.iytoJW
drwxr-xr-x 2 root root 4096 Jul 14 10:30 virtual-root.JniZAV
drwxr-xr-x 2 root root 4096 Jul 14 14:34 virtual-root.R0BlQU
drwxr-xr-x. 2 root root 4096 Jul 11 16:30 virtual-root.TqyNNH
-rwxr-xr-x. 1 root root 0 Jul 11 09:40 yum.log
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
and i cant find this file: sql_1de5_0.MYI
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
Your MySQL has a permission problem. It's not related to Redmine.
What do you get from:
cat /etc/my.cnf | grep tmpdir
And:
cat /etc/my.cnf | grep user
And:
ps aux | grep mysql
And:
ls -lah /tmp
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
cat /etc/my.cnf | grep tmpdir - nothing
[root@crytek redmine]# cat /etc/my.cnf[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
- Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@crytek redmine]# cat /etc/my.cnf | grep user
user=mysql
[root@crytek redmine]# ps aux | grep mysql
root 7551 0.0 0.0 108204 1428 pts/0 S Jul14 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 7653 0.0 0.7 508812 27060 pts/0 Sl Jul14 0:24 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root 15226 0.0 0.0 103256 816 pts/1 S+ 11:41 0:00 grep mysql
[root@crytek redmine]# ls -lah /tmp
total 84K
drwxrwxr-x. 20 root root 4.0K Jul 15 10:40 .
dr-xr-xr-x. 26 root root 4.0K Jul 14 17:16 ..
drwxr-xr-x. 2 root root 4.0K Jul 14 14:48 .esd-0
drwxr-xr-x 2 root root 4.0K Jul 14 14:48 .ICE-unix
drwxr-xr-x 2 root root 4.0K Jul 14 14:48 keyring-cvXxgf
drwxr-xr-x 2 root root 4.0K Jul 14 14:48 orbit-gdm
drwxr-xr-x 2 root root 4.0K Jan 1 1970 orbit-root
drwxr-xr-x 2 root root 4.0K Jul 15 10:13 orbit-root-2828a868
drwxr-xr-x 3 root root 4.0K Jul 15 10:40 passenger.1.0.13060
drwxr-xr-x. 2 root root 4.0K Jul 14 14:48 pulse-IeUtyxiMLV63
drwxr-xr-x. 2 root root 4.0K Jul 14 14:48 pulse-InIUa7q55sdd
drwxr-xr-x 2 root root 4.0K Jul 14 10:35 virtual-root.1Kd1wl
drwxr-xr-x. 2 root root 4.0K Jul 11 16:15 virtual-root.3WiD2h
drwxr-xr-x. 2 root root 4.0K Jul 11 17:03 virtual-root.BFcnAB
drwxr-xr-x 2 root root 4.0K Jul 14 14:48 virtual-root.e6XU5F
drwxr-xr-x. 2 root root 4.0K Jul 11 16:35 virtual-root.iytoJW
drwxr-xr-x 2 root root 4.0K Jul 14 10:30 virtual-root.JniZAV
drwxr-xr-x 2 root root 4.0K Jul 14 14:34 virtual-root.R0BlQU
drwxr-xr-x. 2 root root 4.0K Jul 11 16:30 virtual-root.TqyNNH
-rwxr-xr-x 1 root root 11 Jul 14 14:46 .X0-lock
drwxr-xr-x 2 root root 4.0K Jul 14 14:46 .X11-unix
-rwxr-xr-x. 1 root root 0 Jul 11 09:40 yum.log
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
On my Debian, the permissions in /tmp are:
drwxrwxrwt 4 root root
And yours are:
drwxrwxr-x. 20 root root
Check what are supposed to be the permissions on CentOS for
/tmp
but I think this is your problem.Cheers,
RE: Redmine 500 error
-
Added by Konstantin Okorochkov over 10 years ago
YEEEEEEEEEEEEE, mr Martin Denizet, THX A LOT!!!!!
problem was: only root user and root group have access to change files in /tmp, i set this permission to all and now i have drwxrwxrwx. 20 root root that means everyone can do anything with /tmp, so i do that RAILS_ENV..... and restart apache, and my redmine is online now))
thx again)
RE: Redmine 500 error
-
Added by Martin Denizet (redmine.org team member) over 10 years ago
Great! Good to know you got it working!