update von 4.1 auf 4.2

Antworten
user1378
Beiträge: 38
Registriert: 13 Jun 2012, 09:27

update von 4.1 auf 4.2

Beitrag von user1378 »

halli hallo,

wir möchten gerne von 4.1 auf 4.2 auf unseren debian 10 upgraden.

dazu befolge ich die anleitung "getting started".

beim installieren des opsi-server erscheint unter anderem folgende fehlermeldung:
[4] [2022-06-23 15:35:20.166] [ ] Warning '"is not" with a literal. Did you mean "!="?' in file '<string>', line 254 (logging.py:797)
...
[4] [2022-06-23 15:35:20.969] [ ] Grafana plugin dir '/var/lib/grafana/plugins' not found (grafana.py:272)
...
[4] [2022-06-23 15:43:47.989] [ ] Failed to connect to grafana api 'http://localhost:3000': HTTPConnectionPool(host='localhost', por
t=3000): Max retries exceeded with url: /api/users/lookup?loginOrEmail=opsiconfd (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection
object at 0x7f0aa14c6110>, 'Connection to localhost timed out. (connect timeout=3)')) (grafana.py:288)
[4] [2022-06-23 15:48:09.759] [ ] Failed to setup redis downsampling: Timeout connecting to server (setup.py:250)
Traceback (most recent call last):
File "redis/connection.py", line 614, in connect
File "redis/retry.py", line 50, in call_with_retry
File "redis/retry.py", line 45, in call_with_retry
File "redis/connection.py", line 615, in <lambda>
File "redis/connection.py", line 680, in _connect
File "redis/connection.py", line 668, in _connect
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "opsiconfd/setup.py", line 248, in setup
File "opsiconfd/statistics.py", line 41, in setup_metric_downsampling
File "contextlib.py", line 135, in __enter__
File "opsiconfd/utils.py", line 214, in redis_client
File "opsiconfd/utils.py", line 202, in get_redis_connection
File "redis/commands/core.py", line 1053, in ping
File "redis/client.py", line 1215, in execute_command
File "redis/connection.py", line 1386, in get_connection
File "redis/connection.py", line 618, in connect
redis.exceptions.TimeoutError: Timeout connecting to server
grafana wurden wie in der anleitung vorher installiert:

Code: Alles auswählen

#tail -n 20 grafana/grafana.log 
logger=settings t=2022-06-23T15:35:21.849668151+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2022-06-23T15:35:21.849691057+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2022-06-23T15:35:21.849715856+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2022-06-23T15:35:21.849738109+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2022-06-23T15:35:21.849761139+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2022-06-23T15:35:21.849784068+02:00 level=info msg="App mode production"
logger=sqlstore t=2022-06-23T15:35:21.849896476+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2022-06-23T15:35:21.870986096+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2022-06-23T15:35:21.876583679+02:00 level=info msg="migrations completed" performed=0 skipped=425 duration=645.701µs
logger=plugin.manager t=2022-06-23T15:35:21.922576774+02:00 level=info msg="Plugin registered" pluginId=input
logger=plugin.manager t=2022-06-23T15:35:21.938096569+02:00 level=info msg="Plugin registered" pluginId=grafana-simple-json-datasource
logger=secrets t=2022-06-23T15:35:21.938430436+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=query_data t=2022-06-23T15:35:21.941691097+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2022-06-23T15:35:21.950709758+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2022-06-23T15:35:22.107108101+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=server t=2022-06-23T15:35:22.107276054+02:00 level=info msg="Writing PID file" path=/run/grafana/grafana-server.pid pid=1933
logger=grafanaStorageLogger t=2022-06-23T15:35:22.108162067+02:00 level=info msg="storage starting"
logger=ngalert t=2022-06-23T15:35:22.108634924+02:00 level=info msg="warming cache for startup"
logger=http.server t=2022-06-23T15:35:22.111055326+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=ngalert.multiorg.alertmanager t=2022-06-23T15:35:22.112024202+02:00 level=info msg="starting MultiOrg Alertmanager"

# systemctl status grafana-server.service 
● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-06-23 15:35:21 CEST; 19min ago
     Docs: http://docs.grafana.org
 Main PID: 1933 (grafana-server)
    Tasks: 9 (limit: 4915)
   Memory: 32.6M
   CGroup: /system.slice/grafana-server.service
           └─1933 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:default

