πŸƒ A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.

Overview

chia-monitor discord

A monitoring tool to collect all important metrics from your Chia farming node and connected harvesters. It can send you push notifications with regular status updates and will alert you in case something goes wrong or a proof is found. All metrics are exported to a Prometheus compatible /metrics endpoint and a Grafana dashboard is also provided:

grafana

This example dashboard displays almost all collected metrics and can be imported from grafana.com using the ID 14544 or using the grafana/dashboard.json from this repository.

Notifications

To use notifications, please configure a status_service_url and alert_service_url for your desired notification service in the config.json. You can use most popular notifications services by creating a service specific webhook URL, following the instructions from this wiki. If you wish to disable notifications entirely, you can set the enable field in the notifications section of the config.json to false.


Following notifications are currently sent to the status_service_url:

Farm summary (configurable interval in config.json)

** πŸ‘¨β€πŸŒΎ Farm Status πŸ‘©β€πŸŒΎ **
🌾 OG Plot Count: 3797
🌾 Portable Plot Count: 50
🧺 OG Plot Size: 375.828 TiB
🧺 Portable Plot Size: 4.948 TiB
🚜 Plot Change 24h: +86 (+8.511 TiB)
βŒ›οΈ Signage Points Per Minute: 6.30
πŸ”Ž Passed Filters Per Minute: 49.30
βœ… Total Proofs found: 73
πŸ’° Total Balance: 2.00001 XCH
πŸ•°οΈ Time To Win: 2 weeks and 4 days
πŸ’Ύ Current Netspace: 30.706 EiB
πŸ”οΈ Peak Height: 544594
πŸ“Ά Full Node Peer Count: 8
πŸ”„ Synced: True

Proof found alert

Triggers when a new partial or full proof is found. To limit the amount of notifications when pooling, this can be disabled in the config using the disable_proof_found_alert setting.

** πŸ€‘ Proof found! πŸ€‘ **
Your farm found a new partial or full proof

Following notifications are currently sent to the alert_service_url:

Sync lost alert

** 🚨 Farmer Lost Sync! 🚨 **
It seems like your farmer lost its connection to the Chia Network

Sync recovery alert

** βœ… Farmer Synced! βœ… **
Your farmer is successfully synced to the Chia Network again

Plots lost alert

Triggers when the total plot count of your farm drops below a configurable threshold (default: 1).

The corresponding lost_plots_alert_threshold parameter can be adjusted in the config.json.

** 🚨 Farmer Lost Plots! 🚨 **
It seems like your farmer lost some plots
Expected: 130, Found: 124

Plots recovery alert

** βœ… Farmer Plots recoverd! βœ… **
Your farmer's plot count has recovered to its previous value

Metrics

The following statistics are collected from your local Chia node using the RPC and WebSocket APIs and are then exported via a Prometheus compatible /metrics HTTP endpoint on port 8000.

Supported wallet metrics

  • Total balance (chia_confirmed_total_mojos)

Supported full node metrics

  • Sync status (chia_sync_status)
  • Peak height (chia_peak_height)
  • Difficulty (chia_diffculty)
  • Total netspace (chia_network_space)
  • Connection count (chia_connections_count)

Supported harvester metrics

  • OG plot count (chia_plot_count)
  • OG plot size (chia_plot_size)
  • Portable plot count (chia_portable_plot_count)
  • Portable plot size (chia_portable_plot_size)

Supported farmer metrics

  • Received signage points (chia_signage_points)
  • Received signage point index (chia_signage_point_index)
  • Attempted challenges (chia_block_challenges)
  • Plots passed filter (chia_plots_passed_filter)
  • Proofs found (chia_proofs_found)

Supported pooling metrics

  • Current Points (chia_current_pool_points)
  • Current difficulty (chia_current_pool_difficulty)
  • Points found (chia_pool_points_found_since_start)
  • Points acknowledged (chia_pool_points_acknowledged_since_start)
  • Pool errors 24h (chia_num_pool_errors_24h)

Prerequisites

To run this tool, we need the following things:

  • Python 3
  • Pipenv

Linux (Ubuntu)

sudo apt install python3 pipenv

Installation

  1. Clone the repository
git clone https://github.com/philippnormann/chia-monitor.git
cd chia-monitor
  1. Install the required dependecies
pipenv install 
  1. Initialize the SQLite database
pipenv run alembic upgrade head
  1. Copy the example config file
cp config-example.json config.json
  1. Open up config.json and configure it to your preferences.

Updating

  1. Pull the latest release from git
cd chia-monitor
git reset origin/main --hard
git pull
  1. Update the required dependecies
pipenv install
  1. Upgrade the SQLite database model
pipenv run alembic upgrade head

Usage

To use the tool, run the monitor module using pipenv from the chia-monitor directory

cd chia-monitor
pipenv run python -m monitor

Note: To run the tool in the background, you can run it as a service or in a detached screen.

Basic Prometheus Configuration

Add a block to the scrape_configs of your prometheus.yml config file:

scrape_configs:
  - job_name: chia_monitor
    static_configs:
    - targets: ['<<CHIA-MONITOR-HOSTNAME>>:8000']

and adjust the host name accordingly.

Architecture

architecture

Comments
  • Script gets stuck at

    Script gets stuck at "WARNING Error while collecting events. Trying again..."

    Once in a while I found the script getting stuck at:

    WARNING Error while collecting events. Trying again...

    This message is generated from 2 places in ws_collector and rpc_collector. I haven't verified again which one it is in my case, I'll update once I have this info.

    A workaround I did to have it running in a somewhat stable way, is to raise an asyncio.CancelledError() after the message self.log.warning(f"Error while collecting events....") so the process exits (hopefully.. I haven't dug deeper to make sure). And in addition to this chia-monitor is run from a .bat script that restarts it whenever it stops.

    opened by charnet3d 8
  • Notification instability, possibly due to concurrent access to sqlite db?

    Notification instability, possibly due to concurrent access to sqlite db?

    Hi there,

    Thanks for the awesome project! I'm having some trouble using this project with my farm. The code is connecting to the Chia RPC endpoints and getting data just fine, but the summary notifications seem to consistently break. I'm using discord for notifications, but I don't believe the issue is specific to the notification provider used.

    The usual pattern I see is that I get one notification sent successfully, and then nothing after that. This error will show up in the console, typically within a few minutes of starting up:

    2021-07-13T17:25:38.316 ERROR  Failed to retrieve event from DB. Please initialize DB using: 'pipenv run alembic upgrade head'
    

    After instrumenting the code a bit to print more stack trace and exception info, it looks like the underlying error is typically saying that the database is locked, e.g.:

    sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
    [SQL: SELECT sum(anon_1.plot_count) AS sum_1
    FROM (SELECT max(harvester_events.plot_count) AS plot_count
    FROM harvester_events
    WHERE harvester_events.ts > ? GROUP BY harvester_events.host) AS anon_1]
    [parameters: ('2021-07-13 17:25:03.302213',)]
    

    This error is always thrown in notifier.py in the await asyncio.gather(*tasks) call.

    I've attempted to rule out any DB corruption issues by deleting my DB and re-running alembic to create a fresh DB, but that doesn't seem to make any difference.

    Have you seen any issues like this in the past? Could it be due to multiple coroutines attempting to use the DB simultaneously?

    Happy to provide additional logs/context, just let me know. Thanks!

    opened by cmatthias 7
  • problem with price_collector.p

    problem with price_collector.p

    Grabbed the latest update, DB update failed... renamed history.sqlite and created a new one.

    When I run it I get the following error now.

    madbuda@tank:~/chia-monitor$ pipenv run python -m monitor
    Traceback (most recent call last):
      File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/home/madbuda/chia-monitor/monitor/__main__.py", line 14, in <module>
        from monitor.collectors.price_collector import PriceCollector
      File "/home/madbuda/chia-monitor/monitor/collectors/price_collector.py", line 17, in <module>
        class PriceCollector(Collector):
      File "/home/madbuda/chia-monitor/monitor/collectors/price_collector.py", line 21, in PriceCollector
        async def create(_root_path: Path, _net_config: Dict, event_queue: Queue[ChiaEvent]) -> Collector:
    TypeError: 'type' object is not subscriptable
    
    opened by madbuda 6
  • [BUG] RuntimeError: Event loop is closed

    [BUG] RuntimeError: Event loop is closed

    I am running perfect with this code for amost 20 hours. But then there is an error and the monitor stop.

    Operating System: Windows 10

    Here is the log

    2021-07-20T17:18:40.174 ERROR  Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000001E9EE70D670>
    transport: <_ProactorSocketTransport fd=2804 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
      File "C:\Python\Python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "C:\Python\Python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x000001E9EA4B80D0>
    Traceback (most recent call last):
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 316, in close
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "C:\Python\Python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "C:\Python\Python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "C:\Python\Python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "C:\Python\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    
    opened by brianjojoray 5
  • Added metrics: Pool points found/acknowledged last 24h

    Added metrics: Pool points found/acknowledged last 24h

    2 New metrics added and can be used with Prometheus and Grafana: The pool points found and acknowledged in the last 24h. Calculated the same way as the Chia GUI.

    opened by charnet3d 5
  • Windows pipenv install does not install packages

    Windows pipenv install does not install packages

    I ended up having to pipenv shell then run

    pip install bitstring==3.1.7 chiabip158==1.0 chiapos==1.0.3 chiavdf==1.0.2 clvm==0.9.7 clvm-rs==0.1.8 clvm-tools==0.4.3 concurrent-log-handler==0.9.19 dnspython==2.1.0 keyring==23.0.1 keyrings.cryptfile==1.3.4 setproctitle==1.2.2 sortedcontainers==2.3.0 websockets==8.1.0 aiohttp==3.7.4 click==7.1.2

    Quick PR to add requirements.txt and update readme https://github.com/philippnormann/chia-monitor/pull/10

    opened by madbuda 5
  • sth went wrong

    sth went wrong

    Hi,

    first of all. Thanks for your great work. Today after updating i cant get it to run.

    Even tried complete reinstall.

    error:

    Traceback (most recent call last):
      File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/home/chia/chia-monitor/monitor/__main__.py", line 85, in <module>
        lost_plots_alert_threshold = config["notifications"]["lost_plots_alert_threshold"]
    KeyError: 'lost_plots_alert_threshold'
    

    any suggestions?

    opened by Waldkotz 5
  • Adding chia-monitor systemd service and related files

    Adding chia-monitor systemd service and related files

    This PR contains the following, which has been tested on RHEL 8.4 x86_64.

    • chia-monitor.service for systemd
    • logrotate.d job for associated service logs
    • rsyslog.d handler for sifting chia-monitor log entries into dedicated file that logrotate.d job will manage

    Please see installation notes in the chia-monitor.service file for details.

    opened by em-winterschon 4
  • Guys, what's the problem? Suddenly report an error

    Guys, what's the problem? Suddenly report an error

    `2021-07-29T18:32:08.471 INFO 🏷️ Price in BTC: 0.0048449 2021-07-29T18:32:08.472 INFO 🏷️ Price in ETH: 0.08444829 2021-07-29T18:32:32.121 INFO πŸ›‘ Shutting down! 2021-07-29T18:32:32.125 ERROR Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7fc02bb335e0> 2021-07-29T18:32:32.125 INFO πŸ‘‹ Bye! 2021-07-29T18:32:32.157 ERROR Task exception was never retrieved future: <Task finished name='Task-11' coro=<WsCollector.task() done, defined at /home/chia/soft/chia-monitor/monitor/collectors/ws_collector.py:78> exception=KeyboardInterrupt()> Traceback (most recent call last): File "/home/chia/soft/chia-monitor/monitor/collectors/ws_collector.py", line 81, in task msg = await self.ws.receive_json() File "/home/chia/.local/share/virtualenvs/chia-monitor-Iocbb-0M/lib/python3.8/site-packages/aiohttp/client_ws.py", line 291, in receive_json data = await self.receive_str(timeout=timeout) File "/home/chia/.local/share/virtualenvs/chia-monitor-Iocbb-0M/lib/python3.8/site-packages/aiohttp/client_ws.py", line 276, in receive_str raise TypeError(f"Received message {msg.type}:{msg.data!r} is not str") TypeError: Received message 257:None is not str

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/chia/soft/chia-monitor/monitor/main.py", line 136, in asyncio.run(aggregator(exporter, notifier)) File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete self.run_forever() File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever self._run_once() File "/usr/lib/python3.8/asyncio/base_events.py", line 1859, in _run_once handle._run() File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run self._context.run(self._callback, *self._args) File "/home/chia/soft/chia-monitor/monitor/collectors/ws_collector.py", line 91, in task File "/usr/lib/python3.8/logging/init.py", line 1458, in warning self._log(WARNING, msg, args, **kwargs) File "/usr/lib/python3.8/logging/init.py", line 1589, in _log self.handle(record) File "/usr/lib/python3.8/logging/init.py", line 1599, in handle self.callHandlers(record) File "/usr/lib/python3.8/logging/init.py", line 1661, in callHandlers hdlr.handle(record) File "/usr/lib/python3.8/logging/init.py", line 954, in handle self.emit(record) File "/usr/lib/python3.8/logging/init.py", line 1085, in emit msg = self.format(record) File "/usr/lib/python3.8/logging/init.py", line 929, in format return fmt.format(record) File "/home/chia/.local/share/virtualenvs/chia-monitor-Iocbb-0M/lib/python3.8/site-packages/colorlog/colorlog.py", line 135, in format message = super(ColoredFormatter, self).format(record) File "/usr/lib/python3.8/logging/init.py", line 670, in format record.asctime = self.formatTime(record, self.datefmt) File "/usr/lib/python3.8/logging/init.py", line 606, in formatTime ct = self.converter(record.created) KeyboardInterrupt`

    opened by tangdasan 4
  • Crash when running in windows

    Crash when running in windows

    • I have 5 remote harvesters connecting to a farmer.

    Here is the error logs:

    Traceback (most recent call last):
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1770, in _execute_context
        self.dialect.do_execute(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\default.py", line 717, in do_execute
        cursor.execute(statement, parameters)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 99, in execute
        self._adapt_connection._handle_exception(error)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 228, in _handle_exception
        raise error
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 81, in execute
        self.await_(_cursor.execute(operation, parameters))
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 69, in await_only
        return current.driver.switch(awaitable)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 122, in greenlet_spawn
        value = await result
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\cursor.py", line 37, in execute
        await self._execute(self._cursor.execute, sql, parameters)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\cursor.py", line 31, in _execute
        return await self._conn._execute(fn, *args, **kwargs)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\core.py", line 129, in _execute
        return await future
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\core.py", line 102, in run
        result = function()
    sqlite3.IntegrityError: UNIQUE constraint failed: farming_info_events.ts
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "c:\users\admin\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Users\Admin\chia-monitor\monitor\__main__.py", line 112, in <module>
        asyncio.run(aggregator(exporter, notifier))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\runners.py", line 44, in run
        return loop.run_until_complete(main)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 642, in run_until_complete
        return future.result()
      File "C:\Users\Admin\chia-monitor\monitor\__main__.py", line 65, in aggregator
        await persist_event(event)
      File "C:\Users\Admin\chia-monitor\monitor\__main__.py", line 36, in persist_event
        await db_session.commit()
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\ext\asyncio\session.py", line 333, in commit
        return await greenlet_spawn(self.sync_session.commit)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 129, in greenlet_spawn
        result = context.switch(value)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 1428, in commit
        self._transaction.commit(_to_root=self.future)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 829, in commit
        self._prepare_impl()
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 808, in _prepare_impl
        self.session.flush()
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 3298, in flush
        self._flush(objects)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 3438, in _flush
        transaction.rollback(_capture_exception=True)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\langhelpers.py", line 70, in __exit__
        compat.raise_(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\compat.py", line 207, in raise_
        raise exception
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\session.py", line 3398, in _flush
        flush_context.execute()
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 456, in execute
        rec.execute(self)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\unitofwork.py", line 630, in execute
        util.preloaded.orm_persistence.save_obj(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\persistence.py", line 242, in save_obj
        _emit_insert_statements(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\orm\persistence.py", line 1094, in _emit_insert_statements
        c = connection._execute_20(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1582, in _execute_20
        return meth(self, args_10style, kwargs_10style, execution_options)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\sql\elements.py", line 323, in _execute_on_connection
        return connection._execute_clauseelement(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1451, in _execute_clauseelement
        ret = self._execute_context(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1813, in _execute_context
        self._handle_dbapi_exception(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1994, in _handle_dbapi_exception
        util.raise_(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\compat.py", line 207, in raise_
        raise exception
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\base.py", line 1770, in _execute_context
        self.dialect.do_execute(
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\engine\default.py", line 717, in do_execute
        cursor.execute(statement, parameters)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 99, in execute
        self._adapt_connection._handle_exception(error)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 228, in _handle_exception
        raise error
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\dialects\sqlite\aiosqlite.py", line 81, in execute
        self.await_(_cursor.execute(operation, parameters))
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 69, in await_only
        return current.driver.switch(awaitable)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\sqlalchemy\util\_concurrency_py3k.py", line 122, in greenlet_spawn
        value = await result
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\cursor.py", line 37, in execute
        await self._execute(self._cursor.execute, sql, parameters)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\cursor.py", line 31, in _execute
        return await self._conn._execute(fn, *args, **kwargs)
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\core.py", line 129, in _execute
        return await future
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiosqlite\core.py", line 102, in run
        result = function()
    sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: farming_info_events.ts
    [SQL: INSERT INTO farming_info_events (ts, challenge_hash, signage_point, passed_filter, proofs, total_plots) VALUES (?, ?, ?, ?, ?, ?)]
    [parameters: ('2021-07-12 17:27:17.517614', '0x06570eeaf05dee5c1255a107302bc7f62ae09f1a54db17fcf8727113e17e96d0', '0xc47c18b5091fa835e2f3632b01f91fb7a17874e7d5119d9b66d38ca2e5c5fff8', 1, 0, 778)]
    (Background on this error at: http://sqlalche.me/e/14/gkpj)
    2021-07-12T17:27:17.743 ←[31mERROR ←[0m Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x000002523B232970>←[0m
    2021-07-12T17:27:17.743 ←[31mERROR ←[0m Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x000002523B20C280>←[0m
    2021-07-12T17:27:17.745 ←[31mERROR ←[0m Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x000002523B20C7C0>←[0m
    2021-07-12T17:27:17.745 ←[31mERROR ←[0m Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x000002523B20CFA0>←[0m
    2021-07-12T17:27:17.745 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B232EB0>
    transport: <_ProactorSocketTransport fd=1160 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function ClientResponse.__del__ at 0x0000025239309940>
    Traceback (most recent call last):
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiohttp\client_reqrep.py", line 803, in __del__
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiohttp\connector.py", line 170, in release
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiohttp\connector.py", line 650, in _release
      File "C:\Users\Admin\.virtualenvs\chia-monitor--AE16joc\lib\site-packages\aiohttp\client_proto.py", line 63, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.748 ←[31mERROR ←[0m Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000002523B28B400>, 680519.984), (<aiohttp.client_proto.ResponseHandler object at 0x000002523B244B20>, 680519.984)]']
    connector: <aiohttp.connector.TCPConnector object at 0x000002523B20C2B0>←[0m
    2021-07-12T17:27:17.748 ←[31mERROR ←[0m Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000002523B28B520>, 680521.125)]']
    connector: <aiohttp.connector.TCPConnector object at 0x000002523B20CC40>←[0m
    2021-07-12T17:27:17.748 ←[31mERROR ←[0m Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000002523B2CC9A0>, 680520.89), (<aiohttp.client_proto.ResponseHandler object at 0x000002523B2B4760>, 680520.89), (<aiohttp.client_proto.ResponseHandler object at 0x000002523B28B9A0>, 680520.921)]']
    connector: <aiohttp.connector.TCPConnector object at 0x000002523B20C3A0>←[0m
    2021-07-12T17:27:17.749 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B20C970>
    transport: <_ProactorSocketTransport fd=1128 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.750 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B20CCA0>
    transport: <_ProactorSocketTransport fd=1248 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.752 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B232310>
    transport: <_ProactorSocketTransport fd=1152 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.754 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B2327C0>
    transport: <_ProactorSocketTransport fd=1156 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.755 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B25AD30>
    transport: <_ProactorSocketTransport fd=1252 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    2021-07-12T17:27:17.757 ←[31mERROR ←[0m Fatal error on SSL transport
    protocol: <asyncio.sslproto.SSLProtocol object at 0x000002523B24FF10>
    transport: <_ProactorSocketTransport fd=1516 read=<_OverlappedFuture cancelled>>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
        self._transport.write(chunk)
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 359, in write
        self._loop_writing(data=bytes(data))
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
        self._write_fut = self._loop._proactor.send(self._sock, data)
    AttributeError: 'NoneType' object has no attribute 'send'←[0m
    Exception ignored in: <function _SSLProtocolTransport.__del__ at 0x0000025237288E50>
    Traceback (most recent call last):
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 321, in __del__
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 316, in close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 593, in _start_shutdown
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 598, in _write_appdata
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 706, in _process_write_backlog
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\sslproto.py", line 720, in _fatal_error
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\proactor_events.py", line 151, in _force_close
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 746, in call_soon
      File "c:\users\admin\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 510, in _check_closed
    RuntimeError: Event loop is closed
    
    opened by nvg58 4
  • Random crash

    Random crash

    PC Specs: Windows 10, Ryzen 9 3900x, B550 Steel Legend, NO GPU. Python: 3.8.10, Chia: 1.1.7 The PC is it used with Remote Desktop Connection, the error happens some time (this time 10 min) after I have disconnected from the PC. The Error is large so I put it in a .txt file. Error.txt

    opened by TheBrigandRo 4
  • pipenv install

    pipenv install

    [root@chia chia-monitor]# pipenv install Installing dependencies from Pipfile.lock (6752a6)... Traceback (most recent call last): File "/usr/local/bin/pipenv", line 11, in sys.exit(cli()) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/pipenv/cli/options.py", line 56, in main return super().main(*args, **kwargs, windows_expand_args=False) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/pipenv/cli/command.py", line 241, in install site_packages=state.site_packages, File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 2102, in do_install keep_outdated=keep_outdated, File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 1343, in do_init pypi_mirror=pypi_mirror, File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 870, in do_install_dependencies project, normal_deps, procs, failed_deps_queue, requirements_dir, **install_kwargs File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 728, in batch_install dep for dep in deps_to_install if not project.environment.is_satisfied(dep) File "/usr/local/lib/python3.6/site-packages/pipenv/core.py", line 728, in dep for dep in deps_to_install if not project.environment.is_satisfied(dep) File "/usr/local/lib/python3.6/site-packages/pipenv/environment.py", line 859, in is_satisfied elif req.line_instance.specifiers is not None: File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2553, in line_instance self.line_instance = self.get_line_instance() File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 2547, in get_line_instance return Line(line) File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 171, in init self.parse() File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1289, in parse self.parse_extras() File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 577, in parse_extras self.line, extras = pip_shims.shims._strip_extras(self.line) TypeError: 'NoneType' object is not callable

    opened by vahan690 0
  • Failed to create any collector

    Failed to create any collector

    • running on the farm node
    • Port can be reached(have test rpc conn)
    2022-08-08T09:53:39.812 INFO   πŸ”Œ Creating RPC Collector...
    2022-08-08T09:53:39.869 INFO   πŸ”Œ Creating WebSocket Collector...
    192.168.1.116
    55400
    2022-08-08T09:53:39.874 WARNING Failed to create WebSocket collector. Continuing without it. ConnectionError: Failed to connect to WebSocket API
    2022-08-08T09:53:39.874 INFO   πŸ”Œ Creating Price Collector...
    2022-08-08T09:53:39.874 ERROR  Failed to create any collector.
    2022-08-08T09:53:39.875 INFO   πŸ›‘ Shutting down!
    Traceback (most recent call last):
      File "/opt/py37/lib/python3.7/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/opt/py37/lib/python3.7/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/data/chia-monitor/monitor/__main__.py", line 146, in <module>
        asyncio.run(aggregator(exporter, notifier, rpc_refresh_interval, price_refresh_interval))
      File "/opt/py37/lib/python3.7/asyncio/runners.py", line 43, in run
        return loop.run_until_complete(main)
      File "/opt/py37/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
        return future.result()
      File "/data/chia-monitor/monitor/__main__.py", line 96, in aggregator
        rpc_task.cancel()
    UnboundLocalError: local variable 'rpc_task' referenced before assignment
    2022-08-08T09:53:39.973 ERROR  Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x7f028a882090>
    2022-08-08T09:53:39.974 ERROR  Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x7f028a875d50>
    2022-08-08T09:53:39.974 ERROR  Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x7f028a875e90>
    2022-08-08T09:53:39.974 ERROR  Unclosed client session
    client_session: <aiohttp.client.ClientSession object at 0x7f028a884690>
    2022-08-08T09:53:39.974 ERROR  Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f028a854f30>, 100812.472507268)]']
    connector: <aiohttp.connector.TCPConnector object at 0x7f028a875c90>
    2022-08-08T09:53:39.974 ERROR  Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f028a7f73d0>, 100812.489107945)]']
    connector: <aiohttp.connector.TCPConnector object at 0x7f028a875990>
    2022-08-08T09:53:39.975 ERROR  Unclosed connector
    connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f028a7f77c0>, 100812.506969851)]']
    connector: <aiohttp.connector.TCPConnector object at 0x7f028a884b50>
    
    
    opened by shpdnkti 0
  • pipenv install

    pipenv install

    Fresh Ubuntu 22.04 installation Grafana installed and running on localhost:3000 Prometheus installed and running on localhost:9090 Python 3.10.4 installed

    After "pipenv install" command I have this error: chiaminer@grapheneTest:~$ cd chia-monitor/ chiaminer@grapheneTest:~/chia-monitor$ pipenv install Traceback (most recent call last): File "/usr/bin/pipenv", line 33, in sys.exit(load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in call return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 347, in install from .import core File "/usr/lib/python3/dist-packages/pipenv/core.py", line 21, in import requests File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/init.py", line 65, in from . import utils File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/utils.py", line 27, in from .cookies import RequestsCookieJar, cookiejar_from_dict File "/usr/lib/python3/dist-packages/pipenv/vendor/requests/cookies.py", line 172, in class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): AttributeError: module 'collections' has no attribute 'MutableMapping' chiaminer@grapheneTest:~/chia-monitor$

    Any solutions?

    opened by vaclavkanera 4
  • Add option to disable price collector and improve configuration code

    Add option to disable price collector and improve configuration code

    Add option to disable price collector. Price collector is not always needed, especially if you have few instances of chia-monitor running. Then only one price collecting point is sufficient.

    As I dived into the code, I thought that it would be good to improve the whole storage of configuration parameters, as more and more config options where passed by multiple arguments to their destination. What do you think about this?

    opened by danielsemkowicz 0
  • Failed to persist event in DB

    Failed to persist event in DB

    Hi - I've been running chia-monitor on my RPi4 farmer (Ubuntu 21.04) for a few months now. I've noticed this issue/error recently. When it has happened in the past I have run the 'pipenv run alembic upgrade head' and restarted just fine but within a few days or even within the day the error occurs again. I've also removed the DB and started fresh but this has re-occurred. Are there any insights into the error that you can share or further steps in research you suggest?

    `2022-02-27T22:50:15.922 ERROR Failed to persist event to DB. Please initialize DB using: 'pipenv run alembic upgrade head' Traceback (most recent call last): File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 998, in _commit_impl self.engine.dialect.do_commit(self.connection) File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 672, in do_commit dbapi_connection.commit() sqlite3.OperationalError: database is locked

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/home/******/chia-monitor/monitor/main.py", line 81, in aggregator persist_event(event) File "/home/******/chia-monitor/monitor/main.py", line 40, in persist_event db_session.commit() File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1428, in commit self._transaction.commit(_to_root=self.future) File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 836, in commit trans.commit() File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2361, in commit self._do_commit() File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2544, in _do_commit self._connection_commit_impl() File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2515, in _connection_commit_impl self.connection._commit_impl() File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1000, in _commit_impl self.handle_dbapi_exception(e, None, None, None, None) File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2026, in handle_dbapi_exception util.raise( File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 207, in raise raise exception File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 998, in _commit_impl self.engine.dialect.do_commit(self.connection) File "/home/******/.local/share/virtualenvs/chia-monitor-jOrTMuHc/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 672, in do_commit dbapi_connection.commit() sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked (Background on this error at: https://sqlalche.me/e/14/e3q8) 2022-02-27T22:50:15.994 INFO ο›‘ Shutting down! `

    opened by nothingshocking 4
Owner
Philipp Normann
Master in IT-Security at @fh-wedel. TensorFlorist at @otto-de
Philipp Normann
A comprehensive CRUD API generator for SQLALchemy.

FastAPI Quick CRUD Introduction Advantage Constraint Getting started Installation Usage Design Path Parameter Query Parameter Request Body Upsert Intr

null 192 Jan 6, 2023
A RESTful API for creating and monitoring resource components of a hypothetical build system. Built with FastAPI and pydantic. Complete with testing and CI.

diskspace-monitor-CRUD Background The build system is part of a large environment with a multitude of different components. Many of the components hav

Nick Hopewell 67 Dec 14, 2022
Restful Api developed with Flask using Prometheus and Grafana for monitoring and containerization with Docker :rocket:

Hephaestus ?? In Greek mythology, Hephaestus was either the son of Zeus and Hera or he was Hera's parthenogenous child. ... As a smithing god, Hephaes

Yasser Tahiri 16 Oct 7, 2022
Fastapi performans monitoring

Fastapi-performans-monitoring This project is a simple performance monitoring for FastAPI. License This project is licensed under the terms of the MIT

bilal alpaslan 11 Dec 31, 2022
Run your jupyter notebooks as a REST API endpoint. This isn't a jupyter server but rather just a way to run your notebooks as a REST API Endpoint.

Jupter Notebook REST API Run your jupyter notebooks as a REST API endpoint. This isn't a jupyter server but rather just a way to run your notebooks as

Invictify 54 Nov 4, 2022
Turns your Python functions into microservices with web API, interactive GUI, and more.

Instantly turn your Python functions into production-ready microservices. Deploy and access your services via HTTP API or interactive UI. Seamlessly export your services into portable, shareable, and executable files or Docker images.

Machine Learning Tooling 2.8k Jan 4, 2023
Easy and secure implementation of Azure AD for your FastAPI APIs πŸ”’

FastAPI-Azure-auth Azure AD Authentication for FastAPI apps made easy. ?? Description FastAPI is a modern, fast (high-performance), web framework for

Intility 216 Dec 27, 2022
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚑ Create CRUD routes with lighting speed ⚑ A dynamic FastAPI router that automatically creates CRUD routes for your models

Adam Watkins 950 Jan 8, 2023
Easily integrate socket.io with your FastAPI app πŸš€

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Srdjan Stankovic 210 Dec 23, 2022
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚑ Create CRUD routes with lighting speed ⚑ A dynamic FastAPI router that automatically creates CRUD routes for your models Documentation: https://fast

Adam Watkins 943 Jan 1, 2023
Instrument your FastAPI app

Prometheus FastAPI Instrumentator A configurable and modular Prometheus Instrumentator for your FastAPI. Install prometheus-fastapi-instrumentator fro

Tim Schwenke 441 Jan 5, 2023
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚑ Create CRUD routes with lighting speed ⚑ A dynamic FastAPI router that automatically creates CRUD routes for your models Documentation: https://fast

Adam Watkins 130 Feb 13, 2021
Easily integrate socket.io with your FastAPI app πŸš€

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Srdjan Stankovic 37 Feb 12, 2021
Instrument your FastAPI app

Prometheus FastAPI Instrumentator A configurable and modular Prometheus Instrumentator for your FastAPI. Install prometheus-fastapi-instrumentator fro

Tim Schwenke 55 Feb 17, 2021
A FastAPI Middleware of joerick/pyinstrument to check your service performance.

fastapi_profiler A FastAPI Middleware of joerick/pyinstrument to check your service performance. ?? Info A FastAPI Middleware of pyinstrument to check

LeoSun 107 Jan 5, 2023
A basic JSON-RPC implementation for your Flask-powered sites

Flask JSON-RPC A basic JSON-RPC implementation for your Flask-powered sites. Some reasons you might want to use: Simple, powerful, flexible and python

Cenobit Technologies 273 Dec 1, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
Adds GraphQL support to your Flask application.

Flask-GraphQL Adds GraphQL support to your Flask application. Usage Just use the GraphQLView view from flask_graphql from flask import Flask from flas

GraphQL Python 1.3k Dec 31, 2022
Lazy package to start your project using FastAPI✨

Fastapi-lazy ?? Utilities that you use in various projects made in FastAPI. Source Code: https://github.com/yezz123/fastapi-lazy Install the project:

Yasser Tahiri 95 Dec 29, 2022