Resolve port problem on macos