Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.local domains very unreliable #1160

Open
janfjohannes opened this issue Apr 30, 2024 · 10 comments
Open

.local domains very unreliable #1160

janfjohannes opened this issue Apr 30, 2024 · 10 comments
Labels
t/bug Something isn't working

Comments

@janfjohannes
Copy link

Describe the bug

.local domains stop working randomly especially after the containers run for a longer time. only solution is to restart docker compose, but this also is flaky

To Reproduce

use .local domains with docker compose with longer running containers

Expected behavior

.local domains should always work instant. there should be a setting to modify the dns cache or have some insights into what is happening.

Diagnostic report (REQUIRED)

OrbStack info:
Version: 1.5.1
Commit: 4cfac15e1080617c70eb163966e1cb2009dac1c2 (v1.5.1)

System info:
macOS: 14.2.1 (23C71)
CPU: arm64, 12 cores
CPU model: Apple M2 Max
Model: Mac14,5
Memory: 32 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2024-04-30T19-36-44.541384Z.zip

Screenshots and additional context (optional)

No response

@janfjohannes janfjohannes added the t/bug Something isn't working label Apr 30, 2024
@kdrag0n
Copy link
Member

kdrag0n commented May 1, 2024

Please share a screenshot of the exact error message you're seeing when trying to connect to a domain that isn't working.

Also, a sample project to reproduce this would be helpful.

@lucidNTR
Copy link

lucidNTR commented May 1, 2024

short update: it is more reliable to "fix" this problem by quitting orbstack and restarting orbstack than the containers, which might sometimes work and take a while to load on the first reload of the page, while quitting and restarting the orbstack application seems to make the domain resolve immediately after the restart. (screenshots comming asap)

@janfjohannes

This comment was marked as outdated.

@janfjohannes
Copy link
Author

unfortunately the issue reappeared
Screenshot 2024-05-03 at 00 22 54
Screenshot 2024-05-02 at 23 24 23

@janfjohannes
Copy link
Author

janfjohannes commented May 2, 2024

my docker compose example is here, though it feels this is is happening to all my setups.
so far the issue appeared always after around 1 day the latest
(the "git" service is just an nginx standard image proxying to the gitea instance)

version: '3.7'
name: lix
services:
  git:
    restart: always
    container_name: git
    image: git:12
    hostname: git
    ports: [ "8000" ]
    labels: [ dev.orbstack.domains=git.local ]
    entrypoint: /start.sh
    build:
      context: ./server/git-test-server
      dockerfile: Dockerfile
    networks:
      - lix
    user: root

  gitea:
    labels: [ dev.orbstack.domains=gitea.local ]
    image: gitea/gitea:1.21.11
    container_name: gitea
    hostname: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - lix
    volumes:
      - ./gitea:/data
    ports:
      - "3000:3000"

  runner:
    restart: always
    container_name: gitea-runner
    hostname: runner
    image: gitea/act_runner:nightly
    environment:
      CONFIG_FILE: /config.yaml
      GITEA_INSTANCE_URL: "http://gitea.local:3000"
      GITEA_RUNNER_REGISTRATION_TOKEN: "token"
      GITEA_RUNNER_NAME: "local"
      GITEA_RUNNER_LABELS: ""
    volumes:
      - ./gitea/runner/config.yaml:/config.yaml
      - ./gitea/runner:/data
      - /var/run/docker.sock:/var/run/docker.sock

networks:
  lix:
    driver: bridge

volumes:
  pnpm-store: {}

@janfjohannes
Copy link
Author

i could not 100% confirm sleep mode does have a connection, but it seems that dns failing is always reproducible after a longer time of sleep mode of the macbook

@janfjohannes
Copy link
Author

@kdrag0n any updates on this? this is the last blocker from my perspective to introduce orbstack into my team at work and also buy licenses....

@kdrag0n
Copy link
Member

kdrag0n commented May 18, 2024

We can't reproduce this unfortunately. It'd be great if you could figure out what's causing it, e.g. some network-related software / configs / VPNs / proxy or anything that could be interfering with the domains on your machine.

@janfjohannes
Copy link
Author

janfjohannes commented May 18, 2024

@kdrag0n thanks :/ could you give me any starter to debug this? eg. how did you implement this? is this mDNS / zeroconf based? I think you support other endings besides .local which would not be possible in mDNS right? any terminal commands like dig i should use?

@janfjohannes
Copy link
Author

this gets worse as much as i investigate. it also appears orbstack can mix up the urls of services very rarely, but enough to be potentially horrific. eg. service exp.local sometimes just resolves to git.local until orbstack is restarted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants