Garena kết nối thất bại là lỗi gì? khắc phục như thế nào?

      14
You are viewing the article: Sửa Lỗi Auth In Main Server, Không Vào Được Room Aoe Garena | greenlines.com.vn at greenlines.com.vn

This article helps you resolve various connectivity issues to SQL server.

Bạn đang xem: Garena kết nối thất bại là lỗi gì? khắc phục như thế nào?

Bạn đang xem: Sửa lỗi auth in main server

Note

For a guided walk through experience of this article, see Solving Connectivity errors to SQL Server.

Original product version: sumuoi.mobi SQL ServerOriginal KB number: 4009936


Contents

A network-related or instance-specific error occurred while establishing a connection to SQL ServerNo connection could be made because the target machine actively refused itCannot Generate SSPI context error message

Prerequisite

To effectively use this troubleshooter, you may want to gather the following information.

The complete text of the error message along with the error codes and whether the error is intermittent (happens only sometimes) or consistent (happens all the time).

Errorlogs from SQL Server from which you can note the following:

Fully qualified domain name (FQDN) of the SQL Server machine or in case of clustered installations, the FQDN virtual name. If you are using a named instance, note down the instance name.

Note

You can search for “Server name is” string to get this info in the errorlog.

Network libraries and ports the SQL instance is listening on. Example messages:

Named pipes: Server local connection provider is ready to accept connection on . TCP/IP and port number: Server is listening on .

Application and System event logs from SQL Server and Client systems.

If the connections are failing from an application, the connection string from the app. These are typically found in Web.config files for ASP.NET applications.

Checklist

Ensure SQL server is started and you see the following message in the SQL Server ErrorLog:

SQL Server is now ready for client connections. This is an informational message; no user action is required.

Verify basic connectivity over IP address and check for any abnormalities: ping -a , ping -a . If you notice any issues, work with your network administrator to fix the same.

Check if SQL is listening on appropriate protocols by reviewing the ErrorLog.

Check if you are able to connect to SQL Server from other client systems and different user logins. If you are able to, then the issue could be specific to the client or login that is experiencing the issue. Check the Windows event logs on problematic client for additional pointers. Also check if network drivers are up to date.

If you are experiencing login failures, ensure the user has a login at the server level and appropriate permissions to connect to the database that the user is trying to connect to.

A network-related or instance-specific error occurred while establishing a connection to SQL Server

For more information about the relevant error, see the following Verify connection errors section.

Verify connection errors

The A network-related or instance-specific error occurred while establishing a connection to SQL Server error represents one or more of the following error messages:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance SpecifiedSQL Server Native Client Data Link Error

: Login timeout expired: A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.: SQL Server Network Interfaces: Error Locating Server/Instance Specified .A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

provider: TCP Provider, error: 0A 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.sumuoi.mobi SQL Server, Error: 10060A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

provider: Named Pipes Provider, error:40 – Could not open a connection to SQL Serversumuoi.mobi SQL Server, Error:53The network path was not found TCP Provider: No connection could be made because the target machine actively refused it. Login timeout expired A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.You can start troubleshooting from this section: Common causes of various connection issues.


Common causes of various connection issues

Go through each of the causes that is applicable to your instance below and for each of the applicable causes, try the corresponding resolutions.

Cause 1: Incorrect server name being specified in the connection string or in the server name dialog box

To confirm:

Ensure the server name you are specifying the application matches what you have in the error log.

Cause 2: Incorrect alias on the client machine

Aliases are typically used in environments when you need to connect to SQL Server with an alternate name or when there are name resolution issues in the network. An incorrect alias on the client machine can cause the connections from your applications to go to the wrong server resulting in failure.

Things to try:

Open SQL Server Client Network Utility by typing cliconfg.exe in your Run command.

Check if there are any aliases defined for the server you are trying to connect to.

If present, do the following:

Click on Edit and rename the Server alias. (for example, if your server name is MySQL, rename it as MySQL_test) and retry the connection. If the connection works, it is an indication that you had an incorrect alias, probably from an old configuration that is no longer needed. If you continue to experience the error, rename the alias back to its original name and proceed to the next step.

Check the Connection parameters for the alias and ensure they are correct. Some of the common scenarios that can cause problems with connectivity are:

Incorrect IP address for the Server name parameter. Ensure this IP address matches the entry in the SQL ErrorLog file.

Incorrect Server name in the Server name parameter. For example though your Server alias points the correct server name, if the Server name parameter has incorrect value, connections will fail.

If you are using a named pipes alias, ensure the pipe name has correct format.

For connecting to default instance named Mydefaultinstance, the pipe name should be \MydefaultinstancepipesqlqueryFor connecting to a named instance MySQLNamed, the pipe name should be \MySQLpipeMSSQL$NamedsqlqueryCause 3(Default instance): Firewall(s) between the client and server blocking the port SQL Server instance is listening on

