Project

General

Profile

Can't connect to lcoal MySQL server through socket

Added by Mike Sanders over 10 years ago

Hi there. When installing the Scrum plugin, I get the following error:
[root@redmine plugins]# rake redmine:plugins:migrate
(in /opt/redmine-2.5.1)
rake aborted!
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
/opt/redmine-2.5.1/app/models/issue_relation.rb:73
/opt/redmine-2.5.1/lib/redmine/helpers/gantt.rb:28
/opt/redmine-2.5.1/lib/redmine.rb:56
/opt/redmine-2.5.1/config/initializers/30-redmine.rb:4
/opt/redmine-2.5.1/config/environment.rb:14
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
[root@redmine plugins]#

Please advise.


Replies (4)

RE: Can't connect to lcoal MySQL server through socket - Added by Mike Sanders over 10 years ago

Okay, so, I found it to be a problem with my installation of Redmine I believe.
It's trying to connect to the mysql socket on localhost, but Mysql is not located on the same host. However, my redmine is configured correctly and works fine..

Strange error.

RE: Can't connect to lcoal MySQL server through socket - Added by Mike Sanders over 10 years ago

After restarting my redmine host, I get this:

Ruby (Rack) application could not be started

These are the possible causes:
There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
/opt/redmine-2.5.1/plugins/scrum/init.rb:32: odd number list for Hash {sprints: [:new, :create, :edit, :updat... ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:32: syntax error, unexpected ':', expecting '}' {sprints: [:new, :create, :edit, :updat... ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:32: syntax error, unexpected '}', expecting kEND ...:edit_effort, :update_effort]}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:35: odd number list for Hash {sprints: [:index, :show]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:35: syntax error, unexpected ':', expecting '}' {sprints: [:index, :show]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:35: syntax error, unexpected '}', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:37: odd number list for Hash {sprints: [:change_task_status, :new_pb... ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:37: syntax error, unexpected ':', expecting '}' {sprints: [:change_task_status, :new_pb... ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:37: syntax error, unexpected ',', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:39: syntax error, unexpected '}', expecting kEND :create_time_entry]}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:42: odd number list for Hash {sprints: [:burndown_index, :burndown]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:42: syntax error, unexpected ':', expecting '}' {sprints: [:burndown_index, :burndown]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:42: syntax error, unexpected '}', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:44: odd number list for Hash {product_backlog: [:index]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:44: syntax error, unexpected ':', expecting '}' {product_backlog: [:index]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:44: syntax error, unexpected '}', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:46: odd number list for Hash {product_backlog: [:sort, :new_pbi, :create_pbi]}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:46: syntax error, unexpected ':', expecting '}' {product_backlog: [:sort, :new_pbi, :create_pbi]}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:46: syntax error, unexpected '}', expecting kEND {product_backlog: [:sort, :new_pbi, :create_pbi]}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:49: odd number list for Hash {product_backlog: [:burndown]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:49: syntax error, unexpected ':', expecting '}' {product_backlog: [:burndown]} ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:49: syntax error, unexpected '}', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:52: odd number list for Hash ...ect_menu, :scrum, {controller: :sprints, action: :index}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:52: syntax error, unexpected ':', expecting '}' ...ect_menu, :scrum, {controller: :sprints, action: :index}, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:55: syntax error, unexpected ':', expecting kEND settings default: {create_journal_on_pbi_positi... ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:55: odd number list for Hash ...ournal_on_pbi_position_change: false, ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:55: Can't assign to false /opt/redmine-2.5.1/plugins/scrum/init.rb:56: syntax error, unexpected ':', expecting '=' doer_color: "post-it-color-5", ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:56: syntax error, unexpected ',', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:58: syntax error, unexpected ',', expecting kEND /opt/redmine-2.5.1/plugins/scrum/init.rb:59: Can't assign to nil /opt/redmine-2.5.1/plugins/scrum/init.rb:60: syntax error, unexpected ':', expecting '=' task_status_ids: [], ^ /opt/redmine-2.5.1/plugins/scrum/init.rb:64: syntax error, unexpected $end, expecting kEND
Exception class:
SyntaxError
Application root:
/opt/redmine
Backtrace:
  1. File Line Location
    0 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require'
    1 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require'
    2 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 236 in `load_dependency'
    3 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 251 in `require'
    4 /opt/redmine-2.5.1/lib/redmine/plugin.rb 133 in `load'
    5 /opt/redmine-2.5.1/lib/redmine/plugin.rb 124 in `each'
    6 /opt/redmine-2.5.1/lib/redmine/plugin.rb 124 in `load'
    7 /opt/redmine-2.5.1/config/initializers/30-redmine.rb 19
    8 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 245 in `load'
    9 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 245 in `load'
    10 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 236 in `load_dependency'
    11 /usr/lib/ruby/gems/1.8/gems/activesupport-3.2.17/lib/active_support/dependencies.rb 245 in `load'
    12 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/engine.rb 593
    13 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/engine.rb 592 in `each'
    14 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/engine.rb 592
    15 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/initializable.rb 30 in `instance_exec'
    16 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/initializable.rb 30 in `run'
    17 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/initializable.rb 55 in `run_initializers'
    18 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/initializable.rb 54 in `each'
    19 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/initializable.rb 54 in `run_initializers'
    20 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/application.rb 136 in `initialize!'
    21 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/railtie/configurable.rb 30 in `send'
    22 /usr/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/railtie/configurable.rb 30 in `method_missing'
    23 /opt/redmine-2.5.1/config/environment.rb 14
    24 config.ru 3 in `require'
    25 config.ru 3
    26 /usr/lib/ruby/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb 51 in `instance_eval'
    27 /usr/lib/ruby/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb 51 in `initialize'
    28 config.ru 1 in `new'
    29 config.ru 1

RE: Can't connect to lcoal MySQL server through socket - Added by Mike Sanders over 10 years ago

I tried with the setting RAILS_ENV=production and received this:
[root@redmine plugins]# rake redmine:plugins:migrate RAILS_ENV=production
(in /opt/redmine-2.5.1)
rake aborted!
/opt/redmine-2.5.1/plugins/scrum/init.rb:32: odd number list for Hash {sprints: [:new, :create, :edit, :updat...
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:32: syntax error, unexpected ':', expecting '}' {sprints: [:new, :create, :edit, :updat...
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:32: syntax error, unexpected '}', expecting kEND
...:edit_effort, :update_effort]},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:35: odd number list for Hash {sprints: [:index, :show]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:35: syntax error, unexpected ':', expecting '}' {sprints: [:index, :show]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:35: syntax error, unexpected '}', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:37: odd number list for Hash {sprints: [:change_task_status, :new_pb...
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:37: syntax error, unexpected ':', expecting '}' {sprints: [:change_task_status, :new_pb...
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:37: syntax error, unexpected ',', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:39: syntax error, unexpected '}', expecting kEND
:create_time_entry]},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:42: odd number list for Hash {sprints: [:burndown_index, :burndown]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:42: syntax error, unexpected ':', expecting '}' {sprints: [:burndown_index, :burndown]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:42: syntax error, unexpected '}', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:44: odd number list for Hash {product_backlog: [:index]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:44: syntax error, unexpected ':', expecting '}' {product_backlog: [:index]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:44: syntax error, unexpected '}', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:46: odd number list for Hash {product_backlog: [:sort, :new_pbi, :create_pbi]},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:46: syntax error, unexpected ':', expecting '}' {product_backlog: [:sort, :new_pbi, :create_pbi]},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:46: syntax error, unexpected '}', expecting kEND {product_backlog: [:sort, :new_pbi, :create_pbi]},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:49: odd number list for Hash {product_backlog: [:burndown]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:49: syntax error, unexpected ':', expecting '}' {product_backlog: [:burndown]}
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:49: syntax error, unexpected '}', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:52: odd number list for Hash
...ect_menu, :scrum, {controller: :sprints, action: :index},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:52: syntax error, unexpected ':', expecting '}'
...ect_menu, :scrum, {controller: :sprints, action: :index},
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:55: syntax error, unexpected ':', expecting kEND
settings default: {create_journal_on_pbi_positi...
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:55: odd number list for Hash
...ournal_on_pbi_position_change: false,
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:55: Can't assign to false
/opt/redmine-2.5.1/plugins/scrum/init.rb:56: syntax error, unexpected ':', expecting '='
doer_color: "post-it-color-5",
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:56: syntax error, unexpected ',', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:58: syntax error, unexpected ',', expecting kEND
/opt/redmine-2.5.1/plugins/scrum/init.rb:59: Can't assign to nil
/opt/redmine-2.5.1/plugins/scrum/init.rb:60: syntax error, unexpected ':', expecting '='
task_status_ids: [],
^
/opt/redmine-2.5.1/plugins/scrum/init.rb:64: syntax error, unexpected $end, expecting kEND
/opt/redmine-2.5.1/lib/redmine/plugin.rb:133:in `load'
/opt/redmine-2.5.1/lib/redmine/plugin.rb:124:in `each'
/opt/redmine-2.5.1/lib/redmine/plugin.rb:124:in `load'
/opt/redmine-2.5.1/config/initializers/30-redmine.rb:19
/opt/redmine-2.5.1/config/environment.rb:14
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
[root@redmine plugins]#

    (1-4/4)