{"record":{"id":"2786dfc5627c2aef","repo":"EugenMayer/docker-sync","slug":"error-getting-sync-host-ip-automatically-exit-cod","errorCode":null,"errorMessage":"Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}","messagePattern":"Error getting sync_host_ip automatically, exit code #(.+?) \\.\\.\\. #(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/docker-sync/sync_process.rb","lineNumber":79,"sourceCode":"        @watch_strategy = DockerSync::WatchStrategy::Fswatch.new(@sync_name, @options)\n      when 'dummy'\n        @watch_strategy = DockerSync::WatchStrategy::Dummy.new(@sync_name, @options)\n      when 'unison'\n        @watch_strategy = DockerSync::WatchStrategy::Unison.new(@sync_name, @options)\n      when 'remotelogs'\n        @watch_strategy = DockerSync::WatchStrategy::Remote_logs.new(@sync_name, @options)\n      else\n        raise \"Unknown watch_strategy #{@options['watch_strategy']}\"\n      end\n    end\n\n    def get_host_ip_default\n      return '127.0.0.1' unless Dependencies::Docker::Driver.docker_toolbox?\n\n      cmd = 'docker-machine ip $(docker-machine active)'\n      stdout, stderr, exit_status = Open3.capture3(cmd)\n      unless exit_status.success?\n        raise \"Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}\"\n      end\n      stdout.gsub(\"\\n\",'')\n    end\n\n    def run\n      @sync_strategy.run\n      @watch_strategy.run\n    end\n\n    def stop\n      @sync_strategy.stop\n      @watch_strategy.stop\n    end\n\n    def clean\n      @sync_strategy.clean\n      @watch_strategy.clean\n    end","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/EugenMayer/docker-sync/blob/4eab6de164d44c724c739c17bd574efa9008aae1/lib/docker-sync/sync_process.rb#L61-L97","documentation":"Error \"Error getting sync_host_ip automatically, exit code #{$?.exitstatus} ... #{stderr}\" thrown in EugenMayer/docker-sync.","triggerScenarios":"Thrown at lib/docker-sync/sync_process.rb:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set sync_host_ip explicitly in your docker-sync.yml instead of relying on auto-detection","Ensure docker-machine is installed and an active machine exists: run 'docker-machine active' and 'docker-machine ip $(docker-machine active)' manually to verify","Upgrade away from docker-toolbox; with Docker Desktop sync_host_ip defaults to 127.0.0.1 and auto-detection is skipped"],"exampleFix":"sync_options:\n  sync_host_ip: '127.0.0.1'","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4eab6de164d44c724c739c17bd574efa9008aae1","analyzedAt":"2026-08-23T10:20:11.101Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}