无法打开 Eclipse Marketplace 无法安装远程市场位置:无法解析主机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41720780/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot open Eclipse Marketplace Cannot install remote marketplace locations: Cannot resolve host
提问by Vishal
I am using eclipse Kepler version and trying to install Sonar plugin from Eclipse marketplace. But I am getting below error
我正在使用 eclipse Kepler 版本并尝试从 Eclipse 市场安装声纳插件。但我得到以下错误
Cannot open Eclipse Marketplace Cannot install remote marketplace locations: Cannot resolve host
This is most often caused by a problem with your internet connection. Please check your internet connection and retry. Unknown Host: http://marketplace.eclipse.org/catalogs/api/pmarketplace.eclipse.org Cannot resolve host
This is most often caused by a problem with your internet connection. Please check your internet connection and retry. marketplace.eclipse.org
无法打开 Eclipse Marketplace 无法安装远程市场位置:无法解析主机
这通常是由您的互联网连接问题引起的。请检查您的互联网连接并重试。未知主机:http: //marketplace.eclipse.org/catalogs/api/pmarketplace.eclipse.org无法解析主机
这通常是由您的互联网连接问题引起的。请检查您的互联网连接并重试。市场.eclipse.org
I tried below things as per solution suggested by some people.
我按照某些人建议的解决方案尝试了以下内容。
- Go to Window-> Preferences -> General -> Network Connection. And change below settings Active Provider-> Manual-> and check---> HTTP, HTTPS and SOCS. After restarting eclipse still the problem persisted.
- I tried connecting to google.com from Eclipse Internet Explorer and able to see google homepage
- Added line in eclipse.ini file -vmargs -Djava.net.preferIPv4Stack=trueBut still same issue
- 转到窗口-> 首选项-> 常规-> 网络连接。并更改以下设置 Active Provider-> Manual-> 并检查 ---> HTTP、HTTPS 和 SOCS。重启eclipse后问题依旧。
- 我尝试从 Eclipse Internet Explorer 连接到 google.com 并且能够看到 google 主页
- 在 eclipse.ini 文件中添加了一行 -vmargs -Djava.net.preferIPv4Stack=true但仍然是同样的问题
I am really frustated by this issue and couldn't find any help anywhere. If anyone has faced this issue and has an effective resolution, please assist.
我真的对这个问题感到沮丧,在任何地方都找不到任何帮助。如果有人遇到过这个问题并且有一个有效的解决方案,请提供帮助。
回答by Harshit Saxena
The solution is:
解决办法是:
Go to-Window->Preferences->General->Network Connections
Choose "Active Provider" To "Direct"
then click "apply" and then "ok".
转到-窗口->首选项->常规->网络连接
选择“Active Provider”到“Direct”
然后单击“应用”,然后单击“确定”。
It will Start Opening.
它将开始打开。
回答by Susarjit
- Go to: Window->Preferences->General->Network Connections
- Choose "Active Provider" To "Native"
- Click 'apply' and then 'Ok'
- 转到:窗口->首选项->常规->网络连接
- 选择“Active Provider”到“Native”
- 单击“应用”,然后单击“确定”
NOTE: I gone through all possibilities - marketplace.eclipse.org/catalogs/api* (Not Working) - change 'Active Provider' to 'Manual'/'Direct'(Not Working) - Disable Proxies entries/Bypass(Not Working)
注意:我经历了所有的可能性——marketplace.eclipse.org/catalogs/api*(不工作)——将“Active Provider”更改为“Manual”/“Direct”(不工作)——禁用代理条目/绕过(不工作)
回答by clipper
Eclipse Oxygen version: Window->Preferences->network connections->default apply will reset the settings. restart eclipse and it should work
Eclipse Oxygen 版本:窗口->首选项->网络连接->默认应用将重置设置。重新启动eclipse,它应该可以工作
回答by Aamer
- Open command prompt (windows start button, type cmd in search)
- Click top left of command prompt, click properties, enable quick edit mode
- Copy: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
- Right click on command prompt, should paste
- Hit enter. That easy!
- 打开命令提示符(windows 开始按钮,在搜索中输入 cmd)
- 单击命令提示符左上角,单击属性,启用快速编辑模式
- 复制:setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
- 右键单击命令提示符,应粘贴
- 点击进入。这么简单!
回答by EderX
回答by Amol Dixit
I tried all the suggestions but no success for Eclipse Mars, Neo and Oxygen At last it worked for Eclipse Oxygen when I added following line to eclipse.ini file
我尝试了所有建议,但对 Eclipse Mars、Neo 和 Oxygen 都没有成功 最后,当我将以下行添加到 eclipse.ini 文件时,它对 Eclipse Oxygen 起作用了
-Djava.net.preferIPv4Stack=true
回答by Sameh Yassin
For me I solved the problem by those steps:
对我来说,我通过以下步骤解决了这个问题:
Use the CNTLM proxy, which can be installed and run by following this GitHub readme file.
Go to-Window->Preferences->General->Network Connections
Click on an empty line and add a host and the same port that youn configured in CNTLM
使用 CNTLM 代理,可以按照此 GitHub 自述文件安装和运行。
转到-窗口->首选项->常规->网络连接
单击空行并添加主机和您在 CNTLM 中配置的相同端口
回答by Destro
I tried all the suggestions but no success for Eclipse Neon and Oxygen. At last it worked for Eclipse Neon when I added below line in Configuration Settings in eclipse folder.
我尝试了所有建议,但 Eclipse Neon 和 Oxygen 没有成功。最后,当我在 eclipse 文件夹的 Configuration Settings 中添加以下行时,它适用于 Eclipse Neon。
-Djava.net.preferIPv4Stack=true
-Djava.net.preferIPv4Stack=true
Edit Configuration Settings in eclipse folder and add the below line and save it. It will work.
在 eclipse 文件夹中编辑配置设置并添加以下行并保存。它会起作用。
回答by JKo
I tried all the suggestion above with Eclipse Photon. None worked. Finally got the marketplace to open by installing Eclipse to a path with no white spaces.
我用 Eclipse Photon 尝试了上面的所有建议。没有一个工作。最终通过将 Eclipse 安装到没有空格的路径来打开市场。
回答by Vineeth Varada
when launching, java application defaults to listening to ipv6 exclusively. Modify .ini configuration settings file present in the folder by adding -Djava.net.preferIPv4Stack=true below the -vmargs. This sets the java to prefer IPV4 stack.
启动时,java应用默认只监听ipv6。通过在 -vmargs 下方添加 -Djava.net.preferIPv4Stack=true 来修改文件夹中的 .ini 配置设置文件。这将 java 设置为更喜欢 IPV4 堆栈。