Unable to Run Odoo Service at Ubuntu 16.04 - configuration

I am new to ubuntu but with the help of this tutorial , i am trying to run Odoo 11 from its source code .While i tried to run this command
sudo systemctl start odoo.service
And after that while i tried to check status of my service using command
sudo systemctl status odoo.service
then its replies in the Console
odoo.service - Odoo Open Source ERP and CRM
Loaded: loaded (/lib/systemd/system/odoo.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-03-29 15:28:38 PKT; 7s ago
Process: 4072 ExecStart=/opt/odoo/odoo-bin --config=/etc/odoo-server.conf --addons-path=/opt/odoo/addons/ (code=exited, status=1/FAILURE)
Main PID: 4072 (code=exited, status=1/FAILURE)
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/modules/graph.py", line 10, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: import odoo.tools as tools
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/tools/__init__.py", line 7, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: from . import pdf
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: File "/opt/odoo/odoo/tools/pdf.py", line 4, in <module>
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: from PyPDF2 import PdfFileWriter, PdfFileReader
Mar 29 15:28:38 hassan-Latitude-E6420 odoo-server[4072]: ImportError: No module named 'PyPDF2'
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Main process exited, code=exited, status=1/FAILURE
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Unit entered failed state.
Mar 29 15:28:38 hassan-Latitude-E6420 systemd[1]: odoo.service: Failed with result 'exit-code'.
But i had installed PyPDF2 Module already.

There was no issue with my service . I haven't installed Python module using pip3 package manager.So that's why python base modules wasn't available. So i simply install pip3 using command
pip install python3-pip
And then again started my odoo service using command
sudo systemctl start odoo
Finally it started working like charm.

Related

ERROR: got error when setting up GCP MySQL server

Here is my steps that can replicate:
Compute Engine Creation:
1.select F1-Micro instance.
2.Select Ubuntu 20.04 LTS Minimal.
Install:
$sudo apt-get update
$sudo apt-get install mysql-server
My question is how can I get no error when setting up MySQL server in GCP?
Here is the error:
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: activating (start-pre) since Fri 2021-01-29 20:58:52 UTC; 3s ago
Cntrl PID: 2338 (mysql-systemd-s)
Tasks: 1 (limit: 682)
Memory: 1.7M
CGroup: /system.slice/mysql.service
├─2338 /bin/bash /usr/share/mysql/mysql-systemd-start pre
├─2356 /bin/bash /usr/share/mysql/mysql-systemd-start pre
├─2357 /bin/bash /usr/share/mysql/mysql-systemd-start pre
├─2358 [my_print_defaul]
├─2359 sed -n s/^--datadir=//p
└─2360 tail -n 1
Jan 29 20:58:49 instance-1 systemd[1]: mysql.service: Killing process 2233 (mysqld) with signal SIGKILL.
Jan 29 20:58:51 instance-1 systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Jan 29 20:58:51 instance-1 systemd[1]: mysql.service: Failed with result 'timeout'.
Jan 29 20:58:51 instance-1 systemd[1]: Failed to start MySQL Community Server.
Jan 29 20:58:52 instance-1 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Jan 29 20:58:52 instance-1 systemd[1]: Stopped MySQL Community Server.
Jan 29 20:58:52 instance-1 systemd[1]: Starting MySQL Community Server...
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Setting up libcgi-pm-perl (4.46-1) ...
Setting up libhtml-template-perl (2.97-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Setting up libcgi-fast-perl (1:2.15-1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processin
g triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Errors were encountered while processing:
mysql-server-8.0
mysql-server```

Sonarqube setup in Ubuntu

Trying to setup Sonarqube in Ubuntu 18.04 (on Ec2) using mysql, Went thru this digital Ocean tutorial
But after all that sudo service sonarqube start errors out:
ubuntu#ip-:/opt/sonarqube$ sudo service sonarqube start
Job for sonarqube.service failed because the control process exited with error code.
See "systemctl status sonarqube.service" and "journalctl -xe" for details.
ubuntu#ip-:/opt/sonarqube$ systemctl status sonarqube.service
sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; disabled; vendor prese
Active: failed (Result: exit-code) since Fri 2019-10-04 16:45:33 UTC; 1min 43
Process: 11036 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start (code=
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: sonarqube.service: Control process
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: sonarqube.service: Failed with resu
Oct 04 16:45:32 ip-172-31-41-243 systemd[1]: Failed to start SonarQube service.
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Service hold-off
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Scheduled restar
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: Stopped SonarQube service.
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Start request re
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: sonarqube.service: Failed with resu
Oct 04 16:45:33 ip-172-31-41-243 systemd[1]: Failed to start SonarQube service.
Tried another tutorial and with different version of sonarqube and different DB - same result. Is there a resource requirement (memory) for sonarqube - I am deploying on EC2 t2.micro - 8GB - assuming that should be enough?
Tried /opt/sonarqube/bin/linux-x86-64/sonar.sh start this gives error:
Syntax error: newline unexpected (expecting ")"). I had Not edited the sonar.sh file
SonarQube Docker
Tried going Docker route - did not work.
Connection refused on port 9000. I have TCP/9000 opened in the Security Group and NACL is all open.
http://IP:9000 This site can’t be reached x.x.x.x refused to connect
I had a similar issue. Mine was caused by an extra white space in the systemctl service config file. I suggest you check properly, or delete and recreate the service file. More carefully this time.

ERROR 2006 (HY000): MySQL server has gone away & conflict with max_allowed_packet

I wanted to import a sql dump
mysql -u username mydb < file.sql
And of course i get the classic ERROR 2006 (HY000) at line 1701: MySQL server has gone away message. No big deal i know that i need to increase the packet size. So i edit the /etc/mysql/mysql.cnf file and add the line max_allowed_packet=64M. But when i try to start the mysql server i get an error.
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-01-21 16:27:47 CET; 15s ago
Process: 9151 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
Process: 9112 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 27620 (code=exited, status=0/SUCCESS)
Jan 21 16:27:47 aleksandar-pc systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Jan 21 16:27:47 aleksandar-pc systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jan 21 16:27:47 aleksandar-pc systemd[1]: Stopped MySQL Community Server.
Jan 21 16:27:47 aleksandar-pc systemd[1]: mysql.service: Start request repeated too quickly.
Jan 21 16:27:47 aleksandar-pc systemd[1]: mysql.service: Failed with result 'exit-code'.
If i remove the code added for packets, the server can be started normally.
Can anyone help me with this, i really need to import this large db and don't know how to fix this mysql error.
Mysql verison: Ver 14.14 Distrib 5.7.25, for Linux (x86_64)
Linux: Ubuntu 18.04 LTS
Ok i forgot this [mysqld] above:
[mysqld]
max_allowed_packet=128M

How to configure gammu-smsd with mysql

I'm trying to start the gammu sms service, when I run it with simple archives, it runs fine, but when I try to run it with the mysql database, it shows this error:
Error code: 2002, Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The restart gammu-sms, show this message:
user2#Lubuntu18:~$ service gammu-smsd restart
user2#Lubuntu18:~$ service gammu-smsd status
● gammu-smsd.service - SMS daemon for Gammu
Loaded: loaded (/lib/systemd/system/gammu-smsd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2018-08-18 20:55:21 -04; 2min 52s ago
Docs: man:gammu-smsd(1)
Process: 19001 ExecStopPost=/bin/rm -f /var/run/gammu-smsd.pid (code=exited, status=0/SUCCESS)
Process: 18999 ExecStart=/usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon (code=exited, status=0/SUCCESS)
Main PID: 19000 (code=exited, status=2)
ago 18 20:55:21 Lubuntu18 systemd[1]: Starting SMS daemon for Gammu...
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Can't open PID file /var/run/gammu-smsd.pid (yet?) after start: No s
ago 18 20:55:21 Lubuntu18 systemd[1]: Started SMS daemon for Gammu.
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Failed with result 'exit-code'.
The log file gammu smsd show this:
Sat 2018/08/18 20:55:21 gammu-smsd[19000]: Error connecting to database!
Sat 2018/08/18 20:55:21 gammu-smsd[19000]: Error code: 2002, Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Sat 2018/08/18 20:55:21 gammu-smsd[19000]: Initialisation failed, stopping Gammu smsd: Database connection timeout. (DB_TIMEOUT[78])
Sat 2018/08/18 20:55:21 gammu-smsd[19000]: Stopping Gammu smsd: Sin error. (NONE[1])
Docs: man:gammu-smsd(1)
Process: 19001 ExecStopPost=/bin/rm -f /var/run/gammu-smsd.pid (code=exited, status=0/SUCCESS)
Process: 18999 ExecStart=/usr/bin/gammu-smsd --pid=/var/run/gammu-smsd.pid --daemon (code=exited, status=0/SUCCESS)
Main PID: 19000 (code=exited, status=2)
ago 18 20:55:21 Lubuntu18 systemd[1]: Starting SMS daemon for Gammu...
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Can't open PID file /var/run/gammu-smsd.pid (yet?) after start: No s
ago 18 20:55:21 Lubuntu18 systemd[1]: Started SMS daemon for Gammu.
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
ago 18 20:55:21 Lubuntu18 systemd[1]: gammu-smsd.service: Failed with result 'exit-code'.
The /etc/gammu-smsdrc is:
# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
[gammu]
device = /dev/ttyUSB0
name = USB Qualcomm__Incorporated Qualcomm_CDMA_Technologies_MSM
connection = at
logfile = /home/ruser2/gammu.log
logformat = textall
# SMSD configuration, see gammu-smsdrc(5)
[smsd]
runonreceive = /opt/lampp/htdocs/kalkun/scripts/daemon.sh
service = sql
Driver = native_mysql
PIN= 1234
logfile = /home/user2/gammusmsd.log
# Increase for debugging information
debuglevel = 0
user = kalkun
password = kalkun
pc = localhost
database = kalkun
I use Lubuntu:
18.04
xampp 5.6.30
PHP Version 5.6.23
Any idea to help me? thanks a lot
Your user has no permission, you started as user2#Lubuntu18.
Try to start gammu-smsd as root, or add permission dialout to user2.
sudo gammu-smsd -d --user gammu --group dialout

mysql randomly stopped working

hi my mysql was working i did nothing on it then today when i went to login to multicraft it gave me error 500 which means theres an issue with mysql and i tried to do $service mysql restart it didnt work so i did $service mysql status and i got this error
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Wed 2016-01-27 16:39:39 CET; 24min >ago
Process: 27320 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 28147 ExecStart=/etc/init.d/mysql start (code=exited, >status=1/FAILURE)
Jan 27 16:39:39 ns3317389.ip-37-59-14.eu systemd[1]: Starting LSB: Start and >sto...
Jan 27 16:39:39 ns3317389.ip-37-59-14.eu mysql[28147]: /etc/init.d/mysql: >ERROR:...
Jan 27 16:39:39 ns3317389.ip-37-59-14.eu systemd[1]: mysql.service: control >proc...
Jan 27 16:39:39 ns3317389.ip-37-59-14.eu systemd[1]: Failed to start LSB: Start >...
Jan 27 16:39:39 ns3317389.ip-37-59-14.eu systemd[1]: Unit mysql.service entered >...
Hint: Some lines were ellipsized, use -l to show in full.
look in your /var/log/mysql/*.log logs
try to start mysql on the commandline
Example:
as root user: mysqld --console