#ss -tlpn | grep 3000
LISTEN    0         128                      *:3000                   *:*        users:(("grafana-server",pid=1933,fd=10))       


auch redis scheint doch keine probleme zu haben.

Code: Alles auswählen

# tail -n 20 redis/redis-server.log
1044:M 23 Jun 2022 15:28:09.019 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1044:M 23 Jun 2022 15:28:09.019 # Server initialized
1044:M 23 Jun 2022 15:28:09.020 * <timeseries> RedisTimeSeries version 10411, git_sha=
1044:M 23 Jun 2022 15:28:09.020 * <timeseries> Redis version found by RedisTimeSeries : 6.0.16 - oss
1044:M 23 Jun 2022 15:28:09.020 * Module 'timeseries' loaded from /usr/lib/redis/modules/redistimeseries.so
1044:M 23 Jun 2022 15:28:09.020 * Loading RDB produced by version 6.0.16
1044:M 23 Jun 2022 15:28:09.021 * RDB age 1 seconds
1044:M 23 Jun 2022 15:28:09.021 * RDB memory usage when created 0.78 Mb
1044:M 23 Jun 2022 15:28:09.021 * DB loaded from disk: 0.000 seconds
1044:M 23 Jun 2022 15:28:09.021 * Ready to accept connections

# systemctl status redis.service 
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-06-23 15:28:09 CEST; 25min ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
 Main PID: 1044 (redis-server)
   Status: "Ready to accept connections"
    Tasks: 5 (limit: 4915)
   Memory: 2.6M
   CGroup: /system.slice/redis-server.service
           └─1044 /usr/bin/redis-server 127.0.0.1:6379

Jun 23 15:28:08 srv-opsi systemd[1]: Starting Advanced key-value store...
Jun 23 15:28:09 srv-opsi systemd[1]: Started Advanced key-value store.


# ss -tlpn | grep 6379
LISTEN    0         128              127.0.0.1:6379             0.0.0.0:*        users:(("redis-server",pid=1044,fd=6))                                         
LISTEN    0         128                  [::1]:6379                [::]:*        users:(("redis-server",pid=1044,fd=7))  
opsiconfd läuft nach dem upgrade allerdings nicht:

Code: Alles auswählen

# systemctl status opsiconfd.service 
● opsiconfd.service - opsi server daemon
   Loaded: loaded (/lib/systemd/system/opsiconfd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-06-23 15:39:45 CEST; 17min ago
 Main PID: 3093 (opsiconfd)
    Tasks: 8 (limit: 4915)
   Memory: 76.8M
   CGroup: /system.slice/opsiconfd.service
           └─3093 ./opsiconfd start --log-level-stderr=0

Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [1] [2022-06-23 15:48:36.398] [               ] opsiconfd is starting   (main.py:153)
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:48:36.401] [               ] Starting server   (server.py:280)
Jun 23 15:52:58 srv-opsi opsiconfd[3093]: Logging error:
Jun 23 15:52:58 srv-opsi opsiconfd[3093]: Traceback (most recent call last):
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "opsiconfd/logging.py", line 316, in _start
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "opsiconfd/utils.py", line 234, in get_async_redis_connection
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "aioredis/client.py", line 1082, in execute_command
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "aioredis/connection.py", line 1416, in get_connection
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "aioredis/connection.py", line 696, in connect
Jun 23 15:52:58 srv-opsi opsiconfd[3093]: TimeoutError: Timeout connecting to server


