我在ubunu 18.04(apache2)上安装odoo v13时遇到问题
我能够通过odoo-bin进行测试/开发,但尝试将其从我的本地计算机上投入使用(我们的网络上有一个代理,但现在我想让它运行,这样我就可以得到它)香港专业教育学院设置odoo.conf吐出错误odoo-error.log确实可以吐出一些错误。但仅在systemctl restart apache2
之后然后停止
从守护进程收到的截断或过大的响应头“管理员”:/opt/odoo13/E-Forms/odoo/setup/odoo-wsgi.py
我完成了目录的所有权限访问但是我发现与apache奇怪的是,在默认错误文件中,我得到了这个
致命的Python错误:Py_Initialize:无法获取区域设置编码ModuleNotFoundError:没有名为“ encodings”的模块
和它的连续性让我感到困惑,如果我告诉virtualhost,嘿,把我所有的错误都放在odoo-error.log上,为什么error.log仍然不断被填充,但是我希望这与我的问题无关
这是我的朋友
ServerName test.eforms.com ServerAlias test.eforms.com 127.0.0.1 ErrorLog ${APACHE_LOG_DIR}/odoo-error.log CustomLog ${APACHE_LOG_DIR}/odoo-access.log combined LogLevel info <Directory /opt/odoo13/E-Forms> Require all granted </Directory> <Directory /opt/odoo13/E-Forms/odoo/setup> <Files odoo-wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess admin user=admin group=admin processes=1 python-home=/opt/odoo13/Venv/odoovenv/bin/ python-path=/opt/odoo13/E-Forms/odoo WSGIProcessGroup admin WSGIScriptAlias / /opt/odoo13/E-Forms/odoo/setup/odoo-wsgi.py WSGIApplicationGroup %{GLOBAL} </VirtualHost>
这是我的odoo-wsgi.py(这是克隆的副本)
import odoo #---------------------------------------------------------- # Common #---------------------------------------------------------- odoo.multi_process = True # Nah! # Equivalent of --load command-line option odoo.conf.server_wide_modules = ['base','web'] conf = odoo.tools.config # Path to the OpenERP Addons repository (comma-separated for # multiple locations) conf['addons_path'] = '/opt/odoo13/E-Forms/odoo/addons,/opt/odoo13/E-Forms/odoo/custom' # Optional database config if not using local socket conf['db_name'] = 'EForm' conf['db_host'] = 'localhost' conf['db_user'] = 'odoo' conf['db_port'] = 5432 conf['db_password'] = 'password' #---------------------------------------------------------- # Generic WSGI handlers application #---------------------------------------------------------- application = odoo.service.wsgi_server.application odoo.service.server.load_server_wide_modules() #---------------------------------------------------------- # Gunicorn #---------------------------------------------------------- # Standard OpenERP XML-RPC port is 8069 bind = '127.0.0.1:80' pidfile = '.gunicorn.pid' workers = 1 timeout = 1200
和我的apache2.conf在这里
ServerName test.eforms.com DefaultRuntimeDir ${APACHE_RUN_DIR} PidFile ${APACHE_PID_FILE} Timeout 900 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} HostnameLookups On ErrorLog ${APACHE_LOG_DIR}/error.log #LogLevel info # Include module configuration: IncludeOptional mods-enabled/*.load IncludeOptional mods-enabled/*.conf # Include list of ports to listen on Include ports.conf <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory> <Directory /usr/share> AllowOverride None Require all granted </Directory> <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> AccessFileName .htaccess <FilesMatch "^\.ht"> Require all denied </FilesMatch> LoadModule wsgi_module modules/mod_wsgi.so LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # see README.Debian for details. IncludeOptional conf-enabled/*.conf IncludeOptional sites-enabled/*.conf # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
我从源代码下载并安装了mod_wsgi.so以下是仅为apache2安装的所有apt软件包的列表
apache2 / bionic-updates,bionic-security,now 2.4.29-1ubuntu4.11 amd64[已安装] apache2-bin / bionic-updates,bionic-security,现在2.4.29-1ubuntu4.11 amd64 [已安装,自动] apache2-数据/仿生更新,仿生更新,仿生安全,仿生安全,现在2.4.29-1ubuntu4.11全部[已安装,自动] apache2-dev / bionic-updates,bionic-security,现在为2.4.29-1ubuntu4.11amd64 [已安装] apache2-utils / bionic-updates,bionic-security,现在2.4.29-1ubuntu4.11 amd64 [已安装,自动] libapache2-mod-wsgi-py3 / bionic,现在是4.5.17-1 amd64 [已安装]
和我的点冻结
Babel == 2.3.4 certifi == 2019.9.11 chardet == 3.0.4装饰器== 4.0.10Django == 2.2.6 docopt == 0.6.2 docutils == 0.12 h11 == 0.8.1 h2 == 3.1.1hpack == 3.0.0 html2text == 2019.9.26超帧== 5.2.0 idna == 2.8图片== 1.5.27 Jinja2 == 2.10.3 libsass == 0.19.3 lxml == 4.4.1MarkupSafe == 1.1.1 num2words == 0.5.10 passlib == 1.7.1枕头== 6.2.0pkg-资源== 0.0.0 polib == 1.1.0 psutil == 5.6.3 psycogreen == 1.0.1psycopg2 == 2.8.4 psycopg2-binary == 2.8.4 pyasn1 == 0.4.7pyasn1-modules == 0.2.7 pyldap == 3.0.0.post1 PyPDF2 == 1.26.0python-dateutil == 2.8.0 python-ldap == 3.2.0 python-openid == 2.2.5python-stdnum == 1.11 pytz == 2016.7 reportlab == 3.5.28个请求== 2.22.0rfc3986 == 1.3.2六个== 1.12.0 sqlparse == 0.3.0 urllib3 == 1.25.6Werkzeug == 0.16.0 xlwt == 1.3.0
我在ubunu 18.04(apache2)上安装odoo v13时遇到问题,但我能够通过odoo-bin进行测试/开发,但尝试将其从本地计算机上发布(我们的网络上有一个代理...
经过三天的挠头,我终于找到了问题所在,并且是这条线