Bug #442

Проблема с /etc/init.d/calculate-core start

Добавил(а) Михаил Гагауз больше 12 лет назад. Обновлено больше 12 лет назад.

Статус:Closed Начата:19.06.2012
Приоритет:Normal Дата выполнения:
Назначена:- Готовность в %:

50%

Категория:Calculate Utilities Затраченное время: -
Версия:12
Голоса: 0

Описание

Проблема с /etc/init.d/calculate-core start

# /etc/init.d/calculate-core start
 * Caching service dependencies ...      [ ok ]
 * Start calculate core ...              [ !! ]
 * ERROR: calculate-core failed to start

Выполняю вручную пошагово:
# /usr/sbin/cl-core --variable cl_wsdl
calculate-install
# /usr/sbin/cl-core --check
Сертификат /var/calculate/server/ca/server.crt не найден
Секретный ключ /var/calculate/server/ca/server.key не найден
# echo $?
1
# ADMINUSER=`/usr/sbin/cl-core --variable install.cl_migrate_user[1]`
# echo  ":${ADMINUSER}:" 
::
# ADMINUSER=`/usr/sbin/cl-core --variable install.cl_migrate_user[0]`
# echo  ":${ADMINUSER}:" 
:root:
# /usr/sbin/cl-core --bootstrap $ADMINUSER
Генерация сертификата сервера
Traceback (most recent call last):
  File "/usr/sbin/cl-core", line 24, in <module>
    main()
  File "/usr/lib64/python2.7/site-packages/calculate/core/server/cl_server.py", line 153, in main
    port, args.bootstrap_user_name)
  File "/usr/lib64/python2.7/site-packages/calculate/core/server/bootstrap.py", line 86, in init
    create_server_cert(cert, key, cert_path, args, port)
  File "/usr/lib64/python2.7/site-packages/calculate/core/server/bootstrap.py", line 123, in create_server_cert
    cert_cmd.check_server_certificate(cert, key, cert_path, args, port, auto = True)
  File "/usr/lib64/python2.7/site-packages/calculate/core/server/cert_cmd.py", line 75, in check_server_certificate
    lang = ob.Get('os_locale_locale')[:2]
  File "/usr/lib64/python2.7/site-packages/calculate/lib/datavars.py", line 849, in Get
    var = self.__Get(varname,humanreadable)
  File "/usr/lib64/python2.7/site-packages/calculate/lib/datavars.py", line 882, in __Get
    res = varObj._get()
  File "/usr/lib64/python2.7/site-packages/calculate/lib/datavars.py", line 226, in _get
    value = self.get()
  File "/usr/lib64/python2.7/site-packages/calculate/lib/variables/locale.py", line 278, in get
    if os.environ.has_key("LANG") and os.environ["LANG"] != "C":
NameError: global name 'os' is not defined

Как видно - проблема с os.environ.has_key, 'os' is not defined
 1 
# diff -su branch/{99_calculate,10_mask}/usr/lib64/python2.7/site-packages/calculate/lib/variables/locale.py |less
2
--- branch/99_calculate/usr/lib64/python2.7/site-packages/calculate/lib/variables/locale.py 2012-05-29 16:17:11.000000000 +0300
3
+++ branch/10_mask/usr/lib64/python2.7/site-packages/calculate/lib/variables/locale.py 2012-06-18 10:52:46.713098980 +0300
4
@@ -14,7 +14,7 @@
5 # See the License for the specific language governing permissions and 6 # limitations under the License. 7 8
-from os import path
9
+from os import path, environ
10 import socket 11 from calculate.lib.datavars import Variable,VariableError,ReadonlyVariable 12 from calculate.lib.utils.common import (getValueFromCmdLine, 13
@@ -275,8 +275,8 @@
14 localeVal = getValueFromConfig(localeFile,'LANG') 15 if self.isValueInFieldExists('locale',localeVal): 16 return localeVal 17
- if os.environ.has_key("LANG") and os.environ["LANG"] != "C":
18
- return os.environ["LANG"]
19
+ if environ.has_key("LANG") and environ["LANG"] != "C":
20
+ return environ["LANG"]
21 return self.getFieldByLang("locale","default") 22 23 class VariableOsLocaleLang(ReadonlyVariable,Locale):

После исправления
# /etc/init.d/calculate-core restart
 * Caching service dependencies ...      [ ok ]
 * Start calculate core ...              [ ok ]

История

Обновлено Mikhail Hiretsky больше 12 лет назад

  • Параметр Статус изменился с New на Resolved

Исправлен в calculate-lib-3.0.0_beta1

Обновлено Alexander Tratsevskiy больше 12 лет назад

  • Параметр Статус изменился с Resolved на Closed

Экспортировать в Atom PDF

Спасибо!