tracd 服务器问题

发布于 2024-08-30 04:36:31 字数 1637 浏览 3 评论 0原文

我在访问 tracd 服务器时遇到以下错误,这是怎么回事?

谢谢。

[oke@localhost Trac-0.11.7]$ sudo tracd -p 8000 /home/deddihp/trac/
Server starting in PID 5082.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 47804)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 194, in handle_one_request
    gateway.run(self.server.application)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 94, in run
    response = application(self.environ, self._start_response)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/standalone.py", line 100, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/main.py", line 346, in dispatch_request
    locale.setlocale(locale.LC_ALL, environ['trac.locale'])
  File "/usr/lib/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting
----------------------------------------

I got the following error while accessing tracd server, what's going on ?

Thanks.

[oke@localhost Trac-0.11.7]$ sudo tracd -p 8000 /home/deddihp/trac/
Server starting in PID 5082.
Serving on 0.0.0.0:8000 view at http://127.0.0.1:8000/
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 47804)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 194, in handle_one_request
    gateway.run(self.server.application)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/wsgi.py", line 94, in run
    response = application(self.environ, self._start_response)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/standalone.py", line 100, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/main.py", line 346, in dispatch_request
    locale.setlocale(locale.LC_ALL, environ['trac.locale'])
  File "/usr/lib/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
Error: unsupported locale setting
----------------------------------------

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

口干舌燥 2024-09-06 04:36:31

您必须安装缺少的语言环境。使用命令“locale”检查哪些环境变量无法设置。

[calvin@hobbes:~]$ locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
        locale: Cannot set LC_MESSAGES to default locale: No such file or directory
        locale: Cannot set LC_ALL to default locale: No such file or directory
        LANG=en_US.UTF-8
        LANGUAGE=en_US:en
        LC_CTYPE="en_US"
        LC_NUMERIC="en_US"
        LC_TIME="en_US"
        LC_COLLATE="en_US"
        LC_MONETARY="en_US"
        LC_MESSAGES="en_US"
        LC_PAPER="en_US"
        LC_NAME="en_US"
        LC_ADDRESS="en_US"
        LC_TELEPHONE="en_US"
        LC_MEASUREMENT="en_US"
        LC_IDENTIFICATION="en_US"
        LC_ALL=en_US

然后使用命令“locale-gen”安装缺少的“en_US”语言环境:

[calvin@hobbes:~]$ sudo locale-gen en_US
    Generating locales (this might take a while)...
      en_US.UTF-8... done
    Generation complete.

最后,使用命令“dpkg-reconfigure”重新配置所有可用的语言环境:

[calvin@hobbes:~]$ sudo dpkg-reconfigure locales
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = "en_US:en",
            LC_ALL = "en_US",
            LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
    Generating locales (this might take a while)...
      en_GB.ISO-8859-1... done
      en_GB.ISO-8859-15... done
      en_GB.UTF-8... done
      en_US.ISO-8859-1... done
      en_US.ISO-8859-15... done
      en_US.UTF-8... done
      pt_PT.ISO-8859-1... done
      pt_PT.UTF-8... done
      pt_PT.ISO-8859-15@euro... done
    Generation complete.

然后您可以在“locale”命令输出中看到不再有错误:

[calvin@hobbes:~]$ locale
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE="en_US"
    LC_NUMERIC="en_US"
    LC_TIME="en_US"
    LC_COLLATE="en_US"
    LC_MONETARY="en_US"
    LC_MESSAGES="en_US"
    LC_PAPER="en_US"
    LC_NAME="en_US"
    LC_ADDRESS="en_US"
    LC_TELEPHONE="en_US"
    LC_MEASUREMENT="en_US"
    LC_IDENTIFICATION="en_US"
    LC_ALL=en_US

重新启动 tracd服务器,你应该没问题。

问候

You have to install the missing locale(s). Check with command "locale" to see what environment variables cannot be set.

[calvin@hobbes:~]$ locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
        locale: Cannot set LC_MESSAGES to default locale: No such file or directory
        locale: Cannot set LC_ALL to default locale: No such file or directory
        LANG=en_US.UTF-8
        LANGUAGE=en_US:en
        LC_CTYPE="en_US"
        LC_NUMERIC="en_US"
        LC_TIME="en_US"
        LC_COLLATE="en_US"
        LC_MONETARY="en_US"
        LC_MESSAGES="en_US"
        LC_PAPER="en_US"
        LC_NAME="en_US"
        LC_ADDRESS="en_US"
        LC_TELEPHONE="en_US"
        LC_MEASUREMENT="en_US"
        LC_IDENTIFICATION="en_US"
        LC_ALL=en_US

