简体   繁体   English

System.Net.Sockets.SocketException (0x80004005): 没有这样的主机是已知的

[英]System.Net.Sockets.SocketException (0x80004005): No such host is known

I have two server machine.我有两台服务器机器。 One windows machine on which .Net application running and another Linux machine on which Mongo Db is configured.一台运行 .Net 应用程序的 Windows 机器和另一台配置了 Mongo Db 的 Linux 机器。

.Net application on Windows machine access database on Linux. Windows 机器上的 .Net 应用程序访问 Linux 上的数据库。 But there is some random error on connecting to Mongo Database.但是连接到 Mongo 数据库时出现一些随机错误。 Error is random and goes after frequent retry.错误是随机的,并在频繁重试后发生。

 **System.Net.Sockets.SocketException (0x80004005): No such host is known
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress) 
   on connecting/login**

Is this issue related to database or there is some configuration issue with MongoDb此问题与数据库有关还是 MongoDb 存在一些配置问题

I had an issue like this a couple of days ago... What I would try:几天前我遇到了这样的问题......我会尝试什么:

  1. Open the task manager and make sure there are no threads running in the background at the same port you have configured on your DB...打开任务管理器并确保在您在数据库上配置的同一端口上没有在后台运行的线程...
  2. If you are using a virtual machine make sure your network state is set to bridge如果您使用的是虚拟机,请确保您的网络状态设置为桥接
  3. If 1 & 2 doesn't work try to change the port on your database如果 1 和 2 不起作用,请尝试更改数据库上的端口

Hope it helps希望能帮助到你

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.Net.Sockets.SocketException(0x80004005) - System.Net.Sockets.SocketException (0x80004005) System.Net.Sockets.SocketException(0x80004005):建立的连接已被主机中的软件中止 - System.Net.Sockets.SocketException (0x80004005): An established connection was aborted by the software in your host machine TcpListener不适用于其他机器ip:System.Net.Sockets.SocketException(0x80004005) - TcpListener not working for other machine ip: System.Net.Sockets.SocketException (0x80004005) 面临错误 tcp 侦听器 SocketException:{0}System.Net.Sockets.SocketException (0x80004005):请求的地址在其上下文中无效 - Facing error tcp listener SocketException: {0}System.Net.Sockets.SocketException (0x80004005): The requested address is not valid in its context .NET服务System.Net.Sockets.SocketException:'未知此类主机' - .NET Service System.Net.Sockets.SocketException: 'No such host is known' SFTP 连接中的 C# 错误。 异常:System.Net.Sockets.SocketException (11001):不知道这样的主机 - C# Error in SFTP connection. Exception: System.Net.Sockets.SocketException (11001): No such host is known System.Net.Sockets.SocketException - System.Net.Sockets.SocketException postgres 连接上的 System.Net.Sockets.SocketException - System.Net.Sockets.SocketException on postgres connection System.Net.Sockets.SocketException 灾难 - System.Net.Sockets.SocketException Disaster 从对象类型System.Net.Sockets.SocketException到已知托管提供程序本机类型的映射不存在 - No mapping exists from object type System.Net.Sockets.SocketException to a known managed provider native type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM