Hello,
i’m trying to install hassio with mariadb, influxdb, grafana, mqtt, node-red…
I mostly stuck to this installation ==> Home Assistant install with docker-compose - iotechonline
But when I boot up, I still get errors that I can’t track and fix
maybe someone can help me here
Everything runs on a Raspberry pi 4 in the local network
on the raspberry i have the users pi and grobot
with grobot i would run all or what is possible
there are some errors ig i start with
docker-compose -up
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (2002, "Can't connect to MySQL server on '127.0.0.1' (115)")
hass | (Background on this error at: https://sqlalche.me/e/14/e3q8)
hass | 2023-02-24 12:53:11.225 ERROR (Recorder) [homeassistant.components.recorder.core] Error during connection setup: (MySQLdb.OperationalError) (2002, "Can't connect to MySQL server on '127.0.0.1' (115)")
the file /home/grobot/homeassistant/hass-config/configuration.yaml
i think the ip adresse orr any other there is wrong
The raspberry pi have the ip
192.168.1.59 GrobotServer
but i try
127.0.0.1, localhost, GrobotServer
with port or without port
nothing works
cat homeassistant/hass-config/configuration.yaml
# Loads default set of integrations. Do not remove.
#default_config:
# Load frontend themes from the themes folder
#frontend:
# themes: !include_dir_merge_named themes
# Text to speech
#tts:
# - platform: google_translate
#
#automation: !include automations.yaml
#script: !include scripts.yaml
#scene: !include scenes.yaml
default_config:
# For homeassistant v2021.7.0 and above add this http block
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.59 # Add the IP address of the proxy server
frontend:
themes: !include_dir_merge_named themes
panel_iframe:
configurator:
title: Configurator
icon: mdi:wrench
url: http://192.168.1.59:3218/
require_admin: true
nodered:
title: Node-Red
icon: mdi:shuffle-variant
url: http://<192.168.1.59>:1880/
require_admin: true
mqtt:
broker: <192.168.1.59>
recorder:
db_url: mysql://homeassistant:<mypassword>@<192.168.1.59:3306>/ha_db?charset=utf8
purge_keep_days: 30
and i get this errors
i try to find in internet but not get a good solution
| return _parse_url(name_or_url)
hass | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 794, in _parse_url
hass | components["port"] = int(components["port"])
hass | ValueError: invalid literal for int() with base 10: '3306>'
hass | 2023-02-24 13:12:49.262 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
hass | 2023-02-24 13:12:51.365 ERROR (Recorder) [homeassistant.components.recorder.core] Error during connection setup: invalid literal for int() with base 10: '3306>' (retrying in 3 seconds)
hass | Traceback (most recent call last):
hass | File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 704, in _setup_recorder
hass | self._setup_connection()
hass | File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1171, in _setup_connection
hass | self.engine = create_engine(self.db_url, **kwargs, future=True)
hass | File "<string>", line 2, in create_engine
hass | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
hass | return fn(*args, **kwargs)
hass | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 518, in create_engine
hass | u = _url.make_url(url)
hass | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 738, in make_url
hass | return _parse_url(name_or_url)
hass | File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 794, in _parse_url
hass | components["port"] = int(components["port"])
hass | ValueError: invalid literal for int() with base 10: '3306>'
hass | 2023-02-24 13:12:54.376 ERROR (Recorder) [homeassistant.components.recorder.core] Error during connection setup: invalid literal for int() with base 10: '3306>' (retrying in 3 seconds)
hass | Traceback (most recent call last):
hass | File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 704, in _setup_recorder
hass | self._setup_connection()
hass | File "/usr/src/homeassistant/homeassistant/components/recorder/core.py", line 1171, in _setup_connection
hass | self.engine = create_engine(self.db_url, **kwargs, future=True)
hass | File "<string>", line 2, in create_engine
there is my docker-compose.yaml
version: "3.9"
volumes:
mariadb_data:
influxdb_data:
mosquitto_data:
# code:
services:
apache:
container_name: apache
build: apache
ports:
- 80:80
- 443:443
volumes:
# - code:/home/grobot/docker/www/html/
- ./www/html/:/var/www/html/
- ./apache/php-ini-overrides.ini:/usr/local/etc/php/conf.d/php-ini-overrides.ini
codeserver:
container_name: codeserver
image: ghcr.io/linuxserver/openssh-server
environment:
- PASSWORD_ACCESS=true
- USER_PASSWORD=mypassword
- USER_NAME=ssh
- PUID=1000
- PGID=33
ports:
- 222:2222
volumes:
# - code:/home/grobot/docker/www/html/
- ./www/html/:/var/www/html/
# Mariadb Datenbank hauptsächlich für Fixe und kurzfristige Daten wie 30 Tage
mariadb:
image: mariadb:latest
container_name: mariadb
restart: unless-stopped
ports:
- 3306:3306
environment:
#- MYSQL_USER=root
#- MYSQL_PASSWORD=mypassword
#- MYSQL_ROOT_PASSWORD=same-same-mypassword
# Definieren der Datenbanken MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_ROOT_PASSWORD: mypassword
MYSQL_DATABASE: ha_db
MYSQL_USER: homeassistant
MYSQL_PASSWORD: mypassword
PUID: 1001
PGID: 1001
restart: always
# Connect to "grobotnet" network, as defined below
networks:
- grobotnet
volumes:
- mariadb_data:/var/lib/mysql
# - ./mariadb:/var/lib/mysql
# Influxdb Datenbank hauptsächlich für Sensordaten und langfristige Daten wie 1 Jahr oder 3 Jahre
influxdb:
image: influxdb:latest
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8090:8090"
- "2003:2003"
env_file:
- './influxdb/influxdbenv.influxdb'
networks:
- grobotnet
volumes:
# Data persistency
# sudo mkdir -p /srv/docker/influxdb/data
- influxdb_data:/var/lib/influxdb
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./portainer/portainer-data:/data
ports:
- 9000:9000
# phpMyAdmin container
phpmyadmin:
# Use phpmyadmin/phpmyadmin:5.0.2 image
image: phpmyadmin
restart: always
# Connect to "grobotnet" network, as defined below
networks:
- grobotnet
# Map port 8080 on the host to port 80 inside the container
# Syntax is: "HOST_PORT:CONTAINER_PORT"
ports:
- "8081:80"
# Pass a list of environment variables to the container
environment:
PMA_HOST: mariadb
# Wait for "mysql" container to start first
depends_on:
- mariadb
homeassistant:
container_name: hass
image: homeassistant/home-assistant
volumes:
- ./homeassistant/hass-config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
user: 1001:1001
# Define networks
networks:
- grobotnet
# network_mode: host
depends_on:
- mariadb
- influxdb
- mosquitto
# hass-configurator:
# image: "causticlab/hass-configurator-docker:arm"
# container_name: hass-configurator
# restart: unless-stopped
# ports:
# - "3218:3218/tcp"
# depends_on:
# - homeassistant
# volumes:
# - ./homeassistant/configurator-config:/config
# - ./homeassistant/hass-config:/homeassistant/hass-config
# user: 1001:1001
nodered:
container_name: nodered
image: nodered/node-red
ports:
- 1880:1880
volumes:
- ./nodered/data:/data
user: 1001:1001
depends_on:
- homeassistant
- mosquitto
- influxdb
# Connect to "grobotnet" network, as defined below
networks:
- grobotnet
environment:
TZ: "Europe/Berlin"
restart: unless-stopped
mosquitto:
image: eclipse-mosquitto:latest
container_name: mosquitto
restart: unless-stopped
sorry for the long text
regards
Achim