[Devel] [Задача 6354] Запустить веб-интерфейс на стенде
Evgeny Sinelnikov
sin на etersoft.ru
Пн Ноя 1 15:31:02 MSK 2010
1 ноября 2010 г. 15:18 пользователь Evgeny Sinelnikov <sin на etersoft.ru> написал:
> 1 ноября 2010 г. 15:08 пользователь <bugs на lists.etersoft.ru> написал:
>> http://bugs.etersoft.ru/show_bug.cgi?id=6354
>>
>>
>> Иван Дончевский <yv на etersoft.ru> changed:
>>
>> What |Removed |Added
>> ----------------------------------------------------------------------------
>> Hours Worked| |0.02
>>
>>
>>
>>
>> --- Comment #3 from Иван Дончевский <yv на etersoft.ru> 2010-11-01 15:08:30 ---
>> лог:
>>
>
> Да, логи полезно...
>
>> [guest на standpm weblog]$ ./manage.py runserver
>> Validating models...
>> Unhandled exception in thread started by <function inner_run at 0x843e64c>
>> Traceback (most recent call last):
>> File "/usr/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
>> self.validate(display_num_errors=True)
>> File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 249, in validate
>> num_errors = get_validation_errors(s, app)
>> File "/usr/lib/python2.5/site-packages/django/core/management/validation.py", line 67, in get_validation_errors
>> connection.validation.validate_field(e, opts, f)
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/validation.py", line 15, in validate_field
>> db_version = connection.get_server_version()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 297, in get_server_version
>> self.cursor()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/__init__.py", line 81, in cursor
>> cursor = self._cursor()
>> File "/usr/lib/python2.5/site-packages/django/db/backends/mysql/base.py", line 281, in _cursor
>> self.connection = Database.connect(**kwargs)
>> File "/usr/lib/python2.5/site-packages/MySQLdb/__init__.py", line 74, in Connect
>> return Connection(*args, **kwargs)
>> File "/usr/lib/python2.5/site-packages/MySQLdb/connections.py", line 170, in __init__
>> super(Connection, self).__init__(*args, **kwargs2)
>> _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
>> (111)")
>>
>>
>
> В общем, из лога видно, что к базе нет доступа. В логах сервера такое
> можно заметить:
> [root на standpm ~]# service mysqls status
> service: mysqls: Unrecognized service
> [root на standpm ~]# service mysqld status
> mysqld is dead, but subsystem is locked
> [root на standpm ~]# service mysqld restart
> Sending TERM signal to mysqld: Service mysqld is not running.
>
> [PASSED]
> Waiting, while mysqld actualy stopped:
>
> [ DONE ]
> Adjusting environment for mysqld:
>
> [ DONE ]
> Starting mysqld service:
>
> [ DONE ]
> [root на standpm ~]# service mysqld restart
> Sending TERM signal to mysqld: Service mysqld is not running.
>
> [PASSED]
> Waiting, while mysqld actualy stopped:
>
> [ DONE ]
> Adjusting environment for mysqld:
>
> [ DONE ]
> Starting mysqld service:
>
> [ DONE ]
> [root на standpm ~]# tail /var/log/mysql/info
> info info.1 info.2 info.3 info.4
>
> [root на standpm ~]# tail /var/log/mysql/info
> 101101 16:19:58 [ERROR] /usr/sbin/mysqld: Can't create file
> '/mysqld.pid' (errno: 13)
> 101101 16:19:58 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 2010-Nov-01 16:19:58 :: execution failed
> 2010-Nov-01 16:19:58 :: shutdown
> 2010-Nov-01 16:21:08 :: startup
> 101101 16:21:08 InnoDB: Started; log sequence number 0 43655
> 101101 16:21:08 [ERROR] /usr/sbin/mysqld: Can't create file
> '/mysqld.pid' (errno: 13)
> 101101 16:21:08 [ERROR] Can't start server: can't create PID file:
> Permission denied
> 2010-Nov-01 16:21:08 :: execution failed
> 2010-Nov-01 16:21:08 :: shutdown
>
> Счас поправим.
>
>
У меня так:
[sin на inf etersoft-build-utils]$ sudo ls -l /var/lib/mysql/ -d
drwxrws--t 9 root mysql 4096 Ноя 1 15:28 /var/lib/mysql/
На стенде так:
[root на standpm ~]# ls /var/lib/mysql/ -ld
drwxr-xr-x 11 root root 4096 Nov 1 16:33 /var/lib/mysql/
Кто-то, что-то поломал, думается мне...
[root на standpm ~]# chmod 3770 /var/lib/mysql/
[root на standpm ~]# chown :mysql /var/lib/mysql/
[root на standpm ~]# service mysqld start
Adjusting environment for mysqld:
[ DONE ]
Starting mysqld service:
[ DONE ]
[root на standpm ~]# service mysqld status
mysqld is running
--
Sin (Sinelnikov Evgeny)
Подробная информация о списке рассылки Devel