Compare commits
No commits in common. "main" and "master" have entirely different histories.
@ -1,5 +1,5 @@
|
||||
name: pulumi4
|
||||
description: pulumi
|
||||
name: faten
|
||||
description: faten
|
||||
runtime:
|
||||
name: python
|
||||
options:
|
||||
|
142
__main__.py
142
__main__.py
@ -1,82 +1,80 @@
|
||||
import pulumi
|
||||
import pulumi_docker as docker
|
||||
import json
|
||||
import os
|
||||
|
||||
# Load the configuration from the JSON file
|
||||
with open('config.json') as f:
|
||||
config_data = json.load(f)
|
||||
# Charger le fichier de configuration JSON
|
||||
try:
|
||||
with open("config.json", "r") as f:
|
||||
containers_data = json.load(f)
|
||||
except FileNotFoundError:
|
||||
raise Exception("Error: 'config.json' file not found.")
|
||||
|
||||
# Create a Docker network
|
||||
network = docker.Network("testNetwork")
|
||||
# Créer le réseau
|
||||
try:
|
||||
network = docker.Network("testNetwork")
|
||||
pulumi.export("network", network.name)
|
||||
except Exception as e:
|
||||
pulumi.log.error(f"Failed to create network: {e}")
|
||||
network = None
|
||||
|
||||
# Initialize the containers list
|
||||
containers = []
|
||||
# Créer les volumes
|
||||
volumes = {}
|
||||
for container in containers_data.get("containers", []):
|
||||
for volume in container.get("volumes", []):
|
||||
try:
|
||||
if "volume_name" in volume and volume["volume_name"] not in volumes:
|
||||
volumes[volume["volume_name"]] = docker.Volume(volume["volume_name"])
|
||||
except Exception as e:
|
||||
pulumi.log.error(f"Failed to create volume {volume.get('volume_name')}: {e}")
|
||||
|
||||
pulumi.export("volumes", {name: vol.name for name, vol in volumes.items()})
|
||||
|
||||
# Initialize the URL dictionary for export
|
||||
urls = {}
|
||||
|
||||
# Create containers based on the configuration
|
||||
for container in config_data["containers"]:
|
||||
container_name = container["name"]
|
||||
container_envs = [f"{key}={value}" for key, value in container.get("env", {}).items()]
|
||||
|
||||
# Create the container
|
||||
docker_container = docker.Container(
|
||||
container_name,
|
||||
name=container_name,
|
||||
image=container["image"],
|
||||
envs=container_envs,
|
||||
ports=[docker.ContainerPortArgs(
|
||||
internal=port["internal"],
|
||||
external=port["external"]
|
||||
) for port in container["ports"]],
|
||||
network_mode=network.name,
|
||||
command=container.get("command", None) or container.get("entrypoint", None),
|
||||
##container.get("entrypoint", "/usr/local/bin/entrypoint.sh")
|
||||
# Créer les conteneurs
|
||||
for container in containers_data.get("containers", []):
|
||||
instances = container.get("instances", 1)
|
||||
for i in range(instances):
|
||||
container_name = f"{container['name']}-{i}" if instances > 1 else container["name"]
|
||||
|
||||
volumes=[docker.ContainerVolumeArgs(
|
||||
host_path=vol["host_path"],
|
||||
container_path=vol["container_path"]
|
||||
) for vol in container.get("volumes", [])]
|
||||
)
|
||||
containers.append(docker_container)
|
||||
# Configurer les volumes
|
||||
volumes_config = []
|
||||
try:
|
||||
if "volumes" in container:
|
||||
volumes_config = [
|
||||
docker.ContainerVolumeArgs(
|
||||
container_path=volume["container_path"],
|
||||
volume_name=volumes[volume["volume_name"]].name
|
||||
) if "volume_name" in volume else
|
||||
docker.ContainerVolumeArgs(
|
||||
container_path=volume["container_path"],
|
||||
host_path=os.path.abspath(volume["host_path"])
|
||||
)
|
||||
for volume in container["volumes"]
|
||||
]
|
||||
except KeyError as e:
|
||||
pulumi.log.warn(f"Missing key in volume configuration: {e}")
|
||||
except Exception as e:
|
||||
pulumi.log.error(f"Error configuring volumes for container {container_name}: {e}")
|
||||
|
||||
# Add the URLs for the container
|
||||
for port in container["ports"]:
|
||||
urls[f"{container_name}_url"] = f"http://localhost:{port['external']}"
|
||||
|
||||
# Scale Prometheus containers
|
||||
for i in range(config_data.get("prometheus_scale", 1)): # Default to 1 if not specified
|
||||
prometheus_instance = docker.Container(
|
||||
f"prometheus-instance-{i}",
|
||||
name=f"prometheus-{i}",
|
||||
image="prom/prometheus:latest",
|
||||
ports=[docker.ContainerPortArgs(internal=9090, external=9090 + i)],
|
||||
network_mode=network.name
|
||||
)
|
||||
containers.append(prometheus_instance)
|
||||
|
||||
# Add the Prometheus URLs
|
||||
urls[f"prometheus_{i}_url"] = f"http://localhost:{9090 + i}"
|
||||
|
||||
# Scale Fluentd containers
|
||||
fluentd_scale = config_data.get("fluentd_scale", 1) # Default to 1 if not specified
|
||||
|
||||
for i in range(fluentd_scale): # This will scale based on the value from config_data
|
||||
fluentd_instance = docker.Container(
|
||||
f"fluentd-instance-{i}",
|
||||
name=f"fluentd-{i}",
|
||||
image="fluent/fluentd:v1.14-1", # Corrected image name
|
||||
ports=[docker.ContainerPortArgs(internal=24224, external=24224 + i)], # Assign unique external port for each container
|
||||
network_mode=network.name
|
||||
)
|
||||
containers.append(fluentd_instance)
|
||||
|
||||
# Add the Fluentd URLs
|
||||
urls[f"fluentd_{i}_url"] = f"http://localhost:{24224 + i}"
|
||||
|
||||
# Export network and container details
|
||||
pulumi.export("network_name", network.name)
|
||||
pulumi.export("containers", [c.name for c in containers])
|
||||
pulumi.export("urls", urls)
|
||||
# Créer le conteneur
|
||||
try:
|
||||
container_resource = docker.Container(
|
||||
container_name,
|
||||
image=container["image"],
|
||||
envs=[f"{key}={value}" for key, value in container.get("envs", {}).items()] if "envs" in container else [],
|
||||
ports=[docker.ContainerPortArgs(
|
||||
internal=port["internal"],
|
||||
external=port["external"] + i
|
||||
) for port in container.get("ports", [])
|
||||
] if "ports" in container else [],
|
||||
volumes=volumes_config,
|
||||
network_mode=network.name if network else None,
|
||||
command=container.get("command", []),
|
||||
)
|
||||
ports = container.get("ports", [])
|
||||
if ports:
|
||||
for port in ports:
|
||||
external_port = port["external"] + i
|
||||
pulumi.export(f"{container_name}_url", f"http://localhost:{external_port}")
|
||||
except Exception as e:
|
||||
pulumi.log.error(f"Failed to create container {container_name}: {e}")
|
||||
|
151
config.json
151
config.json
@ -1,51 +1,108 @@
|
||||
{
|
||||
"containers": [
|
||||
{
|
||||
"name": "postgres",
|
||||
"image": "postgres:16.5",
|
||||
"env": {
|
||||
"POSTGRES_USER": "odoo",
|
||||
"POSTGRES_PASSWORD": "odoo",
|
||||
"POSTGRES_DB": "postgres",
|
||||
"POSTGRES_HOST_AUTH_METHOD": "trust"
|
||||
},
|
||||
"ports": [
|
||||
{"internal": 5432, "external": 5432}
|
||||
],
|
||||
"volumes": [
|
||||
{"host_path": "/local/path/postgresql/data", "container_path": "/var/lib/postgresql/data"}
|
||||
]
|
||||
"containers": [
|
||||
{
|
||||
"name": "db",
|
||||
"image": "postgres:latest",
|
||||
"envs": {
|
||||
"POSTGRES_DB": "admin",
|
||||
"POSTGRES_USER": "admin",
|
||||
"POSTGRES_PASSWORD": "admin"
|
||||
},
|
||||
{
|
||||
"name": "odoo",
|
||||
"image": "odoo:latest",
|
||||
"env": {
|
||||
"HOST": "postgres",
|
||||
"USER": "odoo",
|
||||
"PASSWORD": "odoo",
|
||||
"DATABASE": "postgres",
|
||||
"ODOO_PASSWORD": "admin"
|
||||
},
|
||||
"ports": [
|
||||
{"internal": 8069, "external": 8069}
|
||||
],
|
||||
"command": [
|
||||
"/bin/bash", "-c", "until pg_isready -h postgres -U odoo; do echo 'Waiting for PostgreSQL...'; sleep 2; done; odoo -i base"
|
||||
]
|
||||
"ports": [{"internal": 5432, "external": 5432}],
|
||||
"volumes": [
|
||||
{
|
||||
"container_path": "/var/lib/postgresql/data",
|
||||
"volume_name": "postgres-data"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "postgres_exporter",
|
||||
"image": "wrouesnel/postgres_exporter:latest",
|
||||
"envs": {
|
||||
"DATA_SOURCE_NAME": "postgresql://admin:admin@db:5432/admin?sslmode=disable"
|
||||
},
|
||||
{
|
||||
"name": "grafana",
|
||||
"image": "grafana/grafana:latest",
|
||||
"env": {
|
||||
"GF_SECURITY_ADMIN_PASSWORD": "grafana_pwd",
|
||||
"GF_DATASOURCES_PROMETHEUS_URL": "http://prometheus:9090"
|
||||
"ports": [{"internal": 9187, "external": 9187}]
|
||||
},
|
||||
{
|
||||
"name": "odoo",
|
||||
"image": "odoo:16.0",
|
||||
"envs": {
|
||||
"HOST": "db",
|
||||
"USER": "admin",
|
||||
"PASSWORD": "admin",
|
||||
"DATABASE": "admin",
|
||||
"ODOO_PASSWORD": "admin"
|
||||
},
|
||||
"ports": [{"internal": 8069, "external": 8069}],
|
||||
"instances": 2,
|
||||
"volumes": [
|
||||
{
|
||||
"container_path": "/var/log/odoo",
|
||||
"host_path": "./odoo_logs"
|
||||
}
|
||||
],
|
||||
"command": ["/bin/bash", "-c", "sleep 10 && /usr/bin/odoo --logfile=/var/log/odoo/odoo.log -i base"]
|
||||
},
|
||||
{
|
||||
"name": "grafana",
|
||||
"image": "grafana/grafana:latest",
|
||||
"envs": {
|
||||
"GF_SECURITY_ADMIN_PASSWORD": "grafana_pwd",
|
||||
"GF_DATASOURCES_PROMETHEUS_URL": "http://prometheus:9090"
|
||||
},
|
||||
"ports": [{"internal": 3000, "external": 3000}],
|
||||
"instances": 2
|
||||
},
|
||||
{
|
||||
"name": "prometheus",
|
||||
"image": "prom/prometheus:latest",
|
||||
"ports": [{"internal": 9090, "external": 9090}],
|
||||
"volumes": [
|
||||
{
|
||||
"container_path": "/prometheus",
|
||||
"volume_name": "prometheus-data"
|
||||
},
|
||||
"ports": [
|
||||
{"internal": 3000, "external": 3000}
|
||||
]
|
||||
}
|
||||
],
|
||||
"prometheus_scale": 2,
|
||||
"fluentd_scale": 2
|
||||
}
|
||||
|
||||
{
|
||||
"container_path": "/etc/prometheus/prometheus.yml",
|
||||
"host_path": "./prometheus.yml"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fluentd",
|
||||
"image": "fluent/fluentd:v1.13-1",
|
||||
"ports": [{"internal": 24224, "external": 24224}],
|
||||
"volumes": [
|
||||
{
|
||||
"container_path": "/fluentd/etc/fluent.conf",
|
||||
"host_path": "./fluent.conf"
|
||||
},
|
||||
{
|
||||
"container_path": "/var/log/odoo",
|
||||
"host_path": "./odoo_logs"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "backup",
|
||||
"image": "alpine:latest",
|
||||
"envs": {
|
||||
"POSTGRES_HOST": "db",
|
||||
"POSTGRES_DB": "admin",
|
||||
"POSTGRES_USER": "admin",
|
||||
"POSTGRES_PASSWORD": "admin"
|
||||
},
|
||||
"command": [
|
||||
"/bin/sh", "-c",
|
||||
"apk add --no-cache postgresql-client && sleep 10"
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"container_path": "/backup",
|
||||
"volume_name": "backup-data"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
# Wait for PostgreSQL to be ready
|
||||
until pg_isready -h $HOST -U $USER; do
|
||||
echo "Waiting for PostgreSQL..."
|
||||
sleep 2
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
until pg_isready -h db -U admin; do
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
sleep 10
|
||||
done
|
||||
|
||||
odoo -i base
|
||||
exec "$@"
|
||||
|
24
fluent.conf
Normal file
24
fluent.conf
Normal file
@ -0,0 +1,24 @@
|
||||
<source>
|
||||
@type forward
|
||||
port 24224 # Fluentd default forward port
|
||||
bind 0.0.0.0
|
||||
</source>
|
||||
|
||||
<source>
|
||||
@type forward
|
||||
port 8069 # Odoo logs
|
||||
bind 0.0.0.0
|
||||
</source>
|
||||
|
||||
<source>
|
||||
@type forward
|
||||
port 3000 # Grafana logs
|
||||
bind 0.0.0.0
|
||||
</source>
|
||||
|
||||
|
||||
<match **>
|
||||
@type stdout
|
||||
</match>
|
||||
|
||||
|
8
odoo.conf
Normal file
8
odoo.conf
Normal file
@ -0,0 +1,8 @@
|
||||
[options]
|
||||
admin_passwd = admin
|
||||
db_host = db
|
||||
db_port = 5432
|
||||
db_user = admin
|
||||
db_password = admin
|
||||
addons_path = /mnt/extra-addons
|
||||
logfile = /var/log/odoo/odoo.log
|
382
odoo_logs/odoo.log
Normal file
382
odoo_logs/odoo.log
Normal file
@ -0,0 +1,382 @@
|
||||
2024-11-26 13:23:00,949 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:23:00,950 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:23:00,951 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:23:00,951 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:23:00,951 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:23:00,952 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:23:00,952 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:23:00,953 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:23:01,132 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:23:01,132 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:23:01,517 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:01,518 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on d2f58062b34d:8069
|
||||
2024-11-26 13:23:01,520 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:01,532 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:01,533 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 928fc1839e70:8069
|
||||
2024-11-26 13:23:01,537 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:04,430 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:04,458 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:04] "GET / HTTP/1.1" 303 - 0 0.000 0.031
|
||||
2024-11-26 13:23:04,483 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:04,485 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:04,487 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:04] "GET /web HTTP/1.1" 303 - 0 0.000 0.005
|
||||
2024-11-26 13:23:04,503 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:05,596 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:05,688 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:05] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 1.186
|
||||
2024-11-26 13:23:07,892 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:07,898 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:07] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.007
|
||||
2024-11-26 13:23:44,404 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:46,102 1 INFO None odoo.service.db: Create database `admin`.
|
||||
2024-11-26 13:23:46,104 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:46,105 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:23:46,554 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:46,607 1 INFO None werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:46] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 2.205
|
||||
2024-11-26 13:23:48,285 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:23:48,286 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:23:48] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.002
|
||||
2024-11-26 13:24:08,855 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:09,726 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 479, in dispatch
|
||||
check_super(passwd)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 53, in check_super
|
||||
raise odoo.exceptions.AccessDenied()
|
||||
odoo.exceptions.AccessDenied: Access Denied
|
||||
2024-11-26 13:24:10,174 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:10,221 1 INFO None werkzeug: 192.168.48.1 - - [26/Nov/2024 13:24:10] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 1.367
|
||||
2024-11-26 13:24:11,823 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:11,825 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:24:11] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.003
|
||||
2024-11-26 13:24:25,472 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:26,360 1 INFO None odoo.service.db: Create database `admin`.
|
||||
2024-11-26 13:24:26,362 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:26,364 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:24:26,785 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:26,832 1 INFO None werkzeug: 192.168.48.1 - - [26/Nov/2024 13:24:26] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 1.361
|
||||
2024-11-26 13:24:28,439 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:24:28,441 1 INFO ? werkzeug: 192.168.48.1 - - [26/Nov/2024 13:24:28] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.003
|
||||
2024-11-26 13:38:23,035 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:38:23,036 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:38:23,364 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:38:23,366 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:38:43,254 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:38:43,254 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:38:43,255 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:38:43,255 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:38:43,256 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:38:43,256 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:38:43,256 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:38:43,256 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:38:43,423 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:38:43,423 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:38:43,875 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:38:43,876 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:38:43,876 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on c8cfac58fc2e:8069
|
||||
2024-11-26 13:38:43,876 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on cafb9979cf33:8069
|
||||
2024-11-26 13:38:43,877 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:38:43,876 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:27,646 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:27,672 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:27] "GET / HTTP/1.1" 303 - 0 0.000 0.031
|
||||
2024-11-26 13:40:27,684 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:27,686 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:27,688 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:27] "GET /web HTTP/1.1" 303 - 0 0.000 0.004
|
||||
2024-11-26 13:40:27,700 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:28,611 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:28,672 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:28] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 0.973
|
||||
2024-11-26 13:40:30,601 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:30,603 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:30] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.003
|
||||
2024-11-26 13:40:53,532 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:55,127 1 INFO None odoo.service.db: Create database `admin`.
|
||||
2024-11-26 13:40:55,129 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:55,129 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:40:55,546 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:55,598 1 INFO None werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:55] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 2.068
|
||||
2024-11-26 13:40:57,232 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:40:57,233 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:40:57] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.002
|
||||
2024-11-26 13:41:07,319 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:41:07,354 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:41:07] "GET / HTTP/1.1" 303 - 0 0.000 0.039
|
||||
2024-11-26 13:41:07,360 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:41:07,361 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:41:07,362 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:41:07] "GET /web HTTP/1.1" 303 - 0 0.000 0.004
|
||||
2024-11-26 13:41:07,377 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:41:07,997 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:41:08,051 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:41:08] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 0.676
|
||||
2024-11-26 13:42:43,786 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:42:45,519 1 INFO None odoo.service.db: Create database `odoo_db`.
|
||||
2024-11-26 13:42:45,520 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:42:45,521 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:42:45,964 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:42:46,020 1 INFO None werkzeug: 192.168.80.1 - - [26/Nov/2024 13:42:46] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 2.236
|
||||
2024-11-26 13:43:20,474 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:20,477 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:20] "GET / HTTP/1.1" 303 - 0 0.000 0.004
|
||||
2024-11-26 13:43:20,531 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:20,533 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:20,535 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:20] "GET /web HTTP/1.1" 303 - 0 0.000 0.005
|
||||
2024-11-26 13:43:20,554 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:20,922 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:20,987 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:20] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 0.435
|
||||
2024-11-26 13:43:23,467 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:23,468 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:23] "GET /web/service-worker.js HTTP/1.1" 404 - 0 0.000 0.002
|
||||
2024-11-26 13:43:34,046 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:34,048 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:34] "GET / HTTP/1.1" 303 - 0 0.000 0.003
|
||||
2024-11-26 13:43:34,058 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:34,060 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:34,062 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:34] "GET /web HTTP/1.1" 303 - 0 0.000 0.005
|
||||
2024-11-26 13:43:34,069 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:34,453 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:34,496 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:34] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 0.428
|
||||
2024-11-26 13:43:45,377 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:46,222 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 479, in dispatch
|
||||
check_super(passwd)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 53, in check_super
|
||||
raise odoo.exceptions.AccessDenied()
|
||||
odoo.exceptions.AccessDenied: Access Denied
|
||||
2024-11-26 13:43:46,651 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:43:46,699 1 INFO None werkzeug: 192.168.80.1 - - [26/Nov/2024 13:43:46] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 1.324
|
||||
2024-11-26 13:50:11,333 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:50:11,334 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:50:14,024 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:50:14,026 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:50:32,309 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:50:32,310 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:50:32,310 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:50:32,311 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:50:32,526 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:50:32,983 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:50:32,984 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 94c4b74c98a1:8069
|
||||
2024-11-26 13:50:32,985 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:50:34,288 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:50:34,289 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:50:34,290 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:50:34,291 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:50:34,402 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:50:34,560 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:50:34,560 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 8ce9fe4d8903:8069
|
||||
2024-11-26 13:50:34,561 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:22,189 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:22,211 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:54:22] "GET / HTTP/1.1" 303 - 0 0.000 0.031
|
||||
2024-11-26 13:54:22,216 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:22,218 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:22,219 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:54:22] "GET /web HTTP/1.1" 303 - 0 0.000 0.003
|
||||
2024-11-26 13:54:22,225 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:23,106 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:23,168 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:54:23] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 0.944
|
||||
2024-11-26 13:54:40,137 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:41,862 1 INFO None odoo.service.db: Create database `admin`.
|
||||
2024-11-26 13:54:41,864 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:41,864 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:54:42,308 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:54:42,355 1 INFO None werkzeug: 192.168.80.1 - - [26/Nov/2024 13:54:42] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 2.219
|
||||
2024-11-26 13:55:53,749 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:55:53,750 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:55:56,221 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:55:56,223 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:56:14,045 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:56:14,046 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:56:14,047 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:56:14,048 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:56:14,199 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:56:14,502 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 8e5719caf447:8069
|
||||
2024-11-26 13:56:14,503 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:14,505 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:16,286 1 INFO ? odoo: Odoo version 16.0-20241125
|
||||
2024-11-26 13:56:16,287 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
|
||||
2024-11-26 13:56:16,288 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/16.0', '/mnt/extra-addons']
|
||||
2024-11-26 13:56:16,289 1 INFO ? odoo: database: default@default:default
|
||||
2024-11-26 13:56:16,389 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
|
||||
2024-11-26 13:56:16,532 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:16,532 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 02a1b5bc4c46:8069
|
||||
2024-11-26 13:56:16,533 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:34,793 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:34,813 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:56:34] "GET / HTTP/1.1" 303 - 0 0.000 0.021
|
||||
2024-11-26 13:56:34,819 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:34,820 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:34,821 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:56:34] "GET /web HTTP/1.1" 303 - 0 0.000 0.003
|
||||
2024-11-26 13:56:34,827 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:35,780 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:35,839 1 INFO ? werkzeug: 192.168.80.1 - - [26/Nov/2024 13:56:35] "GET /web/database/selector HTTP/1.1" 200 - 0 0.000 1.012
|
||||
2024-11-26 13:56:52,591 1 INFO ? odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:54,334 1 INFO None odoo.service.db: Create database `db`.
|
||||
2024-11-26 13:56:54,336 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:54,336 1 ERROR None odoo.addons.web.controllers.database: Database creation error.
|
||||
Traceback (most recent call last):
|
||||
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/database.py", line 81, in create
|
||||
dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code, post['phone']])
|
||||
File "/usr/lib/python3/dist-packages/odoo/http.py", line 369, in dispatch_rpc
|
||||
return dispatch(method, params)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 480, in dispatch
|
||||
return g[exp_method_name](*params)
|
||||
File "<decorator-gen-20>", line 2, in exp_create_database
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 43, in if_db_mgt_enabled
|
||||
return method(self, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 140, in exp_create_database
|
||||
_create_empty_database(db_name)
|
||||
File "/usr/lib/python3/dist-packages/odoo/service/db.py", line 101, in _create_empty_database
|
||||
with closing(db.cursor()) as cr:
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 741, in cursor
|
||||
return Cursor(self.__pool, self.__dbname, self.__dsn)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 267, in __init__
|
||||
self._cnx = pool.borrow(dsn)
|
||||
File "<decorator-gen-2>", line 2, in borrow
|
||||
File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
|
||||
return func(inst, *args, **kwargs)
|
||||
File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 669, in borrow
|
||||
result = psycopg2.connect(
|
||||
File "/usr/lib/python3/dist-packages/psycopg2/__init__.py", line 127, in connect
|
||||
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
|
||||
psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
|
||||
Is the server running locally and accepting connections on that socket?
|
||||
|
||||
2024-11-26 13:56:54,762 1 INFO None odoo.sql_db: Connection to the database failed
|
||||
2024-11-26 13:56:54,808 1 INFO None werkzeug: 192.168.80.1 - - [26/Nov/2024 13:56:54] "POST /web/database/create HTTP/1.1" 200 - 0 0.000 2.219
|
||||
2024-11-26 13:57:49,353 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:57:49,355 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
||||
2024-11-26 13:57:51,028 1 INFO ? odoo.service.server: Initiating shutdown
|
||||
2024-11-26 13:57:51,030 1 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
|
18
prometheus.yml
Normal file
18
prometheus.yml
Normal file
@ -0,0 +1,18 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
# Scruter le PostgreSQL Exporter
|
||||
- job_name: 'postgres_exporter'
|
||||
static_configs:
|
||||
- targets: ['postgres_exporter:9187'] # Cible du PostgreSQL Exporter
|
||||
|
||||
# Scruter Prometheus
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
# Optionnel : Scruter Grafana
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
- targets: ['grafana:3000']
|
Loading…
Reference in New Issue
Block a user