Default instance: A default instance typically runs on port 1433. Some installations also use a non-standard port (other than 1433) for running SQL instances. The firewall may be blocking either of them.

Things to try:

Try appending the port number of SQL Server to the server name using the format , portnumber and see if that works. For example, if your SQL instance name is MySQLDefaultinstance and it is running on port 2000, specify the server name as MySQLServer, 2000 and see if that works. If it does work it is an indication the firewall is blocking the port.

Cause 4(Named instance): SQL Browser is not started

Client applications connecting to a named instance of SQL Server use the SQL Browser service on the system where SQL is running to enumerate the port that SQL is listening on. If the browser service is not started, the connections would fail.

Things to try:

On the system running your SQL Server instance, either use the SQL Server Configuration manager or the Services applet in Control panel and start the SQL Browser Service if it is not already started. For more information, see How to: Start and Stop the SQL Server Browser Service

Cause 5(Named instance): UDP Port 1434 used by SQL browser is blocked on the network

If your SQL instance is a named instance, it may have either been configured to use dynamic ports or a static port. In either case, the underlying network libraries query SQL Browser service running on your SQL Server machine via UDP port 1434 to enumerate the port number for the named instance. If a firewall between the client and the server blocks this UDP port, the client library cannot determine the port (a requirement for connection) and the connection fails.

To Confirm:

Method 1:

Note down the port your SQL instance is listening on from the SQL Server Errorlog.Try connecting to the named instance using the port number appended to the server name using the format , portnumber and see if that works. If it does work it is an indication the firewall is blocking the port UDP port 1434. For example, if your SQL instance name is MySQLNamedinstance and it is running on port 3000, specify the server name as MySQLNamedinstance, 3000 and see if that works. If it does work it could either mean that UDP port 1434 is blocked or the static port is blocked or both. To confirm if it is the UDP port or the static port using Portqry from Method 2 below.

Method 2:

Things to try:

First determine if the SQL Server instance is listening on dynamic vs static port and use the procedure that is relevant to your scenario. How to tell if SQL is listening on Dynamic vs Static ports, move to Tell if SQL is listening on Dynamic vs Static ports section.


If this does not resolve your issue, move to Still having problems section.

Configuring firewalls

If you are using a custom firewall, work with your network administrator to open up the necessary ports.

Below you can find some quick screenshots showing the required configuration of a Windows firewall for successful connections to a default instance and a named instance.

A default instance of SQL Server listening on the default port 1433 on Windows 2012 R2 server. In this scenario, you need to ensure an exception is added to TCP port 1433 in the Windows firewall.

Open Windows firewall on the system hosting SQL server default instance and click New Rule under Inbound Rules.

Select the Port option and click Next.

In the next screen:

Select TCP as the protocol.

Xem thêm: Wild Shark Rescue Simulator, Game Ca Map An Thit Nguoi 3D【Copy_Sodo66

Select Specific local ports and specify the value as 1433 and click Next.


*

In the next screen, select Allow the connection and click Next.

In the next screen, select the option that best suits your environment and click Next.

In the next screen, give the name to your rule and provide a clear description for future reference and click Finish.


*

*

Adding an exception for UDP port 1434 to enable connections to a named instance of SQL server:

Open Windows firewall on the system hosting SQL server default instance and click New Rule under Inbound Rules.

Select the Port option and click Next.

In the next screen:

Select UDP as the protocol.

Select Specific local ports and specify the value as 1434 and click Next.


*

In the next screen, select Allow the connection and click Next.

In the next screen, select the option that best suits your environment and click Next.

In the next screen, give the name to your rule and provide a clear description for future reference and click Finish.


*

If this does not resolve your issue, move to Still having problems section.

Using PortqryUI tool with SQL Server

Download location: PortqryUI

Launch PortqryUI tool on your client machine. (the machine where you are having connection issues, for web apps, this could be the IIS server)Specify server name of the SQL Server instance or the SQL vitutal server name in the Destination IP or FQDN to query.Select Query predefined service and select SQL Service in the dropdown list.Click Query and examine the output and use the following table for additional pointers.

