nextcloud / context_chat_backend

GNU Affero General Public License v3.0
4 stars 5 forks source link

[install-help]: "Default Deploy Daemon is not accessible" on AIO #25

Closed Stooovie closed 3 months ago

Stooovie commented 4 months ago

Describe the issue Cannot install Context Chat Backend app.

I'm getting "Default Deploy Daemon is not accessible. Please verify its configuration." on NC AIO. Docker is running.

Tried adding a new one: (Daemon configuration template: All-in-One), same result

ls -l /var/run/docker.sock returns srw-rw---- 1 root docker 0 Mar 26 16:37 /var/run/docker.sock

Tried adding www-data to group docker as suggested in a different thread here, which resulted in AppAPI disappearing from NC GUI altogether (??).

Server logs (if applicable)

ConnectException
cURL error 6: Could not resolve host: nextcloud-aio-docker-socket-proxy (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://nextcloud-aio-docker-socket-proxy:2375/v1.41/_ping
Could not connect to Docker daemon

Setup Details (please complete the following information):

Any tips? Thanks!

bigcat88 commented 4 months ago

What is the reason not to use Docker Socket Proxy? That one that comes with AIO or this one?

Stooovie commented 4 months ago

Am I not using Docker Socket Proxy? I follow the installation instructions of this app and this is what's happening. Getting stuck at step 3.

bigcat88 commented 4 months ago

Could not resolve host: nextcloud-aio-docker-socket-proxy

sorry, my bad.

Does Nextcloud container and aio-docker-socket-proxy are in the same docker network? Can you ping from Nextcloud the "nextcloud-aio-docker-socket-proxy" url?

Stooovie commented 4 months ago

I have no idea how to do that. I find Docker super confusing. I sort of understand how it works but I have no idea how to ping the socket proxy URL and where from. The LXC's shell?

I understand this is beta software, not ready for public. I can't make this work.

bigcat88 commented 4 months ago

Where is Nextcloud installed? In an LCX(Proxmox) container? Or inside a docker container?

Stooovie commented 4 months ago

Proxmox LXC with docker inside. I don't remember how I installed this (using this fine for half a year now), but it should be a proper installation method.

I see there are instructions here to follow point 4 from here: [Complex install from Docker](https://github.com/nextcloud/context_chat_backend/?tab=readme-ov-file#complex-install-with-docker)

I seem to already have that (-v /var/run/docker.sock:/var/run/docker.sock:ro) in the docker command that's used to run NC:

sudo docker run --sig-proxy=false --name nextcloud-aio-mastercontainer --restart always --publish 8080:8080 --env APACHE_PORT=11000 --env APACHE_IP_BINDING=0.0.0.0 --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config --security-opt label=disabled --volume /var/run/docker.sock:/var/run/docker.sock:ro nextcloud/all-in-one:latest

bigcat88 commented 3 months ago

To help diagnose why NC can not see nextcloud-aio-docker-socket-proxy container we need:

  1. Use docker network ls
  2. With docker network inspect "NETWORK_ID" where NETWORK_ID is the ID of network you think both containers are connected to, take a look and see why one container can not see other by it's DNS name.

Probably this issue relates more to AIO repo, there is nothing related to context_chat in this issue.

Stooovie commented 3 months ago

1)

97bcc342eac2   bridge          bridge    local
06f39fe0e423   host            host      local
76175048923b   nextcloud-aio   bridge    local
f5096a9aada6   none            null      local

2) docker network inspect 76175048923b (the nextcloud-aionetwork) results:

[
    {
        "Name": "nextcloud-aio",
        "Id": "76175048923b3e200ee8f403179359e40ce079d5162e40f0bd2ff49f15b9eae5",
        "Created": "2023-05-17T07:29:39.06829896Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "20fde6326717660da58363ed442bad25e895b8295fbeebc82738e0a5e64148e4": {
                "Name": "nextcloud-aio-collabora",
                "EndpointID": "b321d9f725cc90193318ba9f141400e2c87882f09a51e236d5639aa2b00923bb",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            },
            "3ff1d741241672c00e249c31b66e127cfee2d5c23c2ce07274fdef7bf71da93c": {
                "Name": "nextcloud-aio-notify-push",
                "EndpointID": "f8f22820466917e2bc34e302579ecd117be3c91d2c46128e03d93a7830279ed9",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "5a49278a0007a7cab83e6a60e112f33b09c6af1ba5955c89610a9e528e31dc43": {
                "Name": "nextcloud-aio-fulltextsearch",
                "EndpointID": "e990fe81b1c3ce989c0e1bb57572482ad64f2bd18fa70a8bb730a34a9c28676b",
                "MacAddress": "02:42:ac:12:00:08",
                "IPv4Address": "172.18.0.8/16",
                "IPv6Address": ""
            },
            "7634d1cfb740f4beb71f1c9c71077b4acd2512383dc13b9fa47ec54a2cb6ebb9": {
                "Name": "nextcloud-aio-nextcloud",
                "EndpointID": "066bdf151102f487d8bc52634ca72dd03e48c064e52e0f4dfb596cbf349c16d6",
                "MacAddress": "02:42:ac:12:00:06",
                "IPv4Address": "172.18.0.6/16",
                "IPv6Address": ""
            },
            "79eae567c72770ae3130a7ef9dd904f12fb49287951bfd9a93bc9f05c320d85c": {
                "Name": "nextcloud-aio-redis",
                "EndpointID": "5eace0cb4a37a3374f8f64b9533fbde663773ee30e906e4c41154a7dff5a436c",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "86076175670c9bde81b477f8229e2432ad03ce6e4a0f253d3cf1f8a4fdc56ce1": {
                "Name": "nextcloud-aio-apache",
                "EndpointID": "c003f7e535986288a87c4ba0c0330b3efcd7b34cdc390bca69b8f95ffcfaa9db",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            },
            "d5d43df9fd7c86e66125cf441e6a3b3dd6810d38449e813f7ae3995ec49b5c6b": {
                "Name": "nextcloud-aio-imaginary",
                "EndpointID": "32200cbbf5e58df57401c3c36de0eac08ab7c4cddb1d34a8cc3a5e2815f65834",
                "MacAddress": "02:42:ac:12:00:07",
                "IPv4Address": "172.18.0.7/16",
                "IPv6Address": ""
            },
            "f1fe58c0b72ec73254f84ef185fff1bf62a52280352a75cecda9e881b272760d": {
                "Name": "nextcloud-aio-database",
                "EndpointID": "c1958982507d3a2eb24571414deee6ee32641ed2d59521359da715dd1f127608",
                "MacAddress": "02:42:ac:12:00:09",
                "IPv4Address": "172.18.0.9/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]
bigcat88 commented 3 months ago

As you see yourself AIO Docker Socket Proxy is not present in this network..

That is the reason for cURL error 6: Could not resolve host: nextcloud-aio-docker-socket-proxy

Stooovie commented 3 months ago

Any idea why that is or how can I fix it? Shouldn't it be a part of AIO? If I'm not mistaken, according to the documentation all this should work by default on AIO.

bigcat88 commented 3 months ago

Any idea why that is or how can I fix it?

There is two ways:

  1. Reinstall AIO and tick the box to install AIO Docker Socket Proxy
  2. Install AppAPI Docker Socket Proxy (with --net=nextcloud-aio and use template for usual DSP)

I can only assist only with the second way(we did not test it with AIO install, but I do not see any reason not to work). About the first way better to ask in AIO repo.

Stooovie commented 3 months ago

Fantastic, 1st way was the way, thanks!

kyteinsky commented 3 months ago

Thanks Alexander! Closing this issue now.