Comments (68)
Ahh good catch. The jinja2 install defaults to python 2.x and that is why it didn't run for you guys. I'll test it on a clean server later today and patch it.
from installscript.
Thank you for your report. Can you have a look at the logfile under /var/log and see what it logs? How does you service file look under /etc/your-odoo-server.conf? (Don't forget to remove the master pass if you paste it here)
On what OS are you?
Regards,
Yenthe
from installscript.
Same bug.
Fails to bring up service on Ubuntu 16.04
Odoo 11 installer script from the 11.0
branch of this repo.
Fully default install from running this script odoo_install.sh
on Ubuntu 16.04.
:~# service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (exited) since Fri 2017-10-06 03:43:26 UTC; 1 day 11h ago
Docs: man:systemd-sysv-generator(8)
Process: 631 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Memory: 0B
Oct 06 03:43:26 server6 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 06 03:43:26 server6 odoo-server[631]: Starting odoo-server: odoo-server.
Oct 06 03:43:26 server6 systemd[1]: Started LSB: Enterprise Business Applications.
Oct 06 03:49:59 server6 systemd[1]: Started LSB: Enterprise Business Applications.
Oct 07 14:59:55 server6 systemd[1]: Started LSB: Enterprise Business Applications.
:~#
/var/log/odoo/odoo-server
logfile does not exist.
:~# ls /var/log/odoo -la
total 8
drwxr-xr-x 2 odoo odoo 4096 Oct 5 05:21 .
drwxrwxr-x 17 root syslog 4096 Oct 7 04:54 ..
- Contents of
/etc/odoo-server.conf
:~# cat /etc/odoo-server.conf
[options]
; This is the password that allows database operations:
admin_passwd = ***** (The default password which is set by this odoo_install.sh script)
xmlrpc_port = 8069
logfile = /var/log/odoo/odoo-server
addons_path=/odoo/odoo-server/addons,/odoo/custom/addons
from installscript.
Hey @chris001,
Thanks a lot for the additional info and details.
I've just tried a clean install with the 11.0
install on Ubuntu 16.04.3
without any problems.
Could you please try to run the Odoo from the terminal and then see if a logfile is created with details in it? You can do it like this:
sudo service odoo-server stop
(just to be sure nothing is running)cd /odoo/your-odoo
sudo su odoo
./odoo-bin -c /etc/odoo-server.conf
Regards,
Yenthe
from installscript.
$ cd /odoo/odoo-server
$ sudo su odoo
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
odoo@server6:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
Traceback (most recent call last):
File "./odoo-bin", line 5, in <module>
import odoo
File "/odoo/odoo-server/odoo/__init__.py", line 85, in <module>
from . import cli
File "/odoo/odoo-server/odoo/cli/__init__.py", line 10, in <module>
from . import scaffold
File "/odoo/odoo-server/odoo/cli/scaffold.py", line 9, in <module>
import jinja2
ImportError: No module named 'jinja2'
from installscript.
# apt search python-jinja2
Sorting... Done
Full Text Search... Done
python-jinja2/xenial,now 2.8-1 all [installed]
small but fast and easy to use stand-alone template engine
python-jinja2-doc/xenial 2.8-1 all
documentation for the Jinja2 Python library
#
from installscript.
I have similar problem to chris001. Very similar log file and content of /etc/odoo-server.conf
from installscript.
It seems a dependency problem when jinja2
is installed on the server version of Ubuntu 16.04 OS..
Is this possibly a solution?
https://stackoverflow.com/questions/45105921/there-is-no-module-jinja2
from installscript.
OK this seems to fix it. There's no longer the instant crash:
root@server6:/odoo/odoo-server# sudo pip3 install jinja2
Collecting jinja2
Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
100% |ββββββββββββββββββββββββββββββββ| 348kB 1.7MB/s
Collecting MarkupSafe>=0.23 (from jinja2)
Downloading MarkupSafe-1.0.tar.gz
Building wheels for collected packages: MarkupSafe
Running setup.py bdist_wheel for MarkupSafe ... done
Stored in directory: /root/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Successfully built MarkupSafe
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-1.0 jinja2-2.9.6
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@server6:/odoo/odoo-server# pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
root@server6:/odoo/odoo-server# pip3 install --upgrade pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.1
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-9.0.1
root@server6:/odoo/odoo-server# sudo su odoo
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
odoo@server6:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
In summary:
sudo pip3 install jinja2
sudo pip3 install --upgrade pip
After these 2 commands, odoo should start as a service.
from installscript.
For me, it looks to be a different problem.
root@Ubuntu-1704-zesty-64-minimal ~ # sudo service odoo-server stop
root@Ubuntu-1704-zesty-64-minimal ~ # cd /odoo/odoo-server
root@Ubuntu-1704-zesty-64-minimal /odoo/odoo-server # sudo su odoo
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
odoo@Ubuntu-1704-zesty-64-minimal:/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf/odoo-server$
Traceback (most recent call last):
File "./odoo-bin", line 5, in
import odoo
File "/odoo/odoo-server/odoo/init.py", line 85, in
from . import cli
File "/odoo/odoo-server/odoo/cli/init.py", line 9, in
from . import deploy
File "/odoo/odoo-server/odoo/cli/deploy.py", line 6, in
import requests
ImportError: No module named 'requests'
odoo@Ubuntu-1704-zesty-64-minimal:
from installscript.
The install on Ubuntu 16.04.3 LTS minimal and Ubuntu 17.04 minimal ended up with the same problem.
Successfully was installed on Ubuntu-1604-xenial-server-cloudimg.
I don't know of the differences in details.
Any idea how to fix it?
from installscript.
In this case, ubuntu 16.04, after did the above:
sudo pip3 install jinja2
and reboot
,
now the odoo-server
service is active (running)
.
Previously, it was active (exited)
in other words, service start failed, and not it was running.
:~# service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (running) since Sat 2017-10-07 22:31:30 UTC; 49min ago
Docs: man:systemd-sysv-generator(8)
Process: 694 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Memory: 51.1M
CGroup: /system.slice/odoo-server.service
ββ722 python3 /odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf
Oct 07 22:31:29 server6 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 07 22:31:29 server6 odoo-server[694]: Starting odoo-server: odoo-server.
Oct 07 22:31:30 server6 systemd[1]: Started LSB: Enterprise Business Applications.
root@server6:~#
from installscript.
@aroxsolutions
Probably you need to install the missing dependencies.
# sudo pip3 install requests jinja2
from installscript.
This has been fixed in commit 7d978fa
Could you guys try again by installing jinja2
for Python 3? (sudo pip3 install jinja2
)
from installscript.
Python3 is installed on Ubuntu 16.04.
Python 2 isn't installed anymore on the server, cloud, and the touch images.
Python itself has been upgraded to the 3.5 series.
https://wiki.ubuntu.com/XenialXerus/ReleaseNotes
from installscript.
@Yenthe666
When you run the odoo_install.sh a second time on the same machine, you get these errors:
.....
ln: failed to create symbolic link '/usr/bin/wkhtmltopdf': File exists
ln: failed to create symbolic link '/usr/bin/wkhtmltoimage': File exists
---- Create ODOO system user ----
The user `odoo' is already a member of `sudo'.
---- Create Log directory ----
mkdir: cannot create directory β/var/log/odooβ: File exists
==== Installing ODOO Server ====
fatal: destination path '/odoo/odoo-server' already exists and is not an empty directory.
---- Create custom module directory ----
mkdir: cannot create directory β/odoo/customβ: File exists
mkdir: cannot create directory β/odoo/custom/addonsβ: File exists
---- Setting permissions on home folder ----
* Create server config file
* Creating server config file
* Create startup file
* Create init file
* Security Init File
* Start ODOO on Startup
* Starting Odoo Service
Starting odoo-server: odoo-server.
-----------------------------------------------------------
Done! The Odoo server is up and running. Specifications:
Port: 8069
User service: odoo
User PostgreSQL: odoo
Code location: odoo
Addons folder: odoo/odoo-server/addons/
Start Odoo service: sudo service odoo-server start
Stop Odoo service: sudo service odoo-server stop
Restart Odoo service: sudo service odoo-server restart
-----------------------------------------------------------
:~# service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: inactive (dead) since Sun 2017-10-08 02:30:34 UTC; 15h ago
Docs: man:systemd-sysv-generator(8)
Oct 08 02:26:26 server6 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 08 02:26:26 server6 odoo-server[708]: Starting odoo-server: odoo-server.
Oct 08 02:26:26 server6 systemd[1]: Started LSB: Enterprise Business Applications.
Oct 08 02:30:34 server6 systemd[1]: Stopping LSB: Enterprise Business Applications...
Oct 08 02:30:34 server6 odoo-server[1250]: Stopping odoo-server: odoo-server.
Oct 08 02:30:34 server6 systemd[1]: Stopped LSB: Enterprise Business Applications.
:~# service odoo-server start
:~# service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (exited) since Sun 2017-10-08 17:52:52 UTC; 2s ago
Docs: man:systemd-sysv-generator(8)
Process: 31244 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Oct 08 17:52:52 server6 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 08 17:52:52 server6 odoo-server[31244]: Starting odoo-server: odoo-server.
Oct 08 17:52:52 server6 systemd[1]: Started LSB: Enterprise Business Applications.
:~# ./odoo-bin -c /etc/odoo-server.conf
Traceback (most recent call last):
File "./odoo-bin", line 8, in <module>
odoo.cli.main()
File "/odoo/odoo-server/odoo/cli/command.py", line 60, in main
o.run(args)
File "/odoo/odoo-server/odoo/cli/server.py", line 175, in run
main(args)
File "/odoo/odoo-server/odoo/cli/server.py", line 124, in main
odoo.tools.config.parse_config(args)
File "/odoo/odoo-server/odoo/tools/config.py", line 333, in parse_config
self._parse_config(args)
File "/odoo/odoo-server/odoo/tools/config.py", line 386, in _parse_config
self.load()
File "/odoo/odoo-server/odoo/tools/config.py", line 526, in load
p.read([self.rcfile])
File "/usr/lib/python3.5/configparser.py", line 696, in read
self._read(fp, filename)
File "/usr/lib/python3.5/configparser.py", line 1063, in _read
lineno)
configparser.DuplicateSectionError: While reading from '/etc/odoo-server.conf' [line 7]: section 'options' already exists
It's because the script isn't taking into account that you could run it on the same machine again. As sort of an "upgrade installing over existing installation".
The fix is it edit /etc/odoo-server.conf
and manually remove the duplicate section.
To really fix this bug, the script code which appends lines to /etc/odoo-server.conf
needs to get smarter about adding lines and modifying lines, and avoid creating a duplicate section.
from installscript.
Hi @chris001,
Yep, I'm aware of that. You can install as many Odoo environments on a server as you'd like. If you run the same script with the same parameters it will add all the lines again to the config file. I should add these checks in at one point though, just haven't gotten around to it.
Adding the jinja2 dependency should fix the initial issue though. Feel free to create a PR to fix the duplicate lines, otherwise I'll try to look at it as soon as I have time. :)
from installscript.
Hi guys,
I also fixed the missing dependancies, but now there is another problem.
Check it out:
odoo@aroxsolutions:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
Exception in thread odoo.service.httpd:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/odoo/odoo-server/odoo/service/server.py", line 255, in http_thread
self.httpd = ThreadedWSGIServerReloadable(self.interface, self.port, app)
File "/odoo/odoo-server/odoo/service/server.py", line 106, in init
handler=RequestHandler)
File "/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py", line 504, in init
HTTPServer.init(self, (host, int(port)), handler)
File "/usr/lib/python3.5/socketserver.py", line 440, in init
self.server_bind()
File "/odoo/odoo-server/odoo/service/server.py", line 116, in server_bind
super(ThreadedWSGIServerReloadable, self).server_bind()
File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Any idea?
from installscript.
@aroxsolutions
"Bind address already in use" means you already have a service listening on the port. Default odoo port is 8069. Probably you have an odoo service already listening on the default odoo port.
from installscript.
Indeed - you already have an Odoo running on this port (or another service) which prevents this Odoo from accessing it.
from installscript.
I tested the script on clean Ubuntu 16.04.3 LTS minimal virtual server (from Hetzner: [https://www.hetzner.com/virtual-server/cx20]) and Odoo was not working after the installation. See the copied commands & results below.
root@Ubuntu-1604-xenial-64-minimal ~ # sudo service odoo-server stop
root@Ubuntu-1604-xenial-64-minimal ~ # cd /odoo/odoo-server
root@Ubuntu-1604-xenial-64-minimal /odoo/odoo-server # sudo su odoo
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.
odoo@Ubuntu-1604-xenial-64-minimal:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
Traceback (most recent call last):
File "./odoo-bin", line 5, in
import odoo
File "/odoo/odoo-server/odoo/init.py", line 85, in
from . import cli
File "/odoo/odoo-server/odoo/cli/init.py", line 9, in
from . import deploy
File "/odoo/odoo-server/odoo/cli/deploy.py", line 6, in
import requests
ImportError: No module named 'requests'
from installscript.
I find a trick for overcome the problem. (i don't have access to github repo, but can download from my account for tar.gz file)
- Run script with enable enterprise option ( just put some made up username passwords when asking by the github login)
2.extra the tar.gz file into /odoo/enterprise folder
3.edit the odoo-server.conf file to point to correct folder location for enterprise addons
4.reboot
5.re-run script without enable enterprise option, reinstall again with same settings
6.re-edit the odoo-server.conf to remove the duplicated server info
7.reboot
8.done
if i stoped at step 4, you won't be able to use the odoo service.
from installscript.
Good catch - the requests
library is missing too for P3.
Fixed in 974c01e
from installscript.
Thank you! I did a new test run from the start and now Odoo 11 Community was working perfectly after script execution.
from installscript.
Hooray! I guess I've missed two dependencies for Python 3 before this. I think this fixes all of the open posts here. If anybody still faces a problem please do post back.
from installscript.
Hello, i try use this script but,
sudo su root -c "echo 'sudo -u $OE_USER $OE_HOME_EXT/openerp-server --config=/etc/${OE_CONFIG}.conf' >> $OE_HOME_EXT/start.sh"
should not make a call to odoo-bin ? (openerp-server)
sudo pip install gdata psycogreen
I am in doubt should I use pip or pip3 here?
Thanks for your great work, in the odoo community.
from installscript.
Another bug,
When you run the script 2 times:
start.sh
gets "double contents".
#!/bin/sh
sudo -u odoo /odoo/odoo-server/openerp-server --config=/etc/odoo-server.conf
#!/bin/sh
sudo -u odoo /odoo/odoo-server/openerp-server --config=/etc/odoo-server.conf
from installscript.
Actually, psychogreen will very soon be removed (odoo/odoo#19976) so I can soon remote it. I'll double check gdata though.
Chris: I'll check that too. I guess I should start fixing issues with running the script twice..
from installscript.
Fixed in 0b8b4d7
from installscript.
Also added two dependencies for enterprise only installations at 7f1d7da
from installscript.
Hello thanks for your great script.
For information I just had issues with 2 missing modules : html2text and buds.client (only when running odoo from pycharm)
from installscript.
Hi @gralet,
Thank you for the feedback!
html2text is in the script at https://github.com/Yenthe666/InstallScript/blob/11.0/odoo_install.sh#L71 so that should work. Buds is no official dependency so this is perhaps pycharm related?
from installscript.
@Yenthe666, A few days ago I ran the v10 script and it went flawlessly. However, I had to trash that image and restart. Now I cannot get the v10 or v11 scripts to complete the install. Using freshly built Digital Ocean Droplet of Ubuntu 16.04.
I just ran the latest script (v11) you posted 7 hours ago. I witnessed the repeated error/notice of "unescaped left brace" during the PostgreSQL-9.5 installation and then, after completion, cannot access the server or start it.
Here is the PostgreSQL error
Setting up postgresql-9.5 (9.5.9-0ubuntu0.16.04) ...Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?<!\)${ <-- HERE ([^}]+)}/ at /usr/sbin/pam_getenv line 78.
Also, pip complains it is not latest:
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
when trying to start the Odoo service, job fails:
root@Odoo10:~# sudo service odoo-server start
Job for odoo-server.service failed because the control process exited with error code. See "systemctl status odoo-server.service" and "journalctl -xe" for details.
What am I missing?
from installscript.
Also, when I run the following as you had suggested on other earlier posts the CLI stops at the blank cursor after the last command.
root@Odoo10:
# sudo service odoo-server stop# cd /odoo/odoo-server
root@Odoo10:
root@Odoo10:/odoo/odoo-server# sudo su odoo
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.odoo@Odoo10:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
HOWEVER, the URL for my server :8069/web/database/selector did now resolve and display the database selection screen. I was able to enter dbase choices and eventually the Apps page of Odoo appeared.
The CLI has still not changed.
from installscript.
@mattolden
What's the output of these commands:
$ systemctl status odoo-server.service
$ journalctl -xe
from installscript.
I have used the script in a vultr ubuntu16.04
doing the pip3 trick and installig jinja2
odoo is not running
Some days ago I completed a succesfull install. Do not remember what I did.
from installscript.
Hmm this proves to be the hardest version to completely tackle so far. What are the latest issues in your logfile @fgarcia-humanoide? What happens when you run the Odoo from the terminal now?
P.S: Thank you to everybody for feedback and comments!
from installscript.
Also running vultr 16.04
Install completes successfully for Enterprise 11 (but with the pip version error)
Service does not appear to be running as cannot connect from browser
Logfile
odoo@guest:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
Traceback (most recent call last):
File "./odoo-bin", line 5, in
import odoo
File "/odoo/odoo-server/odoo/init.py", line 84, in
from . import modules
File "/odoo/odoo-server/odoo/modules/init.py", line 8, in
from . import db, graph, loading, migration, module, registry
File "/odoo/odoo-server/odoo/modules/graph.py", line 10, in
import odoo.tools as tools
File "/odoo/odoo-server/odoo/tools/init.py", line 7, in
from . import pdf
File "/odoo/odoo-server/odoo/tools/pdf.py", line 4, in
from PyPDF2 import PdfFileWriter, PdfFileReader
ImportError: No module named 'PyPDF2'
I upgraded pip, but when trying 'sudo pip3 install jinja2' I get the following error, even though I have apt-get installed python-setuptools:
root@SNG_odoo_test:~# sudo pip3 install jinja2
Collecting jinja2
Using cached Jinja2-2.9.6-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2)
Using cached MarkupSafe-1.0.tar.gz
Could not import setuptools which is required to install from a source distribution.
Please install setuptools.
SERVER STATUS:
root@SNG_odoo_test:~# service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (exited) since Fri 2017-10-13 03:51:10 UTC; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 1088 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
Oct 13 03:51:10 SNG_odoo_test systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 13 03:51:10 SNG_odoo_test odoo-server[1088]: Starting odoo-server: odoo-server.
Oct 13 03:51:10 SNG_odoo_test systemd[1]: Started LSB: Enterprise Business Applications.
from installscript.
Thanks for the feedback. I notice two issues from what you pasted:
from PyPDF2 import PdfFileWriter, PdfFileReader
ImportError: No module named 'PyPDF2'
Could not import setuptools which is required to install from a source distribution.
Please install setuptools.
Can you manually run the commands sudo pip3 install pypdf2
and install setuptools?
If you try to run Odoo again, does it then work?
Regards,
Yenthe
from installscript.
Hi Yenthe,
Thank you for your reply. installed setuptools with pip3 and also pypdf2. Still not working:
odoo@SNG_odoo_test:~/odoo-server$ ./odoo-bin -c /etc/odoo-server.conf
Traceback (most recent call last):
File "./odoo-bin", line 5, in
import odoo
File "/odoo/odoo-server/odoo/init.py", line 84, in
from . import modules
File "/odoo/odoo-server/odoo/modules/init.py", line 8, in
from . import db, graph, loading, migration, module, registry
File "/odoo/odoo-server/odoo/modules/graph.py", line 10, in
import odoo.tools as tools
File "/odoo/odoo-server/odoo/tools/init.py", line 8, in
from .config import config
File "/odoo/odoo-server/odoo/tools/config.py", line 17, in
from passlib.context import CryptContext
ImportError: No module named 'passlib'
from installscript.
@dev-offshorly thanks for the feedback. Now install passlib (sudo pip3 install passlib
should work) - what then?
from installscript.
A few more to install after that one:
babel
werkzeug
lxml
decorator
dateutil
And when trying to install dateutil:
root@SNG_odoo_test:~# sudo pip3 install dateutil
Collecting dateutil
Could not find a version that satisfies the requirement dateutil (from versions: )
No matching distribution found for dateutil
from installscript.
So odd that all of those dependencies go off.. They're pretty much all in the script (https://github.com/Yenthe666/InstallScript/blob/11.0/odoo_install.sh#L71)
the dateutil dependency is sudo pip3 install python-dateutil
from installscript.
Thanks - so more dependancies - yaml, psycopg2, pillow and psutil - stuck again :)
building 'psutil._psutil_linux' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/psutil
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=540 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python3.5m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.5/psutil/_psutil_common.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-__m0x2qc/psutil/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-nr0lfspn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-__m0x2qc/psutil/
root@SNG_odoo_test:~#
from installscript.
@dev-offshorly did you execute this file with all rights and under a root user? It looks like pretty much none of your dependencies went off.. This error seems to be related to the package from psutil
itself though. You might want to look for a newer or older version?
from installscript.
yup, installed all dependencies as root - all worked OK, other than psutil. Will try another version.
Thank you for your assistance
Fixed that hurdle by:
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
Had to run through installing a few more dependancies - but finally up and running !!
Super duper thanks you again !
from installscript.
Awesome, thanks for the tip! I will try as well!!!!
from installscript.
Woha - that was quite a painful proces. π’ I'll check all your dependencies against my script as soon as possible.
from installscript.
After using the script in a clean ubuntu 16.04 (vultr) (now 8:22 14/10/2017)
and
installing manualy all this:
sudo pip3 install jinja2
sudo pip3 install --upgrade pip
sudo pip3 install setuptools
sudo pip3 install requests jinja2 gdata num2words ofxparse
sudo pip3 install pypdf2
sudo pip3 install passlib
sudo pip3 install python-dateutil
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
odoo is not running
after rebooting
odoo is not running
There is no odoo log file
The odoo-server.conf file is:
[options]
; This is the password that allows database operations:
admin_passwd = admin
xmlrpc_port = 8069
logfile = /var/log/odoo/odoo-server
addons_path=/odoo/odoo-server/addons,/odoo/custom/addons
Odoo is installed, the odoo user exists, postgresql is running
ODOO IS IN THE SUDOERS GROUP, ΒΏIS IT NECCESARY?
Thank you very much
from installscript.
Doing systemctl status odoo-server.service
root@odoo11:~# systemctl status odoo-server.service
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (exited) since Sat 2017-10-14 06:30:16 UTC; 10min ago
Docs: man:systemd-sysv-generator(8)
Process: 5174 ExecStop=/etc/init.d/odoo-server stop (code=exited, status=0/SUCCESS)
Process: 5179 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
Oct 14 06:30:16 odoo11 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 14 06:30:16 odoo11 odoo-server[5179]: Starting odoo-server: odoo-server.
Oct 14 06:30:16 odoo11 systemd[1]: Started LSB: Enterprise Business Applications.
root@odoo11:~#
from installscript.
doing journalctl -xe
root@odoo11:~# journalctl -xe
Oct 14 06:39:04 odoo11 sshd[5836]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:39:06 odoo11 sshd[5836]: Failed password for root from 113.195.145.21 port 55832 ssh2
Oct 14 06:39:08 odoo11 sshd[5836]: Failed password for root from 113.195.145.21 port 55832 ssh2
Oct 14 06:39:11 odoo11 sshd[5836]: Failed password for root from 113.195.145.21 port 55832 ssh2
Oct 14 06:39:11 odoo11 sshd[5836]: Received disconnect from 113.195.145.21 port 55832:11: [preauth]
Oct 14 06:39:11 odoo11 sshd[5836]: Disconnected from 113.195.145.21 port 55832 [preauth]
Oct 14 06:39:11 odoo11 sshd[5836]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:39:50 odoo11 sshd[5866]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:39:51 odoo11 sshd[5866]: Failed password for root from 113.195.145.21 port 21402 ssh2
Oct 14 06:39:54 odoo11 sshd[5866]: Failed password for root from 113.195.145.21 port 21402 ssh2
Oct 14 06:39:56 odoo11 sshd[5866]: Failed password for root from 113.195.145.21 port 21402 ssh2
Oct 14 06:39:57 odoo11 sshd[5866]: Received disconnect from 113.195.145.21 port 21402:11: [preauth]
Oct 14 06:39:57 odoo11 sshd[5866]: Disconnected from 113.195.145.21 port 21402 [preauth]
Oct 14 06:39:57 odoo11 sshd[5866]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:40:27 odoo11 sshd[5879]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:40:29 odoo11 sshd[5879]: Failed password for root from 113.195.145.21 port 16946 ssh2
Oct 14 06:40:32 odoo11 sshd[5879]: Failed password for root from 113.195.145.21 port 16946 ssh2
Oct 14 06:40:34 odoo11 sshd[5879]: Failed password for root from 113.195.145.21 port 16946 ssh2
Oct 14 06:40:34 odoo11 sshd[5879]: Received disconnect from 113.195.145.21 port 16946:11: [preauth]
Oct 14 06:40:34 odoo11 sshd[5879]: Disconnected from 113.195.145.21 port 16946 [preauth]
Oct 14 06:40:34 odoo11 sshd[5879]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:41:01 odoo11 ntpd[1141]: 132.163.4.101 local addr 45.32.146.229 -> <null>
Oct 14 06:41:05 odoo11 sshd[5889]: Invalid user ts from 101.95.6.2
Oct 14 06:41:05 odoo11 sshd[5889]: input_userauth_request: invalid user ts [preauth]
Oct 14 06:41:05 odoo11 sshd[5889]: pam_unix(sshd:auth): check pass; user unknown
Oct 14 06:41:05 odoo11 sshd[5889]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=101.95.6.2
Oct 14 06:41:07 odoo11 sshd[5889]: Failed password for invalid user ts from 101.95.6.2 port 58377 ssh2
Oct 14 06:41:08 odoo11 sshd[5889]: pam_unix(sshd:auth): check pass; user unknown
Oct 14 06:41:09 odoo11 sshd[5902]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:41:09 odoo11 sshd[5889]: Failed password for invalid user ts from 101.95.6.2 port 58377 ssh2
Oct 14 06:41:10 odoo11 sshd[5889]: pam_unix(sshd:auth): check pass; user unknown
Oct 14 06:41:11 odoo11 sshd[5902]: Failed password for root from 113.195.145.21 port 48552 ssh2
Oct 14 06:41:11 odoo11 sshd[5889]: Failed password for invalid user ts from 101.95.6.2 port 58377 ssh2
Oct 14 06:41:12 odoo11 sshd[5889]: Connection closed by 101.95.6.2 port 58377 [preauth]
Oct 14 06:41:12 odoo11 sshd[5889]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=101.95.6.2
Oct 14 06:41:14 odoo11 sshd[5902]: Failed password for root from 113.195.145.21 port 48552 ssh2
Oct 14 06:41:16 odoo11 sshd[5902]: Failed password for root from 113.195.145.21 port 48552 ssh2
Oct 14 06:41:17 odoo11 sshd[5902]: Received disconnect from 113.195.145.21 port 48552:11: [preauth]
Oct 14 06:41:17 odoo11 sshd[5902]: Disconnected from 113.195.145.21 port 48552 [preauth]
Oct 14 06:41:17 odoo11 sshd[5902]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:41:54 odoo11 sshd[5930]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:41:57 odoo11 sshd[5930]: Failed password for root from 113.195.145.21 port 53313 ssh2
Oct 14 06:41:59 odoo11 sshd[5930]: Failed password for root from 113.195.145.21 port 53313 ssh2
Oct 14 06:42:01 odoo11 sshd[5930]: Failed password for root from 113.195.145.21 port 53313 ssh2
Oct 14 06:42:01 odoo11 sshd[5930]: Received disconnect from 113.195.145.21 port 53313:11: [preauth]
Oct 14 06:42:01 odoo11 sshd[5930]: Disconnected from 113.195.145.21 port 53313 [preauth]
Oct 14 06:42:01 odoo11 sshd[5930]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=113.195.145.21 user=root
Oct 14 06:42:06 odoo11 sshd[5948]: Received disconnect from 185.165.29.197 port 40824:11: Bye Bye [preauth]
Oct 14 06:42:06 odoo11 sshd[5948]: Disconnected from 185.165.29.197 port 40824 [preauth]
lines 2411-2459/2459 (END)
root@odoo11:~#
from installscript.
I want odoo CE
ΒΏDoes it mean the script tries to install odoo enterprise without license?
from installscript.
I want odoo CE. ΒΏDoes it mean the script tries to install odoo enterprise without license?
- The
odoo_install.sh
script will install Odoo 11.0 CE by default.
# Set this to True if you want to install Odoo 11 Enterprise!
IS_ENTERPRISE="False"
ODOO IS IN THE SUDOERS GROUP, ΒΏIS IT NECCESARY?
- I think the script should make a final step to remove
odoo
user from thesudoers
group.
@Yenthe666 what's your opinion?
from installscript.
Yep, I agree. From a security perspective this is not good. I just have to test everything without sudo to be sure it has no long term issues or complications.
from installscript.
@Yenthe666
Yes. It seems the odoo-server
service, as a web application, should only require the following privileges:
- access to its home folder,
/odoo/odoo-server
, to create read update and delete files, which it already has, as a normal user, - ability to connect to
postgresql
as a normal user or database admin user, which it already has, correct?, - ability to listen on a user socket (port greater than 1024), which it already has.
So, probably theodoo-server
service would run fine under the userodoo
without membership in thesudoer
group. Unless there's something it needs to do which requires system administrative rights. The odoo documentation should say if the web app service requires admin rights.
from installscript.
I have tried using this script a few different ways and still no success on Google cloud.
I have used a Ubuntu 16 and 17 with no luck, each time I deleted the Image and started with a fresh server and I can not see anything when I go to the public IP. I have tried both with Http and Https. I have even tried changing the PORT to 80 and 443 - still no luck.
It says Odoo is running but can not access it at all.
So the question is will this work on Google Cloud or not?
from installscript.
- If you have a google cloud test account to share, maybe @Yenthe666 could test the odoo installer script on there and see if it fails.
- Try these:
service odoo-server status
netstat -lp | grep python3
from installscript.
Exactly! I haven't ever tried it on a google cloud environment and don't have one available so I can't say if it will or will not work.
Do have a look at your logfile sudo nano /var/log/odoo/your-odoo-server.log
to see what issues are in there at the end. If it is a dependency missing problem it'll be logged here.
from installscript.
I have created a new Project to test this process - I will just need an account to share it with you. I will create both a Ubuntu 16 and 17 VM. Just send me your Google account email to share the project with. I have commented on your site before so you should have my email.
from installscript.
service odoo-server status
β odoo-server.service - LSB: Enterprise Business Applications
Loaded: loaded (/etc/init.d/odoo-server; bad; vendor preset: enabled)
Active: active (running) since Thu 2017-10-19 19:01:37 UTC; 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 26079 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)
Tasks: 3
Memory: 44.6M
CPU: 591ms
CGroup: /system.slice/odoo-server.service
ββ26086 python3 /odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf
Oct 19 19:01:37 odoo-ubuntu-16 systemd[1]: Starting LSB: Enterprise Business Applications...
Oct 19 19:01:37 odoo-ubuntu-16 odoo-server[26079]: Starting odoo-server: odoo-server.
Oct 19 19:01:37 odoo-ubuntu-16 systemd[1]: Started LSB: Enterprise Business Applications.
netstat -lp | grep python3
tcp 0 0 *:8069 : LISTEN 26026/python3
from installscript.
@ShaneNZaXiS @Yenthe666
It looks like odoo is listening only on the IPv4 address.
Maybe the reason for it not working, is it needs to listen also on the IPv6 address.
from installscript.
I used the script for version 10 and that worked. Will Odoo 11 only work on IPV6?
Shane
from installscript.
Hmm, if it worked for V10 it should also work for V11 (both should work fine on IPV4).
@ShaneNZaXiS you can e-mail me on [email protected] - I'll give my private gmail from there.
from installscript.
@ShaneNZaXiS @Yenthe666
It appears odoo is listening only on the IPv4 interface.
Some modern cloud servers are receiving your incoming request to view odoo home page, on its IPv6 interface only.
So this COULD explain why odoo isn't working - it listens only on IPv4 - and your request is coming in on IPv6.
To find out for sure, modify odoo config to have odoo listen on BOTH IPv4 and IPv6 interfaces - and odoo just might work.
from installscript.
@ShaneNZaXiS @Yenthe666 @dev-offshorly @khansch @fgarcia-humanoide
My pull request #62 probably fixes your bugs.
Many python3 packages which Odoo requires to run smoothly, were missing. This pull request installs them.
Please try it.
from installscript.
A whole lot of open issues (such as missing packages for P3) have been fixed in c908b37 and c4c69b1 - I encourage all of you to manually install these packages to be fully fine. Keep an eye out on #62 as there are still some points that need clarification or work.
I believe the added missing dependencies should close all open reports though.
As this thread has grown quite big I encourage all of you to create a new topic if a new bug or issue pops up.
Regards,
Yenthe
from installscript.
Exception in thread odoo.service.httpd:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 253, in http_thread
self.httpd = ThreadedWSGIServerReloadable(self.interface, self.port, app)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 106, in init
handler=RequestHandler)
File "/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py", line 562, in init
HTTPServer.init(self, (host, int(port)), handler)
File "/usr/lib/python3.5/socketserver.py", line 440, in init
self.server_bind()
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 116, in server_bind
super(ThreadedWSGIServerReloadable, self).server_bind()
File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
2017-12-30 03:08:56,660 19209 INFO ? odoo.addons.base.ir.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
Exception in thread odoo.service.cron.cron0:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo-11.0/odoo/modules/module.py", line 82, in load_module
exec(open(modfile, 'rb').read(), new_mod.dict)
File "", line 4, in
File "/opt/odoo/odoo-11.0/odoo/addons/base/ir/init.py", line 19, in
from . import ir_mail_server
File "/opt/odoo/odoo-11.0/odoo/addons/base/ir/ir_mail_server.py", line 16, in
import html2text
ImportError: No module named 'html2text'
Exception in thread odoo.service.cron.cron1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 244, in target
self.cron_thread(i)
File "/opt/odoo/odoo-11.0/odoo/service/server.py", line 218, in cron_thread
from odoo.addons.base.ir.ir_cron import ir_cron
File "/opt/odoo/odoo-11.0/odoo/addons/base/ir/init.py", line 19, in
from . import ir_mail_server
File "/opt/odoo/odoo-11.0/odoo/addons/base/ir/ir_mail_server.py", line 16, in
import html2text
ImportError: No module named 'html2text'
I can't run odoo service
from installscript.
@wasify
Try it again with the newest version of this install script:
wget https://github.com/chris001/InstallScript/raw/patch-2/odoo_install.sh
chmod +x odoo_install.sh
./odoo_install.sh --help
./odoo_install.sh
from installscript.
Related Issues (20)
- after odoo 15 to 16 database migration error is coming psycopg2.errors.InvalidDatetimeFormat: invalid input syntax for type timestamp: "" HOT 2
- AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- the script can't point my domain to the machine in contabo HOT 2
- Having problem when install with python3.10 HOT 1
- [10.0] pip2 and pip requirements missing HOT 1
- I want to add a translation HOT 2
- Some necessary changes to the odoo_install_debian.sh
- 17.0 on Ubuntu 22.04 HOT 8
- Instructions in script don't align with instructions in readme HOT 2
- Installation Error - AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- Odoo17 on ubuntu 22.04 error HOT 12
- The SSL script causes (refused to connect) after the installation HOT 1
- Ubuntu 22.04 Odoo17 wkhtml issue HOT 6
- Odoo v16 - Error on apt update after installation on ubuntu 22.04. + Proposed solution
- Hide database manager HOT 4
- websocket issue
- invoice header and footer issue HOT 1
- odoo-server.conf has only few lines ?? HOT 1
- auto_backup V16 (Yenthe/OCA)
- Scripted installation fails on Debian GNU/Linux 11 (bullseye) - service status active(exited) - Logs Empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from installscript.