Sign in to follow this  
WinHexs

Программа на вашем хост-компьютере разорвала установленное подключение

Recommended Posts

При использование базы данных, сервер через пару минут после запуска выдаёт исключения:

==================[14.07.2018 4:32:29]==================
System.Net.Sockets.SocketException (0x80004005): Программа на вашем хост-компьютере разорвала установленное подключение
   at void System.Net.Sockets.NetworkStream.Write(byte[] buffer, int offset, int size)
=========================================================

==================[14.07.2018 4:32:29]==================
System.IO.IOException: Unable to write data to the transport connection: Программа на вашем хост-компьютере разорвала установленное подключение. ---> System.Net.Sockets.SocketException: Программа на вашем хост-компьютере разорвала установленное подключение
   at void System.Net.Sockets.NetworkStream.Write(byte[] buffer, int offset, int size)
   --- End of inner exception stack trace ---
   at void System.Net.Sockets.NetworkStream.Write(byte[] buffer, int offset, int size)
=========================================================

==================[14.07.2018 4:32:29]==================
System.IO.IOException: Unable to write data to the transport connection: Программа на вашем хост-компьютере разорвала установленное подключение. ---> System.Net.Sockets.SocketException: Программа на вашем хост-компьютере разорвала установленное подключение
   at void System.Net.Sockets.NetworkStream.Write(byte[] buffer, int offset, int size)
   --- End of inner exception stack trace ---
   at void System.Net.Sockets.NetworkStream.Write(byte[] buffer, int offset, int size)
   at void MySql.Data.MySqlClient.TimedStream.Write(byte[] buffer, int offset, int count)
=========================================================

Метод подключения к базе данных:

private const string connectionString = "Server=localhost;Database=db;port=3306;User Id=root;password=;SslMode=none";
public static void TestConnection()
        {
            MySqlConnection conn = new MySqlConnection(connectionString);

            try
            {
                NAPI.Util.ConsoleOutput("[Database] Connection to MySQL ...");
                conn.Open();          
            }
            catch (Exception ex)
            {
                NAPI.Util.ConsoleOutput("[Database] " + ex.ToString());
            }

            conn.Close();
            NAPI.Util.ConsoleOutput("[Database] Done");
        }

Порты 22005 и 22006 открыты, отключение файервола изменений не принесло

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.