-3

ゲーム内のプレーヤーの統計を追跡する一族の MySQL データベースがあります。現在、MySQL の担当者が不在で、次のエラーが発生しています。

[18:17:18 23] Error in Tablebuilder:
[18:17:18 23] Message: Unable to connect to any of the specified MySQL hosts.
[18:17:18 23] Native: -2147467259
[18:17:18 24] Source: MySql.Data
[18:17:18 24] StackTrace: at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnecti onStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnecti on()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at PRoConEvents.CChatGUIDStatsLoggerBF3.tablebuilder( )
[18:17:18 24] InnerException: System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond    50.63.244.184:3306
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at MySql.Data.Common.StreamCreator.CreateSocketStream (IPAddress ip, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStreamFromHost( String pipeName, String hostName, UInt32 timeout)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout)
at MySql.Data.MySqlClient.NativeDriver.Open()
[18:17:18 24] Error: System.NullReferenceException: Object reference not set to an instance of an object.
at PRoConEvents.CChatGUIDStatsLoggerBF3.tablebuilder( )

問題が何であるかについて何か考えはありますか?

4

2 に答える 2

1

エラーメッセージを読むことから始めるべきです。ちんぷんかんぷんに見えますが、よく読んでみると、何が起こっているのかわかる部分があることが多いです。

[18:17:18 24] InnerException: System.Net.Sockets.SocketException:
接続先が一定時間後に適切に応答しなかったため、接続の試行が失敗したか、接続されたホストが応答しなかったために確立された接続が失敗しました 50.63.244.184 :3306

次のことを行う必要があります。

  1. データベースサーバーから実行telnet localhost 3306し、失敗した場合はDBサーバーの問題です
  2. telnet 50.63.244.184 3306アプリケーションサーバーから実行し、失敗した場合はネットワークの問題です
于 2013-06-29T11:35:28.633 に答える
0

テスト済みの 2 つの例外がありますが、意味は明らかです。

"Unable to connect to any of the specified MySQL hosts."

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"

つまり、ウェブサーバーがデータベースサーバーに接続できません。データベース サーバー (MySQL サーバー プロセスmysqld.exeまたはサーバー自体、OS、ハードウェアなど) が停止している可能性があります。または、MySQL ポート3306での接続をブロックするようにファイアウォールがリセットされました。

標準の Web ホストがあると仮定します。それらに ping を実行し、データベース サーバーが動作していない理由を尋ねます。

...しかし、恥ずかしがる前に、アプリケーションが適切なサーバー (つまり、開発またはステージング DB ではなく、運用 DB) に接続していることを確認してください。接続文字列を見てください。

于 2013-06-29T11:35:12.707 に答える