grimoire icon indicating copy to clipboard operation
grimoire copied to clipboard

ConnectionRefused: Unable to connect. Is the computer able to access the url? path: "<url>"

Open ndpm13 opened this issue 10 months ago • 2 comments

Describe the bug When I tried to add a new bookmark nothings happens and I get this error in the logs:

Fetching metadata for URL:  <url>

ConnectionRefused: Unable to connect. Is the computer able to access the url?
 path: "<url>"

To Reproduce

  1. I used this docker-compose.yml:
services:
  grimoire:
    image: goniszewski/grimoire:main # this happens with latest as well
    container_name: grimoire
    restart: unless-stopped
    environment:
      - PORT=5173
      - PUBLIC_HTTPS_ONLY=false
      - PUBLIC_SIGNUP_DISABLED=false
    volumes:
      - grimoire_data:/app/data/
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:$PORT/api/health || exit 1
      interval: 30s
      timeout: 10s
      retries: 3
    ports:
      - '${PORT:-5173}:${PORT:-5173}'
volumes:
  grimoire_data:
  1. Create an admin account
  2. Add a new bookmark
  3. See error in the logs
Fetching metadata for URL:  <url>

ConnectionRefused: Unable to connect. Is the computer able to access the url?
 path: "<url>"

Expected behavior To not see the error ig? I literally can't add bookmarks

Desktop:

  • Device: Latitude E5450
  • OS: Void Linux
  • Browser: Brave
  • Version: Latest (I update my system regularly)

Host

  • Device: Thinkpad L420
  • OS: Alpine Linux v3.21
  • Containerization Tools: Podman version 5.3.2

Additional context I removed the build step from the compose file, but since the it ran find and I could log in to the web app I assumed it's not what's causing the issue.

ndpm13 avatar Feb 22 '25 08:02 ndpm13

I was facing the same issue and I suspect that is related to my lab/containers networking. I didn't have much time to troubleshoot, but I was able to workaround the issue adding a DNS block to my docker-compose.yml file:

services:
  grimoire:
    dns:
      - 1.1.1.1
    image: goniszewski/grimoire:latest
    container_name: grimoire

As the error states, apparently the container is not able to reach/resolve the URL that we're trying to add/save.

I'm planning to investigate the issue deeper this week , but you could try this as a temporary workaround.

vmalafaia avatar Feb 24 '25 00:02 vmalafaia

Are you using podman as well? I got a feeling that's what is causing this problem. I did try adding the DNS block but it didn't seem to have effect, however I did manage to get it work by changing the network mode to host like this:

services:
  grimoire:
    image: goniszewski/grimoire:latest # or change from 'latest' to 'preview' to use the latest preview version
    container_name: grimoire
    network_mode: "host"

The only reason I'm not using this "solution" is because I have no idea what is it exactly that it does and was afraid to end up breaking my other containers.

ndpm13 avatar Feb 24 '25 11:02 ndpm13