# journalctl -n 40 -u opsiconfd
-- Logs begin at Thu 2022-06-23 15:26:27 CEST, end at Thu 2022-06-23 15:53:18 CEST. --
Jun 23 15:44:08 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:08.907] [               ] Creating opsi base   (SQL.py:616)
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.292] [               ] Setting rights on '/etc/shadow'   (Rights.py:233)
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.292] [               ] Setting rights on '/var/log/opsi/opsiconfd/opsiconfd.log
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.294] [               ] Setting rights recursively on '/var/lib/opsiconfd/addons
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.294] [               ] Setting rights recursively on '/etc/opsi'   (Rights.py:2
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.296] [               ] Setting rights recursively on '/etc/opsi/ssl'   (Rights.
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.296] [               ] Setting rights on '/etc/opsi/ssl/opsi-ca-cert.pem'   (Ri
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.297] [               ] Setting rights on '/etc/opsi/ssl/opsi-ca-cert.pem'   (Ri
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.297] [               ] Setting rights on '/etc/opsi/ssl/opsi-ca-key.pem'   (Rig
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.298] [               ] Setting rights on '/etc/opsi/ssl/opsiconfd-cert.pem'   (
Jun 23 15:44:09 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:44:09.299] [               ] Setting rights on '/etc/opsi/ssl/opsiconfd-key.pem'   (R
Jun 23 15:44:15 srv-opsi opsiconfd[3093]: [4] [2022-06-23 15:44:15.433] [               ] Failed to connect to grafana api 'http://localhost:3000'
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [4] [2022-06-23 15:48:36.383] [               ] Failed to setup redis downsampling: Timeout connecting t
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: Traceback (most recent call last):
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 614, in connect
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/retry.py", line 50, in call_with_retry
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/retry.py", line 45, in call_with_retry
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 615, in <lambda>
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 680, in _connect
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 668, in _connect
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: TimeoutError: [Errno 110] Connection timed out
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: During handling of the above exception, another exception occurred:
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: Traceback (most recent call last):
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "opsiconfd/setup.py", line 248, in setup
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "opsiconfd/statistics.py", line 72, in setup_metric_downsampling
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/client.py", line 1215, in execute_command
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 1386, in get_connection
Jun 23 15:48:36 srv-opsi opsiconfd[3093]:   File "redis/connection.py", line 618, in connect
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: redis.exceptions.TimeoutError: Timeout connecting to server
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [1] [2022-06-23 15:48:36.396] [               ] Switching to user opsiconfd   (main.py:137)
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [1] [2022-06-23 15:48:36.398] [               ] opsiconfd is starting   (main.py:153)
Jun 23 15:48:36 srv-opsi opsiconfd[3093]: [5] [2022-06-23 15:48:36.401] [               ] Starting server   (server.py:280)
Jun 23 15:52:58 srv-opsi opsiconfd[3093]: Logging error:
Jun 23 15:52:58 srv-opsi opsiconfd[3093]: Traceback (most recent call last):
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "opsiconfd/logging.py", line 316, in _start
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "opsiconfd/utils.py", line 234, in get_async_redis_connection
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "aioredis/client.py", line 1082, in execute_command
Jun 23 15:52:58 srv-opsi opsiconfd[3093]:   File "aioredis/connection.py", line 1416, in get_connection
port 4447 ist leider nicht erreichbar.

über jeden tipp oder denkanstoß würde ich mich sehr freuen

ich wünsche allen einen sonnigen sommer.
Benutzeravatar
fkalweit
uib-Team
Beiträge: 182
Registriert: 23 Okt 2020, 16:14

Re: update von 4.1 auf 4.2

Beitrag von fkalweit »

Hallo,

kann man sich mit der

Code: Alles auswählen

redis-cli
verbinden? Was sagt da der Befehl info?

Wie sind die Paketversionen aktuell? dpkg -l | grep opsi und dpkg -l grep redis

Viele Grüße
Fabian
user1378
Beiträge: 38
Registriert: 13 Jun 2012, 09:27

Re: update von 4.1 auf 4.2

Beitrag von user1378 »

hallo fabian,

Code: Alles auswählen

# redis-cli info 
macht rein gar nix.

Code: Alles auswählen

# redis-server -v
Redis server v=6.0.16 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=9e93290310dc5514

Code: Alles auswählen

# dpkg -l | grep opsi
rc  opsi-atftpd                    0.7.dfsg-7                            amd64        advanced TFTP server - opsi version with pcre, fifo and max-blksize patches
ii  opsi-configed                  4.0.7.6.34-2                          all          OPSI config editor
ii  opsi-linux-bootimage           20220516-1                            all          opsi bootimage for netboot tasks.
ii  opsi-server                    4.2.0.69-1                            all          opsi server
ii  opsi-tftpd-hpa                 5.2.8-78                              amd64        HPA's tftp server
ii  opsi-utils                     4.2.0.172-1                           amd64        Utilities for working with opsi
ii  opsi-windows-support           4.2.0.0-1                             all          Install utilities useful for deploying Windows with opsi.
ii  opsiconfd                      4.2.0.272-1                           amd64        opsi configuration service
ii  opsipxeconfd                   4.2.0.30-1                            amd64        opsi pxe configuration service
rc  python-opsi                    4.1.1.101-1                           all          opsi python library
opsi-configed wird doch gar nicht benötigt? der server hat keine GUI

Code: Alles auswählen

# dpkg -l | grep redis
ii  redis-server                   5:6.0.16-1                            amd64        Persistent key-value database with network interface
ii  redis-timeseries               1.4.11.0-1                            amd64        RedisTimeSeries is a Redis Module adding a Time Series data structure to Redis.
ii  redis-tools                    5:6.0.16-1                            amd64        Persistent key-value database with network interface (client)

Code: Alles auswählen

# cat /etc/debian_version 
10.12
Benutzeravatar
fkalweit
uib-Team
Beiträge: 182
Registriert: 23 Okt 2020, 16:14

Re: update von 4.1 auf 4.2

Beitrag von fkalweit »

Hallo,

ich würde evt mal redis und redis-timeseries komplett entfernen und neu installieren.

In unserem testing Repo gibt es auch eine neuere redis-timeseries evt hilft das ja:
https://download.opensuse.org/repositor ... Debian_10/

Viele Grüße
Fabian
user1378
Beiträge: 38
Registriert: 13 Jun 2012, 09:27

Re: update von 4.1 auf 4.2

Beitrag von user1378 »

leider hat das purgen und neuinstallieren von redis-server u. redis-timeseries keine verändung hervorgerufen.

redis-timeseries aus testing leider auch nicht :-(

in /var/log/opsi/opsiconfd/opsiconfd.log wurde seit dem upgrade auch nicht mehr reingeschrieben.

Code: Alles auswählen

# journalctl -u opsiconfd
Jun 29 14:15:50 srv-opsi systemd[1]: Stopped opsi server daemon.
Jun 29 14:15:50 srv-opsi systemd[1]: Started opsi server daemon.
Jun 29 14:20:12 srv-opsi opsiconfd[1306]: Traceback (most recent call last):
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 614, in connect
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/retry.py", line 51, in call_with_retry
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/retry.py", line 46, in call_with_retry
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 615, in <lambda>
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 680, in _connect
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 668, in _connect
Jun 29 14:20:12 srv-opsi opsiconfd[1306]: TimeoutError: [Errno 110] Connection timed out
Jun 29 14:20:12 srv-opsi opsiconfd[1306]: During handling of the above exception, another exception occurred:
Jun 29 14:20:12 srv-opsi opsiconfd[1306]: Traceback (most recent call last):
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "run-opsiconfd", line 12, in <module>
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "opsiconfd/main.py", line 100, in main
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "contextlib.py", line 135, in __enter__
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "opsiconfd/utils.py", line 222, in redis_client
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "opsiconfd/utils.py", line 210, in get_redis_connection
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/commands/core.py", line 1134, in ping
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/client.py", line 1224, in execute_command
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 1392, in get_connection
Jun 29 14:20:12 srv-opsi opsiconfd[1306]:   File "redis/connection.py", line 618, in connect
Jun 29 14:20:12 srv-opsi opsiconfd[1306]: redis.exceptions.TimeoutError: Timeout connecting to server
Jun 29 14:20:13 srv-opsi systemd[1]: opsiconfd.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 14:20:13 srv-opsi systemd[1]: opsiconfd.service: Failed with result 'exit-code'.
wir benutzen die mysql-erweiterung.... aber mir scheint das redis hier das problem zu sein scheint.
user1378
Beiträge: 38
Registriert: 13 Jun 2012, 09:27

Re: update von 4.1 auf 4.2

Beitrag von user1378 »

Code: Alles auswählen

# opsiconfd setup
[4] [2022-06-29 14:29:51.503] [               ] Failed to connect to grafana api 'http://localhost:3000': HTTPConnectionPool(host='localhost', port=3000): Max retries exceeded with url: /api/users/lookup?loginOrEmail=opsiconfd (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f7bfdc6e800>, 'Connection to localhost timed out. (connect timeout=3)'))   (grafana.py:153)

grafana soll auch nicht erreichbar sein...
Antworten