Showing posts with label closed. Show all posts
Showing posts with label closed. Show all posts

Sunday, March 11, 2012

An existing connection was forcibly closed by the remote host

It is very appreciated if someone can help me on this problem:

I have 2 machines, connected with workgroup (not domain machine), 1 is win2003 sp1, 1 is xp.

How can I connect SSAS from XP machine with windows authentication?

Looks the Native client fix the windows authentication with local user name.

When I connect from XP, my application with following codes:

string connstr = "Provider=MSOLAP.3;Data Source=amsserver;Password=accenture;User ID=administrator;Initial Catalog=MIP2ASProject";

AdomdConnection objConnection = new AdomdConnection();

// Assign the connection string and try to

//open a connection.

objConnection.ConnectionString = connstr;

objConnection.Open();

It give me this error:

An existing connection was forcibly closed by the remote host

First of all, you dont need the User ID and Password in the connection string if you are connecting using TCP/IP (you would use them only when connecting with HTTP using Basic auth).

Second, in order to use "Provider=MSOLAP.3" you will need to install "Microsoft SQL Server 2005 Analysis Services 9.0 OLE DB Provider" provider from http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi Edward,

Yes, I have installed oledb AS9 provider.

If you think SSAS only support windows authentication which must use inside the domain, I really couldn't understand why oledbconnection works fine with same connection string?

I am not sure about whether impersonation belong to windows authentication, but, my testing prove that oledb can connect in this way, adomd can't.

BTW, thankful if anyone can let me know how to enable SSAS's anonymous connection?

Jerry

|||

it is an antivirus problem

uninstall antivirus and try again

what antivirus do you have?

|||

What version of ADOM.NET are you using?

Try downloading and installing "Microsoft ADOMD.NET " from http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

An existing connection was forcibly closed by the remote host

Hi,

I am using ASP.NET 2.0 application to fetch data from a SQL server 2005 using stroed proc.

Stored proc is also using one table from Linked Server (SQL 2000). Linked Server is configured to use login's current security context.

I am getting the following error message

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/15/2006 4:26:30 PM
Event time (UTC): 6/15/2006 8:26:30 PM
Event ID: 988964e6fa5249e38b1bc6c9a5ecd1e4
Event sequence: 850
Event occurrence: 7
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/MyApp-1-127948732130920720
Trust level: Full
Application Virtual Path: /MyApp
Application Path: C:\Inetpub\wwwroot\MyApp\
Machine name: MyServer
Process information:
Process ID: 352
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: SqlException
Exception message: TCP Provider: An existing connection was forcibly closed by the remote host.

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
Request information:
Request URL: http://MyServer/MyApp/Page1.aspx
Request path: /MyServer/MyApp/Page1.aspx
User host address: XX.XX.XXX.XX
User: DomainName/UserName

Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

Please Guide

Thanks

Is it intermittent or consistent?

1. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

This looks like a consistent issue. It normally means that you need to configuration IIS account to access SQL Server. You can take a look at this link, http://support.microsoft.com/kb/247931/en-us.

2. TCP Provider: An existing connection was forcibly closed by the remote host.

This normally is an intermittent issue. It happens when you enable connection pooling and server closes the connection for reason like connection clean up, restart, network failure, the ASP.NET( sqlclient ) use dead connection from the pool to write data and thus get the failure you see. Re-retry connection should solve the issue.

|||

Hi Nan,

Re: 1. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

IIS is configured properly to access data from SQL Server and it is working fine when IIS & SQL are on the same box. But the above message comes only when the stored proc tries to access data from a 2nd SQL Server (linked server which is not on the same box as IIS). Somehow it is not passing the credential to the 2nd SQL Server. 2nd SQL server is linked using login's current security context. Also ASP.NET 2 web.config file says <identity impersonate="true" />. I am using NT domain right now. Is this issue of "Double hop"?

Re: 2. TCP Provider: An existing connection was forcibly closed by the remote host.

Is connection pooling is by default? Can we change so that it should not use it?

Thanks

Shafiq

An existing connection was forcibly closed by the remote host

Hi,

I'm running a website using MSSQL 2000. Sometimes (not always) I get this error message on the website:

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I have also websites running with MySQL and those don't have this problem.
I searched google but I couldn't find usefull information on this problem.

Someone who knows what's going on here ?

All I've found untill now is that it has something to do with the server not responding within a certain time, and thus assuming the connection was closed.

I can't find how I can just let it reconnect again in stead of giving me this error message?

An error occurred while receiving data: '10054(An existing connection was forcibly closed by th

What does this error mean? I get this in the transmission_status column of sys.transmission_queue

An error occurred while receiving data: '10053(An established connection was aborted by the software in your host machine.)'.

Also, does the number in this message correspond to error 10053 in sys.messages?

Thanks

It means that the peer is closing the connection during login, most likely due to lack of CONNECT permission on the endpoint. You need to attch the profiler to the peer and monitor the 'Security Audit/Audit Broker Login' and 'Broker/Broker connection' events.

10054 and 10053 are system errors (OS), they are WSAECONNRESET and WSAECONNABORTED. they are described here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp

HTH,
~ Remus

|||

Thanks

What happened was that my certificates expired (set start date as 01/01/05 and neglected an expiry date)

An error occurred while receiving data: '10054(An existing connection was forcibly closed b

What does this error mean? I get this in the transmission_status column of sys.transmission_queue

An error occurred while receiving data: '10053(An established connection was aborted by the software in your host machine.)'.

Also, does the number in this message correspond to error 10053 in sys.messages?

Thanks

It means that the peer is closing the connection during login, most likely due to lack of CONNECT permission on the endpoint. You need to attch the profiler to the peer and monitor the 'Security Audit/Audit Broker Login' and 'Broker/Broker connection' events.

10054 and 10053 are system errors (OS), they are WSAECONNRESET and WSAECONNABORTED. they are described here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp

HTH,
~ Remus

|||

Thanks

What happened was that my certificates expired (set start date as 01/01/05 and neglected an expiry date)