Type of instanceOutput from PortqryPotential causes for connection issuesWhat to try?
Default instanceTCP port 1433 (ms-sql-s service): NOT LISTENINGIndicates one of the following: SQL is not started. TCP/IP is not enabled on SQL server protocol list. SQL is listening on a non-default port. (check errorlog) Firewall between the client and the server is blocking the port.Ensure SQL is started. Check SQL error log for the port number and use that in your connection strings using the format , portnumber. Work with your network/windows administrator to ensure the TCP port 1433 is not blocked by a firewall on the network or by the Windows firewall on the SQL Server system. Note If you would like to resolve firewall issue, move to Configuring firewalls section.
Default instanceTCP port 1433 (ms-sql-s service): LISTENING Client library is able to connect fine to the SQL server machine but something else in the application layer could be causing the problem. Check if server name is correctly specified in the connection string. If the connection string is using the port number, it is correctly specified in the connection string. Any old aliases defined on the box.
Named instanceUDP port 1434 (ms-sql-m service): FILTEREDIndicates one of the following: SQL named instance is not started. SQL browser not started on the system hosting your SQL instance. UDP port 1434 is blocked by afirewall on the SQL server or on the network between the client and the server. Service is started. SQL browser service is started.Work with your network/windows administrator to ensure the UDP port 1434 is not blocked by a firewall on the network or by the Windows firewall on the SQL Server system. Note If you would like to resolve firewall issue, move to Configuring firewalls section.
Named instanceUDP port 1434 is LISTENINGClient library is able to connect fine to the SQL server machine but something else in the application layer could be causing the problem. Server name is correctly specified in the connection string. Port number is incorrectly specified in the connection string. Any old aliases defined on the box.

Examples outputs:

Default instance on default port: Working scenario


For more information, move to Configuring firewalls section.

If this does not resolve your issue, move to Still having problems section.

Tell if SQL is listening on Dynamic vs Static ports

In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for , and then double-click TCP/IP.

In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. (You will probably see both IP version 4 and IP version 6 addresses.) Right-click each address, and then click Properties to identify the IP address that you want to configure.

If the TCP Dynamic Ports dialog box contains , it indicates that the Database Engine is listening on dynamic ports. If it contains a specific number, it means the database instance is listening on a static port.


For more information, see Configure a Server to Listen on a Specific TCP Port.

If this does not resolve your issue, move to Still having problems section.

No connection could be made because the target machine actively refused it

For more information about the no connection error, move to The full error message section.

The full error message

You may get an error that is similar to the following:

TCP Provider: No connection could be made because the target machine actively refused it.Login timeout expired.A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.You can start troubleshooting from this section: Common causes of various connection issues.

SQL Server does not exist or access denied

You can start troubleshooting from this section: Common causes of various connection issues.

PivotTable Operation Failed: We cannot locate a server to load the workbook Data Model

You can start troubleshooting from this section: Common causes of various connection issues.

Cannot Generate SSPI context error message

Security Support Provider Interface (SSPI) is a set of Windows APIs that allows for delegation and mutual authentication over any generic data transport layer, such as TCP/IP sockets. Therefore, SSPI allows for a computer that is running a Windows operating system to securely delegate a user security token from one computer to another over any transport layer that can transmit raw bytes of data.The Cannot generate SSPI context error is generated when SSPI uses Kerberos authentication to delegate over TCP/IP and Kerberos authentication cannot complete the necessary operations to successfully delegate the user security token to the destination computer that is running SQL Server.

For additional information as to why the Kerberos operations cannot be completed, move to Troubleshooting authentication failures due to Kerberos issues section to review and implement the steps.

Troubleshooting authentication failures due to Kerberos issues

Kerberos authentication failures can happen due to a variety of reasons. The major causes and corresponding resolutions are highlighted below:

Issue typeSuggested resolutionsSPN Issues: Missing SPNs: SPN is not registered in the Active directory. Incorrect SPN entries: SPN exists, but the port number is incorrect or it exists on a different account other than the SQL Service account.Duplicate SPNs: The same SPN exists on multiple accounts in the active directory.
Check Using Kerberos Configuration manager to diagnose and fix SPN and delegation issues section to diagnose and resolve SPN issues.Note For in-depth understanding of SPNs, Kerberos, and other related concepts review the information in the following KB article: How to troubleshoot the “Cannot generate SSPI context” error message
SQL Service accounts not trusted for delegation. If you are using Local System account, the middle server should be trusted for delegation in the active directory.UseKerberos configuration manager “s delegation tab to confirm and work with your Active directory administrator to enable delegation for the account. Check Using Kerberos Configuration manager to diagnose and fix SPN and delegation issues for details in the following paragraph.
Incorrect name resolution: Your server name may be resolving to a different IP address than that is registered by your network”s DNS server.ping -a (use -4 and -6 for IPv4 and IPv6 specifically) ping -a nslookup (type your local and remote machine name and IP address multiple times)Look for any discrepancies and mismatches on the returned results. The correctness of DNS configuration on the network is vital to SQL connection. Wrong DNS entry could cause of all sorts of connectivity issue later.
Firewalls or other network devices preventing connections from the client to the domain controller: SPNs are stored in active directory and if the clients are unable to communicate with the AD, the connection cannot proceed further.Check the following links for additional information: