Skip to content

How to configure external DB like postgres when using fledge IOT as docker compose service #1572

@skumarorxa

Description

@skumarorxa

Currently there is option in the fledge GUI to select postgres as stoarge plugin but when fledge restarted it throws up error saying cannot connect to postgres db. How do I configure fledge service running as docker-compose service to external posgres db outside the fledge container but in the same network basically the ENV variable which I can pass to fledge container to connect to posgres

I even tried to install posgres server and client inside the fledge container as described in the document https://fledge-iot.readthedocs.io/en/latest/storage.html. and start the posrgres service before fledge starts. And when change in the fledge - gui configuration of strorage to postgres and restart the fledge I get following error - ion: /usr/local/fledge
Feb 28 11:30:43 099d827b97e6 Fledge[134] INFO: service_registry: fledge.services.core.service_registry.service_registry: Registered service instance id=63d94016-c91e-433a-8e39-22e638bf1164: <Fledge Storage, type=Storage, protocol=http, address=localhost, service port=40329, management port=46261, status=1>
Feb 28 11:30:43 099d827b97e6 Fledge Storage[898]: ERROR: Failed to register configuration category: {"error": {"message": "[AttributeError] 'NoneType' object has no attribute 'register'"}}.
Feb 28 11:30:45 099d827b97e6 Fledge Storage[898]: ERROR: Failed to register configuration category: {"error": {"message": "[AttributeError] 'NoneType' object has no attribute 'register'"}}.
Feb 28 11:30:47 099d827b97e6 Fledge Storage[898]: ERROR: PostgreSQL storage plugin raising error: ERROR: relation "fledge.readings" does not exist#012LINE 1: SELECT "id" FROM fledge.readings LIMIT 1;#12 ^
Feb 28 11:30:49 099d827b97e6 Fledge Storage[898]: ERROR: Register configuration category failed Connection refused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions