EugenMayer/docker-sync · error

Error getting sync_host_ip automatically, exit code #{$?.exi

Error message

Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}

What it means

Error "Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}" thrown in EugenMayer/docker-sync.

Source

Thrown at lib/docker-sync/sync_process.rb:79

        @watch_strategy = DockerSync::WatchStrategy::Fswatch.new(@sync_name, @options)
      when 'dummy'
        @watch_strategy = DockerSync::WatchStrategy::Dummy.new(@sync_name, @options)
      when 'unison'
        @watch_strategy = DockerSync::WatchStrategy::Unison.new(@sync_name, @options)
      when 'remotelogs'
        @watch_strategy = DockerSync::WatchStrategy::Remote_logs.new(@sync_name, @options)
      else
        raise "Unknown watch_strategy #{@options['watch_strategy']}"
      end
    end

    def get_host_ip_default
      return '127.0.0.1' unless Dependencies::Docker::Driver.docker_toolbox?

      cmd = 'docker-machine ip $(docker-machine active)'
      stdout, stderr, exit_status = Open3.capture3(cmd)
      unless exit_status.success?
        raise "Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}"
      end
      stdout.gsub("\n",'')
    end

    def run
      @sync_strategy.run
      @watch_strategy.run
    end

    def stop
      @sync_strategy.stop
      @watch_strategy.stop
    end

    def clean
      @sync_strategy.clean
      @watch_strategy.clean
    end

View on GitHub (pinned to 4eab6de164)

Solutions

  1. Set sync_host_ip explicitly in your docker-sync.yml instead of relying on auto-detection
  2. Ensure docker-machine is installed and an active machine exists: run 'docker-machine active' and 'docker-machine ip $(docker-machine active)' manually to verify
  3. Upgrade away from docker-toolbox; with Docker Desktop sync_host_ip defaults to 127.0.0.1 and auto-detection is skipped

Example fix

sync_options:
  sync_host_ip: '127.0.0.1'

When it happens

Trigger: Thrown at lib/docker-sync/sync_process.rb:79 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of EugenMayer/docker-sync@4eab6de164 (2026-08-23). Data as JSON: /api/errors/2786dfc5627c2aef. Report an issue: GitHub.