Backup your brewblox

No such command “log”

pi@raspberrypi:~/brewblox $ brewblox-ctl -v follow
SHELL      docker-compose logs --follow 
Attaching to brewblox_influx_1, brewblox_history_1, brewblox_traefik_1
history_1    | /usr/local/lib/python3.7/site-packages/aioinflux/compat.py:12: UserWarning: Pandas/Numpy is not available. Support for 'dataframe' mode is disabled.
history_1    |   warnings.warn(no_pandas_warning)
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.service        Service name: history
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.service        Service info: 0.9.0-129-g3d22b9e @ Wed Aug 26 10:36:32 UTC 2020
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.service        Service config: {'host': '0.0.0.0', 'port': 5000, 'bind_http_server': True, 'output': None, 'name': 'history', 'debug': False, 'eventbus_host': 'eventbus', 'eventbus_port': 5672, 'mqtt_protocol': 'mqtt', 'mqtt_host': 'eventbus', 'mqtt_port': None, 'mqtt_path': '/eventbus', 'history_topic': 'brewcast/history', 'state_topic': 'brewcast/state', 'broadcast_exchange': 'brewcast.history', 'write_interval': 5, 'poll_interval': 5}
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.mqtt           Starting <EventHandler for mqtt://eventbus:1883>
history_1    | 2020/09/04 18:00:31 INFO     brewblox_history.amqp           Deferred event bus subscription: [<# @ brewcast.history>]
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.mqtt           listen(brewcast/history/#)
history_1    | 2020/09/04 18:00:31 INFO     brewblox_service.mqtt           subscribe(brewcast/history/#)
history_1    | 2020/09/04 18:00:31 INFO     brewblox_history.amqp           <EventListener for eventbus> now listening
history_1    | /usr/local/lib/python3.7/site-packages/brewblox_history/amqp.py:225: UserWarning: Connection error in <EventListener for eventbus>: gaierror([Errno -2] Name or service not known)
history_1    |   warnings.warn(f'Connection error in {self}: {strex(ex)}')
history_1    | 2020/09/04 18:07:15 INFO     brewblox_history.amqp           Closing <EventPublisher for "eventbus">
history_1    | 2020/09/04 18:07:15 INFO     brewblox_service.mqtt           unsubscribe(brewcast/history/#)
history_1    | 2020/09/04 18:07:15 INFO     brewblox_service.mqtt           unlisten(brewcast/history/#)
history_1    | ======== Running on http://0.0.0.0:5000 ========
history_1    | (Press CTRL+C to quit)
brewblox_influx_1 exited with code 0
traefik_1    | time="2020-09-04T18:00:27Z" level=info msg="Configuration loaded from flags."
traefik_1    | time="2020-09-04T18:07:15Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik_1    | time="2020-09-04T18:07:15Z" level=error msg="close tcp [::]:80: use of closed network connection" entryPointName=web
traefik_1    | time="2020-09-04T18:07:15Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik_1    | time="2020-09-04T18:07:15Z" level=error msg="close tcp [::]:443: use of closed network connection" entryPointName=websecure
brewblox_traefik_1 exited with code 0
brewblox_history_1 exited with code 0
pi@raspberrypi:~/brewblox $

To shutdown the services that started before the timeout kicked in:

brewblox-ctl kill

To increase timeout value:

brewblox-ctl env set COMPOSE_HTTP_TIMEOUT 200

The log command is part of the install-specific commands.
To restore:

rm -rf brewblox_ctl_lib
brewblox-ctl --help

It will automatically reinstall the correct libs.

With the increased timeout, you can try running brewblox-ctl up again, and see what happens.
This will help to isolate the problem. Timeout errors can be caused by either a slow system, or by a complete hangup.

Hi Thanks! Looks like the time out thing helped. Thank you @Elco and @Bob_Steers

pi@raspberrypi:~/brewblox $ dotenv --quote never set COMPOSE_HTTP_TIMEOUT 200
COMPOSE_HTTP_TIMEOUT=200
pi@raspberrypi:~/brewblox $ 
pi@raspberrypi:~/brewblox $ brewblox-ctl -v setup
INFO       Stopping services...
SHELL      docker-compose down --remove-orphans
Removing brewblox_influx_1  ... done
Removing brewblox_history_1 ... done
Removing brewblox_traefik_1 ... done
Removing network brewblox_default
INFO       Checking ports...
SHELL      sudo netstat -tulpn
This directory already contains a docker-compose.yml file. Do you want to keep it? [Press ENTER for default value 'yes']

This directory already contains Couchdb datastore files. Do you want to keep them? [Press ENTER for default value 'yes']

This directory already contains Influx history files. Do you want to keep them? [Press ENTER for default value 'yes']

This directory already contains Traefik gateway files. Do you want to keep them? [Press ENTER for default value 'yes']

INFO       Setting .env values...
ENV        BREWBLOX_RELEASE=edge
ENV        BREWBLOX_PORT_HTTP=80
ENV        BREWBLOX_PORT_HTTPS=443
ENV        COMPOSE_FILE=docker-compose.shared.yml:docker-compose.yml
ENV        COMPOSE_PROJECT_NAME=brewblox
INFO       Checking Avahi config...
INFO       Copying docker-compose.shared.yml...
SHELL      cp -f ./brewblox_ctl_lib/data/config/docker-compose.shared.yml ./
INFO       Stopping services...
SHELL      docker-compose down --remove-orphans
Removing network brewblox_default
WARNING: Network brewblox_default not found.
INFO       Pulling docker images...
SHELL      docker-compose pull
Pulling traefik   ... done
Pulling history   ... done
Pulling ui        ... done
Pulling eventbus  ... done
Pulling influx    ... done
Pulling datastore ... done
Pulling spark-one ... done
SHELL      cp -f ./brewblox_ctl_lib/data/config/traefik-cert.yaml ./traefik/
INFO       Starting configured services...
SHELL      docker-compose up -d --remove-orphans traefik influx history
Creating network "brewblox_default" with the default driver
Creating brewblox_influx_1  ... done
Creating brewblox_traefik_1 ... done
Creating brewblox_history_1 ... done
INFO       Configuring history settings...
SHELL      /usr/bin/python3 -m brewblox_ctl http wait https://localhost:443/history/ping
Connecting https://localhost:443/history/ping, attempt 1/60
Success!
SHELL      /usr/bin/python3 -m brewblox_ctl http post --quiet https://localhost:443/history/query/configure
INFO       Stopping services...
SHELL      docker-compose down
Stopping brewblox_history_1 ... done
Stopping brewblox_traefik_1 ... done
Stopping brewblox_influx_1  ... done
Removing brewblox_history_1 ... done
Removing brewblox_traefik_1 ... done
Removing brewblox_influx_1  ... done
Removing network brewblox_default
ENV        BREWBLOX_CFG_VERSION=0.5.0
INFO       All done!
1 Like