Then use command "locale-gen" to install the missing "en_US" locale:

[calvin@hobbes:~]$ sudo locale-gen en_US
    Generating locales (this might take a while)...
      en_US.UTF-8... done
    Generation complete.

Finally, use command "dpkg-reconfigure" to reconfigure all available locales:

[calvin@hobbes:~]$ sudo dpkg-reconfigure locales
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = "en_US:en",
            LC_ALL = "en_US",
            LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
    Generating locales (this might take a while)...
      en_GB.ISO-8859-1... done
      en_GB.ISO-8859-15... done
      en_GB.UTF-8... done
      en_US.ISO-8859-1... done
      en_US.ISO-8859-15... done
      en_US.UTF-8... done
      pt_PT.ISO-8859-1... done
      pt_PT.UTF-8... done
      pt_PT.ISO-8859-15@euro... done
    Generation complete.

Then you can see no more errors on the "locale" command output:

[calvin@hobbes:~]$ locale
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE="en_US"
    LC_NUMERIC="en_US"
    LC_TIME="en_US"
    LC_COLLATE="en_US"
    LC_MONETARY="en_US"
    LC_MESSAGES="en_US"
    LC_PAPER="en_US"
    LC_NAME="en_US"
    LC_ADDRESS="en_US"
    LC_TELEPHONE="en_US"
    LC_MEASUREMENT="en_US"
    LC_IDENTIFICATION="en_US"
    LC_ALL=en_US

Restart your tracd server and you should be fine.

Regards

软的没边 2024-09-06 04:36:31

看起来您尝试使用不受支持的语言环境运行 tracd,请在启动 trac 守护程序之前尝试将其设置为所需的语言环境(en_US?)。

LC_ALL=en_US sudo tracd -p 8000 /home/deddihp/trac/

Looks like you try to run tracd with unsupported locale, try to set it to your desired locale (en_US?) before starting trac daemon.

LC_ALL=en_US sudo tracd -p 8000 /home/deddihp/trac/
野侃 2024-09-06 04:36:31

卸载 Apache2 后我遇到了同样的问题(我想使用 Trac 的独立服务器)。我通过简单地重新安装语言包解决了这个问题:

sudo apt-get install --reinstall language-pack-en

I had the same problem after uninstalling Apache2 (I wanted to use Trac's standalone server). I solved the problem by simply reinstalling the language pack:

sudo apt-get install --reinstall language-pack-en
征棹 2024-09-06 04:36:31

与“错误:不支持的区域设置”有同样的问题
有些trac我已经有一段时间没有使用了。
通过设置区域设置来解决,基本上更新到最新版本

dpkg-reconfigure locales

或者像 Miguel Rentes 在他早期的回答中所写的那样手动设置。就我而言,de_DE.UTF8

然后使用以下命令更新了 easyinstall 和 trac:

wget http://bootstrap.pypa.io/ez_setup.py -O - | python

得到:“证书错误”

wget --no-check-certificate http://bootstrap.pypa.io/ez_setup.py -O - | python

然后

easy_install http://svn.edgewall.org/repos/trac/branches/0.12-stable

had the same issue with "Error: unsupported locale setting"
with some trac(s) i did not use for some time.
solved by setting locales, updating to latest version

basically:

dpkg-reconfigure locales

or set manually as Miguel Rentes wrote in his answer earlyer. In my case de_DE.UTF8

then updated easyinstall and trac with these commands:

wget http://bootstrap.pypa.io/ez_setup.py -O - | python

got: "certificate error"

wget --no-check-certificate http://bootstrap.pypa.io/ez_setup.py -O - | python

then

easy_install http://svn.edgewall.org/repos/trac/branches/0.12-stable
忘年祭陌 2024-09-06 04:36:31

解决了同样的问题

在 CentOS 上,通过将/etc/sysconfig/i18n 与由 locale -a 识别的有效安装区域设置

进行比较,我编辑了 /etc/sysconfig/i18n 并将 UTF-8 更改为 utf8,因为这是有效的区域设置。

然后所有症状都消失了。

On CentOS same issue for me was solved by comparing

/etc/sysconfig/i18n to valid installed locales identified by locale -a

I edited /etc/sysconfig/i18n and changed UTF-8 to utf8, as this was a valid locale.

All symptoms then vanished.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文