Ошибка tcp connection error 10061

  • Question

  • I hosted a wcf service application using windows services. When my client (ASP.NET) tries to call the service class hosted by the windows service, I get this error «TCP error code 10061: No connection could be made because the target machine actively refused it. «. Is there a fix for this? The same code works fine if I host it using a console application.

Answers

  • What port are you listening on? Is that port unblocked in your windows firewall?

All replies

  • What port are you listening on? Is that port unblocked in your windows firewall?

  • Yes, my firewall was blocking it. I got around it and it fixed the problem.

    • Proposed as answer by

      Friday, May 23, 2014 1:28 PM

  • Hi,

    Evn i am gettin the same error. Can u tell me wat is the fix.

  • I am getting the same error — but only when I change my return type to a cutom object. CLR types work fine — i.e. an IList of Strings, but not, say, MyResponseObj. I’m running the asp.net development server on port 1212, with a wsHttpBinding. Like I said, the problem seems to be with the return type which is marked up with the DataContract — DataMember tags, like my other custom objects that work fine as input objects. I am able to pass in an arbitrarily complex object of custom types no problem — but the server tanks with a custom return type.

    Any suggestion would be appreciated. Thanx — Ian

  • Brian

    I’ve configured trace in the web.config file as per the article, but no output or log file is generated. Do I need to create a trace object in my test code (NUnit) to explicitly start the trace segment?

    Or should the web.config entry be sufficient?

    Thanks,

    Ian

  • Kenny,

    I’ve unblocked the port on the firewall and still unable to connect.

    What was the fix?

  • For problem returning custom objects, turns out my IList<T> member variable, since it could be nullable, required this in the data contract: [DataMember(EmitDefaultValue = false)]
    That is what was causing the service to refuse the connection. Now all is well again.  A newbie error no doubt, but I never even heard of WCF before I started at my new company.  =o)

    • Proposed as answer by
      JeffKite
      Wednesday, August 14, 2013 6:32 PM

  • What port are you using? What binding is this? Can you connect to the port using IE (assuming you have an HTTP GET metadata enabled)?

  • Hi ,

    I am getting this error if I host it using a console application. it works fine if client is asp.net. Is there a fix for this?

    -ravi

  • try to remove and add service refrences again…it will help you to connect wcf…

  • Hi JothiMurugan,

    I am also getting same error when I host with the windows service.

    Same application when hosted in Console application, works fine.

    Can you please help me with the fix.

    Thanks in advance.

    Sakthi

  • hi
    i don’t know it will helpfull to u or not but u should try it
    first u click on  host  project and  click on Start new instance
    then u should run windows application

  • I have configured Tracing and I see my trace files just fine, the prblem is I don’t see an Error icon. 

    I’m looking through all the activities in the trace viewer and the one for my service operation has To and from transport messages, I can see the start for the activity but there is nothing indicating an error and I setup it up for  switchValue=»Error,ActivityTracing». 

    ??


    Santiago Perez

  • Hi,
    I am trying to write a WCF service with transport level security and basicHTTP binding. I am using a custom Membership provider to authenticate a client call to the service by authenticating the User ID and password passed to the service. I believe that WCF does not allow UserID/Password auth without having SSL certificate installed because the UserID/password are sent as clear text. I am currently in development and I tried installing the test certificate (X.509) on my dev machine running the service but w/o any success.
    My service web.config looks like this

    <

    system.serviceModel>

    <

    services>

    <

    service behaviorConfiguration=«LCCService.rbagLCWS_ServiceBehavior«

    name=«LCCService.rbagLCWS_Service«>

    <

    endpoint address=«»

    binding=«basicHttpBinding«

    bindingConfiguration=«LCCService.rbagLCWS_ServiceBinding«

    contract=«LCCService.IrbagLCWS_service«>

    </

    endpoint>

    <

    endpoint address=«mex«

    binding=«mexHttpBinding«

    contract=«IMetadataExchange« />

    </

    service>

    </

    services>

    <

    behaviors>

    <

    serviceBehaviors>

    <

    behavior name=«LCCService.rbagLCWS_ServiceBehavior«>

    <

    serviceCredentials>

    <

    userNameAuthentication userNamePasswordValidationMode=«MembershipProvider« membershipProviderName=«PasswordProvider«/>

    </

    serviceCredentials>

    <

    serviceMetadata httpGetEnabled=«true« />

    <

    serviceDebug includeExceptionDetailInFaults=«true« />

    </

    behavior>

    </

    serviceBehaviors>

    </

    behaviors>

    <

    bindings>

    <

    basicHttpBinding>

    <

    binding name=«LCCService.rbagLCWS_ServiceBinding«>

    <

    security mode=«Transport«>

    <

    transport clientCredentialType=«Basic«/>

    </

    security>

    </

    binding>

    </

    basicHttpBinding>

    </

    bindings>

    </

    system.serviceModel>

    When I try to call the service using the client w/o having the test certification installed, I get the following error:
    Could not connect to https://XYZ.com/rrxainet/LCCWCFService/rbagLCWS_service.svc. TCP error code 10061: No connection could be made because the target machine actively refused it XXX.XXX.XX.XXX:443.

    I have spent almost 2 days trying to figure out the solution and how to successfully install the test certificate to get it working but to no avail.

    Please can someone help. I really appreciate it!!!

  • hi guys,

    i am new to dot net. when i am using the folling program for connecting the particuler port it is giving the error.

    int

    timout = Convert.ToInt32(txttimeout.Text);

    int port = 5000;

    IPAddress localAddr = IPAddress.Parse(«127.0.0.1»);

    IPEndPoint remoteEndPoint = new IPEndPoint(localAddr, port);

    TcpClient NetworkClient = TimeOutSocket.Connect(remoteEndPoint, timout);

    NetworkStream networkstream = NetworkClient.GetStream();

    StreamReader streamReader = new StreamReader(networkstream);

    string line = streamReader.ReadToEnd(); //streamReader.ReadLine();

  • I got the same message after adding the registry value  «KeepAliveTime» with value 300000 in the window registry under HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters.

    When I removed the window registry «KeepAliveTime», it resumed normal.

    Is there any settings I have to check ?

  • Hi All,

     I am new to WCF. I have created a WCF Service and hosted it in Windows Service. I have got a below Error when tring to create Client Proxy for the service.

    Error Message:

    «There was an error downloading ‘http://localhost:8051/Service1/’.
    Unable to connect to the remote server
    No connection could be made because the target machine actively refused it 127.0.0.1:8051
    Metadata contains a reference that cannot be resolved: ‘http://localhost:8051/Service1/’.
    Could not connect to http://localhost:8051/Service1/. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8051.

    Unable to connect to the remote server
    No connection could be made because the target machine actively refused it 127.0.0.1:8051
    If the service is defined in the current solution, try building the solution and adding the service reference again.»

    I have seen some posts related to Issue like unblocking the port in Firewall. I have unblocked all ports from Firewall, Still the Issue raising while create Client Proxy. Some one can help me on this Problem. I have Pasted my configuration file below.

    <system.serviceModel>
        <services>
          <service name=»WcfService1.Service1″ behaviorConfiguration=»WcfService1.Service1Behavior»>
            <!— Service Endpoints —>
            <endpoint address=»» binding=»wsHttpBinding» contract=»WcfService1.IService1″>
            </endpoint>
            <!—<endpoint address=»» binding=»netTcpBinding» contract=»WcfService1.IService1″></endpoint>—>
            <!—<endpoint address=»mextcp» binding=»mexTcpBinding» contract=»IMetadataExchange»/>—>
            <endpoint address=»mex» binding=»mexHttpBinding» contract=»IMetadataExchange»/>
            <host>
              <baseAddresses>
                <add baseAddress = «http://localhost:8051/Service1/» />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name=»WcfService1.Service1Behavior»>
              <!— To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment —>
              <serviceMetadata httpGetEnabled=»true»/>
              <!— To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information —>
              <serviceDebug includeExceptionDetailInFaults=»false»/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    Please reply me to solve this problem.

  • I started getting this problem in VS 2008 IDE when I’m testing my web services.  Not a firewall issue.  Anyone find a positive solution to this??

    My Web Service test web application used to work fine a few months ago — now when I test it I get this error?  So I’m guessing some OS update has broken VS 2008 IDE for web services??

    Rob

  • Solved the problem for my case (appears to a Project’s Web Service reference issue):

    In VS 2008 IDE

    In your actual Web Services Project (with the ASMX source) — My Project | Web | Use Visual Studio Development Server | Auto-assign Port.

    a. If this is hard coded to a specific port you’ll need to verify the calling Project’s Web Service references match the same port and reference.

    b. Open your calling project — My Project | References — remove your Web Service references (Type = Service) — be sure to note the ReferenceName you used.  Now Add Service Reference back again — Discover Services in Solution, select the service
    and be sure to re-enter the same ReferenceName you used originally.

    If your Web Service project is configured differently or you reference external web services, then it might just be a case of removing and re-adding the web service back being sure to use the same ReferenceName so you project references stay intact.

    Rob.

    • Proposed as answer by
      Rob Ainscough
      Monday, August 2, 2010 10:23 PM

  • Hi I'm new to WCF.. I'm trying to invoke free web service
    

    http://www.mindreef.net/svc/hashservice/servicesHashClassSoap?wsdl....

    So i have created a client but it gives me an exception..Please help me

    Could not connect to http://localhost:8050/hashservice/services/HashClassSoap.
    
    
    TCP error code 10061: No connection could be made because the target machine 
    
    
    actively refused it 127.0.0.1:8050. 
    
    Server stack trace: 
     at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
     at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.
    
    
    HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.Request(Message message,
    
    
     TimeSpan timeout)
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message,
    
    
     TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean 
    
    
    oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan
    
    
     timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action,
    
    
     Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(
    
    
    IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,
    
    
     IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,
    
    
     Int32 type)
     at HashClassSoap.CheckHash(CheckHashRequest request)
     at HashClassSoapClient.HashClassSoap.CheckHash(CheckHashRequest request)
    
    
    
    

  • you have added your wcf reference by selecting wcf project node. to resolve it select your test project node and add wcf reference. i hope it will work.

  • you have added your wcf reference by selecting wcf project node. to resolve it select your test project node and add wcf reference. i hope it will work.

  • Yeah! First time I ever fixed ANYTHING! Error went away when changed properties of project to use IIS instead of local directory.  Set the project to use IIS, click the button to create a virtual directory and…c’est voila!.  Good luck.

  • TrollSpouse, I seem to have this problem, but I don’t understand the solution you found. Could you be more specific where in properties you configured  to use IIS instead of local directory? Thanks.

  • Make sure that «Net.Tcp Listener» is running go to  ControlPanel/Administrative Tools/Services
    also «Net.Tcp Port Sharing»  Service.

    • Proposed as answer by
      M.El-Baz
      Saturday, October 22, 2016 5:57 PM

  • My Net.tcp listener shows as starting, however starts… it shows the net.tcp Port Sharing as started, as well as the Windows Process Activation Service as started… i get the 10061 error as well… any idea how I can fix this?  would a service admin
    logon do it versus Local System/Service?

  • did you find the solution I have the same problem «TCP error code 10061: No connection could be made because the target machine actively refused it.

    when the service and application on the same PC its working fine but when I deployed the client application on another pc, i got the above error.

  • I’m quite interested in this as well, as I’ve got the same issue. I had my WCF service, that uses TCP for the transport protocol, on a Windows 2003 R2 Server. We’re writing a WPF application. It works fine for me, but no other user can run it. So in an
    effort to try and figure out what’s wrong I am now running the WCF service on my machine (a Windows 7 Ultimate machine). I’ve put the WCF service into IIS. I made sure the Windows Firewall allows for the port I want to use (9000). But I started getting these,
    «No connection could be made because the target machine actively refused it» and then it gives my machine’s IP address. I saw back in 2011 that Ivendur suggested making sure that Net.Tcp Listener Adapter and Net.Tcp Port Sharing Service services both be running.
    They weren’t on my machine, but they are now, and that didn’t resolve the issue, I’m still getting that actively refused error message.


    Rod

  • I am receiving the same error when i  try to connect 2 clients to the same server.

    I make myself clear…

    i created a lan chat program that works just fine with 1 server form who listens (I used TPCListener) on 8080, and 1 client form that connects to it

    but if i try to open another client form and connect to the same server form at 8080 i get the error…

    i believed that, since the 2 clients use a different port to connect to localost:8080 the socket should not give an error…

    I don’t know how to solve this!


    +++ Alex +++

  • VMWARE Virtual network can cause such a problem (happened to me) — ‘Restore Defaults’ is the solution!


    Di-ma-N

  • For mine, I had to go into my router settings and use port forwarding.

  • It can be that if your server where AGPM client is started was an AGPM server before, that still these settings are used and therefore point to a wrong server. Just delete all entries of HKEY_LOCAL_MACHINESOFTWAREMicrosoftAgpm and below only enter the
    two following strings:

    DefaultArchive = AGPMServerName.company.com:4600
    InstallDirClient = C:Program FilesMicrosoftAGPMClient

    Note that «AGPMServerName.company.com» is the FQDN-name of the AGPM server. If you have another port than 4600 and/or another installation directory of your client, please adapt it (hust check before you delete anything).

  • I got similar error, I had to reboot the web server.

    Could not connect to net.tcp://testwe01/Services/Jse.EquitySystem.DataService/PricesDataService.svc

    The connection attempt lasted for a time span of 00:00:01.0312568. TCP error code 10061: No connection could be made because the target machine actively refused it xx.xx.xx.xxx:808.

  • I hosted a wcf service application using windows services. When my client (ASP.NET) tries to call the service class hosted by the windows service, I get this error «TCP error code 10061: No connection could be made because the target machine actively
    refused it. «. Is there a fix for this? The same code works fine if I host it using a console application.

    https://hipmusic.co/

    • Edited by
      HezekiahNig
      Thursday, July 25, 2019 11:20 PM


error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:10
Оценка:

При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Помогите плз!!! Клиенты недовольны. т.к. соединиться нельзя вообще никак! Это сообщения не переодически появляется а ПОСТОЯННО, но славо богу не у всех =(


Re: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 10:23
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Где угодно
1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
3)На серевре — скоре всего, опять же фаерволл.

В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

Да пребудет с тобою сила


Re[2]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:30
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>Где угодно

TC>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>3)На серевре — скоре всего, опять же фаерволл.

TC>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

А что может быть с настройками не то если:
Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 11:07
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>Здравствуйте, TarasCo, Вы писали:


TC>>Здравствуйте, maxidroms, Вы писали:


M>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>Где угодно

TC>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>3)На серевре — скоре всего, опять же фаерволл.

TC>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>А что может быть с настройками не то если:


M>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

1)
Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

2)Дело в провайдере?
про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Да пребудет с тобою сила


Re[4]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 11:09
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>Здравствуйте, TarasCo, Вы писали:


TC>>>Здравствуйте, maxidroms, Вы писали:


M>>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>>Где угодно

TC>>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>>3)На серевре — скоре всего, опять же фаерволл.

TC>>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>>А что может быть с настройками не то если:


M>>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


TC>1)

TC>Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

TC>2)Дело в провайдере?

TC>про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Ну хоть вы меня успокоили что это не в клиентской и не в серверной части дело…а то меня уже на куски тут готовы разорвать


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  06.09.05 09:45
Оценка:

10 (1)

TarasCo wrote:

[]

> В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения.

В этом случае отсылается только RST.

[root@localhost max]# tcpdump -i lo tcp port 10000
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
13:23:50.494285 IP localhost.localdomain.41915 > localhost.localdomain.10000: S 176260357:176260357(0) win 32767 <mss 16396,sackOK,timestamp 4126888 0,nop,wscale 2>
13:23:50.558286 IP localhost.localdomain.10000 > localhost.localdomain.41915: R 0:0(0) ack 176260358 win 0

2 packets captured
4 packets received by filter
0 packets dropped by kernel


Maxim Yegorushkin

Posted via RSDN NNTP Server 1.9


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  06.09.05 12:21
Оценка:

Здравствуйте, MaximE, Вы писали:

ME>В этом случае отсылается только RST.

Да, это меня переглючило, мысль ушла . RST+ACK S:0 A:xxxxxxx обычно отвечают
Спасибо за коррективу

Да пребудет с тобою сила


Re: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 11:46
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

Вы рано успокоились насчет серверной части
Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.
В более сложном случае при большой нагрузке может не успевать доходить ход до потока, делающего accept. С тем же результатом. Посмотрите

здесь

Автор: Michael Chelnokov
Дата: 09.11.01

и что мне тогда посоветовали.


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 12:16
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?


MC>Вы рано успокоились насчет серверной части

MC>Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
MC>Connection refused.
MC>No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

MC>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN (что вызвало бы WSAECONNREFUSED). Новые клиенты не получают ничего на свой FIN, поэтому TCP стэк клиента будет еще несколько раз пытаться установить соединение посылая серверу SYN, пока не соединится успешно или не отвалится по таймауту с ошибкой WSAETIMEDOUT.


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:01
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Максим, я бы не писал если бы не знал. Если проверишь, то увидишь в этом случае именно WSAECONNREFUSED для тех клиентов что не поместились в очередь. WSAETIMEDOUT они получат если совсем ничего не будет в ответ. А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


Re[4]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 13:07
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, MaximE, Вы писали:


MC>>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.


MC> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

И что в этом случае сервер отсылает клиенту?


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:10
Оценка:

1 (1)

Здравствуйте, MaximE, Вы писали:

ME>Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN

Не факт. Судя по Стивенсу, POSIX разрешает как игнорировать SYN, так и отвечать на него RST.
В Windows — второй вариант. В BSD — первый.
Давайте будем отталкиваться от того факта что клиенты все же получают RST, т.к. ошибка именно ECONNREFUSED, а не ETIMEDOUT. Т.е. кто-то все же отсылает оный RST. Почему бы не предположить что этот кто-то и есть сервер? Сервер под Windows


Re[5]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:11
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


ME>И что в этом случае сервер отсылает клиенту?

RST

Подождите ...

Wait...

  • Переместить
  • Удалить
  • Выделить ветку

Пока на собственное сообщение не было ответов, его можно удалить.

  • Question

  • I hosted a wcf service application using windows services. When my client (ASP.NET) tries to call the service class hosted by the windows service, I get this error «TCP error code 10061: No connection could be made because the target machine actively refused it. «. Is there a fix for this? The same code works fine if I host it using a console application.

Answers

  • What port are you listening on? Is that port unblocked in your windows firewall?

All replies

  • What port are you listening on? Is that port unblocked in your windows firewall?

  • Yes, my firewall was blocking it. I got around it and it fixed the problem.

    • Proposed as answer by

      Friday, May 23, 2014 1:28 PM

  • Hi,

    Evn i am gettin the same error. Can u tell me wat is the fix.

  • I am getting the same error — but only when I change my return type to a cutom object. CLR types work fine — i.e. an IList of Strings, but not, say, MyResponseObj. I’m running the asp.net development server on port 1212, with a wsHttpBinding. Like I said, the problem seems to be with the return type which is marked up with the DataContract — DataMember tags, like my other custom objects that work fine as input objects. I am able to pass in an arbitrarily complex object of custom types no problem — but the server tanks with a custom return type.

    Any suggestion would be appreciated. Thanx — Ian

  • Brian

    I’ve configured trace in the web.config file as per the article, but no output or log file is generated. Do I need to create a trace object in my test code (NUnit) to explicitly start the trace segment?

    Or should the web.config entry be sufficient?

    Thanks,

    Ian

  • Kenny,

    I’ve unblocked the port on the firewall and still unable to connect.

    What was the fix?

  • For problem returning custom objects, turns out my IList<T> member variable, since it could be nullable, required this in the data contract: [DataMember(EmitDefaultValue = false)]
    That is what was causing the service to refuse the connection. Now all is well again.  A newbie error no doubt, but I never even heard of WCF before I started at my new company.  =o)

    • Proposed as answer by
      JeffKite
      Wednesday, August 14, 2013 6:32 PM
  • What port are you using? What binding is this? Can you connect to the port using IE (assuming you have an HTTP GET metadata enabled)?

  • Hi ,

    I am getting this error if I host it using a console application. it works fine if client is asp.net. Is there a fix for this?

    -ravi

  • try to remove and add service refrences again…it will help you to connect wcf…

  • Hi JothiMurugan,

    I am also getting same error when I host with the windows service.

    Same application when hosted in Console application, works fine.

    Can you please help me with the fix.

    Thanks in advance.

    Sakthi

  • hi
    i don’t know it will helpfull to u or not but u should try it
    first u click on  host  project and  click on Start new instance
    then u should run windows application

  • I have configured Tracing and I see my trace files just fine, the prblem is I don’t see an Error icon. 

    I’m looking through all the activities in the trace viewer and the one for my service operation has To and from transport messages, I can see the start for the activity but there is nothing indicating an error and I setup it up for  switchValue=»Error,ActivityTracing». 

    ??


    Santiago Perez

  • Hi,
    I am trying to write a WCF service with transport level security and basicHTTP binding. I am using a custom Membership provider to authenticate a client call to the service by authenticating the User ID and password passed to the service. I believe that WCF does not allow UserID/Password auth without having SSL certificate installed because the UserID/password are sent as clear text. I am currently in development and I tried installing the test certificate (X.509) on my dev machine running the service but w/o any success.
    My service web.config looks like this

    <

    system.serviceModel>

    <

    services>

    <

    service behaviorConfiguration=«LCCService.rbagLCWS_ServiceBehavior«

    name=«LCCService.rbagLCWS_Service«>

    <

    endpoint address=«»

    binding=«basicHttpBinding«

    bindingConfiguration=«LCCService.rbagLCWS_ServiceBinding«

    contract=«LCCService.IrbagLCWS_service«>

    </

    endpoint>

    <

    endpoint address=«mex«

    binding=«mexHttpBinding«

    contract=«IMetadataExchange« />

    </

    service>

    </

    services>

    <

    behaviors>

    <

    serviceBehaviors>

    <

    behavior name=«LCCService.rbagLCWS_ServiceBehavior«>

    <

    serviceCredentials>

    <

    userNameAuthentication userNamePasswordValidationMode=«MembershipProvider« membershipProviderName=«PasswordProvider«/>

    </

    serviceCredentials>

    <

    serviceMetadata httpGetEnabled=«true« />

    <

    serviceDebug includeExceptionDetailInFaults=«true« />

    </

    behavior>

    </

    serviceBehaviors>

    </

    behaviors>

    <

    bindings>

    <

    basicHttpBinding>

    <

    binding name=«LCCService.rbagLCWS_ServiceBinding«>

    <

    security mode=«Transport«>

    <

    transport clientCredentialType=«Basic«/>

    </

    security>

    </

    binding>

    </

    basicHttpBinding>

    </

    bindings>

    </

    system.serviceModel>

    When I try to call the service using the client w/o having the test certification installed, I get the following error:
    Could not connect to https://XYZ.com/rrxainet/LCCWCFService/rbagLCWS_service.svc. TCP error code 10061: No connection could be made because the target machine actively refused it XXX.XXX.XX.XXX:443.

    I have spent almost 2 days trying to figure out the solution and how to successfully install the test certificate to get it working but to no avail.

    Please can someone help. I really appreciate it!!!

  • hi guys,

    i am new to dot net. when i am using the folling program for connecting the particuler port it is giving the error.

    int

    timout = Convert.ToInt32(txttimeout.Text);

    int port = 5000;

    IPAddress localAddr = IPAddress.Parse(«127.0.0.1»);

    IPEndPoint remoteEndPoint = new IPEndPoint(localAddr, port);

    TcpClient NetworkClient = TimeOutSocket.Connect(remoteEndPoint, timout);

    NetworkStream networkstream = NetworkClient.GetStream();

    StreamReader streamReader = new StreamReader(networkstream);

    string line = streamReader.ReadToEnd(); //streamReader.ReadLine();

  • I got the same message after adding the registry value  «KeepAliveTime» with value 300000 in the window registry under HKEY_LOCAL_MACHINESystemCurrentControlSetServicesTcpipParameters.

    When I removed the window registry «KeepAliveTime», it resumed normal.

    Is there any settings I have to check ?

  • Hi All,

     I am new to WCF. I have created a WCF Service and hosted it in Windows Service. I have got a below Error when tring to create Client Proxy for the service.

    Error Message:

    «There was an error downloading ‘http://localhost:8051/Service1/’.
    Unable to connect to the remote server
    No connection could be made because the target machine actively refused it 127.0.0.1:8051
    Metadata contains a reference that cannot be resolved: ‘http://localhost:8051/Service1/’.
    Could not connect to http://localhost:8051/Service1/. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8051.

    Unable to connect to the remote server
    No connection could be made because the target machine actively refused it 127.0.0.1:8051
    If the service is defined in the current solution, try building the solution and adding the service reference again.»

    I have seen some posts related to Issue like unblocking the port in Firewall. I have unblocked all ports from Firewall, Still the Issue raising while create Client Proxy. Some one can help me on this Problem. I have Pasted my configuration file below.

    <system.serviceModel>
        <services>
          <service name=»WcfService1.Service1″ behaviorConfiguration=»WcfService1.Service1Behavior»>
            <!— Service Endpoints —>
            <endpoint address=»» binding=»wsHttpBinding» contract=»WcfService1.IService1″>
            </endpoint>
            <!—<endpoint address=»» binding=»netTcpBinding» contract=»WcfService1.IService1″></endpoint>—>
            <!—<endpoint address=»mextcp» binding=»mexTcpBinding» contract=»IMetadataExchange»/>—>
            <endpoint address=»mex» binding=»mexHttpBinding» contract=»IMetadataExchange»/>
            <host>
              <baseAddresses>
                <add baseAddress = «http://localhost:8051/Service1/» />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior name=»WcfService1.Service1Behavior»>
              <!— To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment —>
              <serviceMetadata httpGetEnabled=»true»/>
              <!— To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information —>
              <serviceDebug includeExceptionDetailInFaults=»false»/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    Please reply me to solve this problem.

  • I started getting this problem in VS 2008 IDE when I’m testing my web services.  Not a firewall issue.  Anyone find a positive solution to this??

    My Web Service test web application used to work fine a few months ago — now when I test it I get this error?  So I’m guessing some OS update has broken VS 2008 IDE for web services??

    Rob

  • Solved the problem for my case (appears to a Project’s Web Service reference issue):

    In VS 2008 IDE

    In your actual Web Services Project (with the ASMX source) — My Project | Web | Use Visual Studio Development Server | Auto-assign Port.

    a. If this is hard coded to a specific port you’ll need to verify the calling Project’s Web Service references match the same port and reference.

    b. Open your calling project — My Project | References — remove your Web Service references (Type = Service) — be sure to note the ReferenceName you used.  Now Add Service Reference back again — Discover Services in Solution, select the service
    and be sure to re-enter the same ReferenceName you used originally.

    If your Web Service project is configured differently or you reference external web services, then it might just be a case of removing and re-adding the web service back being sure to use the same ReferenceName so you project references stay intact.

    Rob.

    • Proposed as answer by
      Rob Ainscough
      Monday, August 2, 2010 10:23 PM
  • Hi I'm new to WCF.. I'm trying to invoke free web service
    

    http://www.mindreef.net/svc/hashservice/servicesHashClassSoap?wsdl....

    So i have created a client but it gives me an exception..Please help me

    Could not connect to http://localhost:8050/hashservice/services/HashClassSoap.
    
    
    TCP error code 10061: No connection could be made because the target machine 
    
    
    actively refused it 127.0.0.1:8050. 
    
    Server stack trace: 
     at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
     at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
     at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.
    
    
    HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.Request(Message message,
    
    
     TimeSpan timeout)
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message,
    
    
     TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean 
    
    
    oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan
    
    
     timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action,
    
    
     Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(
    
    
    IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,
    
    
     IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,
    
    
     Int32 type)
     at HashClassSoap.CheckHash(CheckHashRequest request)
     at HashClassSoapClient.HashClassSoap.CheckHash(CheckHashRequest request)
    
    
    
    

  • you have added your wcf reference by selecting wcf project node. to resolve it select your test project node and add wcf reference. i hope it will work.

  • you have added your wcf reference by selecting wcf project node. to resolve it select your test project node and add wcf reference. i hope it will work.

  • Yeah! First time I ever fixed ANYTHING! Error went away when changed properties of project to use IIS instead of local directory.  Set the project to use IIS, click the button to create a virtual directory and…c’est voila!.  Good luck.

  • TrollSpouse, I seem to have this problem, but I don’t understand the solution you found. Could you be more specific where in properties you configured  to use IIS instead of local directory? Thanks.

  • Make sure that «Net.Tcp Listener» is running go to  ControlPanel/Administrative Tools/Services
    also «Net.Tcp Port Sharing»  Service.

    • Proposed as answer by
      M.El-Baz
      Saturday, October 22, 2016 5:57 PM
  • My Net.tcp listener shows as starting, however starts… it shows the net.tcp Port Sharing as started, as well as the Windows Process Activation Service as started… i get the 10061 error as well… any idea how I can fix this?  would a service admin
    logon do it versus Local System/Service?

  • did you find the solution I have the same problem «TCP error code 10061: No connection could be made because the target machine actively refused it.

    when the service and application on the same PC its working fine but when I deployed the client application on another pc, i got the above error.

  • I’m quite interested in this as well, as I’ve got the same issue. I had my WCF service, that uses TCP for the transport protocol, on a Windows 2003 R2 Server. We’re writing a WPF application. It works fine for me, but no other user can run it. So in an
    effort to try and figure out what’s wrong I am now running the WCF service on my machine (a Windows 7 Ultimate machine). I’ve put the WCF service into IIS. I made sure the Windows Firewall allows for the port I want to use (9000). But I started getting these,
    «No connection could be made because the target machine actively refused it» and then it gives my machine’s IP address. I saw back in 2011 that Ivendur suggested making sure that Net.Tcp Listener Adapter and Net.Tcp Port Sharing Service services both be running.
    They weren’t on my machine, but they are now, and that didn’t resolve the issue, I’m still getting that actively refused error message.


    Rod

  • I am receiving the same error when i  try to connect 2 clients to the same server.

    I make myself clear…

    i created a lan chat program that works just fine with 1 server form who listens (I used TPCListener) on 8080, and 1 client form that connects to it

    but if i try to open another client form and connect to the same server form at 8080 i get the error…

    i believed that, since the 2 clients use a different port to connect to localost:8080 the socket should not give an error…

    I don’t know how to solve this!


    +++ Alex +++

  • VMWARE Virtual network can cause such a problem (happened to me) — ‘Restore Defaults’ is the solution!


    Di-ma-N

  • For mine, I had to go into my router settings and use port forwarding.

  • It can be that if your server where AGPM client is started was an AGPM server before, that still these settings are used and therefore point to a wrong server. Just delete all entries of HKEY_LOCAL_MACHINESOFTWAREMicrosoftAgpm and below only enter the
    two following strings:

    DefaultArchive = AGPMServerName.company.com:4600
    InstallDirClient = C:Program FilesMicrosoftAGPMClient

    Note that «AGPMServerName.company.com» is the FQDN-name of the AGPM server. If you have another port than 4600 and/or another installation directory of your client, please adapt it (hust check before you delete anything).

  • I got similar error, I had to reboot the web server.

    Could not connect to net.tcp://testwe01/Services/Jse.EquitySystem.DataService/PricesDataService.svc

    The connection attempt lasted for a time span of 00:00:01.0312568. TCP error code 10061: No connection could be made because the target machine actively refused it xx.xx.xx.xxx:808.

  • I hosted a wcf service application using windows services. When my client (ASP.NET) tries to call the service class hosted by the windows service, I get this error «TCP error code 10061: No connection could be made because the target machine actively
    refused it. «. Is there a fix for this? The same code works fine if I host it using a console application.

    https://hipmusic.co/

    • Edited by
      HezekiahNig
      Thursday, July 25, 2019 11:20 PM

На чтение 7 мин. Просмотров 6.8k. Опубликовано 15.12.2019

Содержание

  1. Почему возникает такая проблема
  2. Как устраняется проблема
  3. Что вызывает ошибку «подключение не установлено, т.к. конечный компьютер отверг запрос на подключение»
  4. Скачок напряжения и потеря связи с серверами
  5. Проблема возникает в торренте
  6. Брандмауэр или антивирус не разрешают соединение
  7. Решение проблем с частной локальной сетью
  8. Другие причины появления ошибки
  9. Несколько вариантов поиска ошибок и решений:

Почему возникает такая проблема

Ошибка «Сервер 1С:Предприятия не обнаружен. Ошибка сетевого доступа к серверу.
(Windows Sockets — 10061 ( . ) Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение
line = 567 file = .srcDataExchangeTcpClientlmpl.cpp) » возникает, когда служба «Агент сервера 1С:Предприятие» выключена (остановлена).

Запомните в закладки , потом всегда можно будет вернуться к этой страничке.

Как устраняется проблема

Запустить (стартовать) службу Агента сервера 1С:Предприятие.

После установки какого-либо софта, при входе в агент сервера 1С или запуске игры у любого пользователя может выскочить ошибка “Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение”. Эта проблема проявляется и при работе в какой-нибудь программе – она при этом попросту закроется, и вылезет окошко с вышеуказанным сообщением. Сегодня мы разберем существующие методы решения этой ошибки.

Что вызывает ошибку «подключение не установлено, т.к. конечный компьютер отверг запрос на подключение»

Когда появляется ошибка “ Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение ”, это значит, что удаленное устройство, с которым мы попытались связаться, не отвечает на наши действия и не выдает нужную информацию. Это делает невозможной работу в программе. Почему так бывает? Причин несколько: и скачок напряжения в сети , что обрывает связь с серверами, и “недовольство” брандмауэра , и неправильные настройки VPN-соединения . Сейчас мы разберем поэтапно, что нужно сделать, чтобы убрать данную ошибку в различных ситуациях.

Скачок напряжения и потеря связи с серверами

Пользователи, особенно офисные работники, описывают такую ситуацию, когда скачок напряжения в сети вызывает потерю связи с серверами . Это может остановить работу всей компании. На компьютере (одном или нескольких) появляется сообщение о том, что к серверу 1С:Предприятие подключиться невозможно, т. к. конечный компьютер отверг запрос на подключение.

К счастью, справиться с этим довольно просто.

  1. Нажимаем ЛКМ на лупу в нижней панели монитора (рядом с кнопкой “Пуск”) и вводим слово “ Службы ”.
  2. Ищем в списке службу “ Агент сервера 1С:Предприятие ”.
  3. Запускаем ее через ПКМ .

Все, можно заново устанавливать соединение с сервером. Этот способ можно применить и в тех случаях, когда возникает ошибка с кодом 0000000002, т. к. в результате какого-либо сбоя любая служба может быть остановлена.

Проблема возникает в торренте

При скачивании фильмов или программного обеспечения с торрента тоже может выскочить ошибка “Подключение не установлено, т. к. конечный компьютер отверг запрос на подключение”. В этом случае нужно либо проверить свое сетевое подключение, либо подождать, пока разработчики трекера исправят ситуацию. Если разорвано соединение с интернетом, пробуем переподключить устройство (роутер, модем) или перезагрузить его . После этого заново запускаем торрент и скачиваем фильм или программу.

Брандмауэр или антивирус не разрешают соединение

Если антивирус или брандмауэр “ругаются” и не дают подключиться к серверу, то для исправления ошибки есть два варианта.

Отключить и один, и другой Это допустимо только в том случае, если мы уверены, что во время бездействия “защитников” не поймаем какой-нибудь вредоносный код
Добавьте проблемный порт в список исключений брандмауэра Он пропустит сетевой трафик по указанному порту, и работа будет налажена.

Одно из популярных мест, где возникает данная ошибка – софт 1С. Проблема в том, что агент сервера 1С и все процессы запущены, но тут появляется ошибка и сообщение о том, что “Подключение не установлено, т. к. конечный компьютер отверг запрос на подключение”. Решаем мы данную проблему тем, что добавляем порт 10061 в исключения брандмауэра и снова устанавливаем соединение с сервером.

Добавляем отмеченный порт 10061 в исключения брандмауэра

Важно: всегда используем только самую свежую версию 1С. Читаем о том, где получить обновления, в статье об ошибке под номером 0400300003.

Решение проблем с частной локальной сетью

Некоторые пользователи сообщают, что проблема также возникает после создания VPN-соединения в момент подключения к сети. Причем проявилось это после переустановки ОС с XP на более актуальную версию . Менялись настройки подключения, но результата это не давало – появлялось сообщение об ошибке соединения под номером 0x8007274D . Исправляется ошибка путем добавления ключей в реестр. Вводим в строку “ Выполнить ” команду regedit.exe .

Вызываем реестр через строку “Выполнить”

Появляется окно редактора реестра, в котором мы поочередно ищем указанные на картинке ветки и добавляем соответствующие ключи .

Редактируем записи реестра

Там же мы обязательно выставляем настройки брандмауэра (FirewallRules).

Другие причины появления ошибки

Многие пользователи пытаются при возникновении проблемы сразу снести установленную операционную систему, но этого делать не нужно.

По крайней мере, пока мы не убедились, что проблема не с нашим устройством, а на сторонних ресурсах:

  1. Если не работает трекер , то для начала нужно подождать, возможно, ошибки на стороне разработчиков (сделали что-то не то или не подключили все составляющие сервера). Для уверенности стоит пообщаться с другими пользователями на каком-либо форуме и выяснить, у всех ли существует такая же проблема.
  2. Также у многих возникает вопрос, можно ли запускать на компьютере одновременно и сервер 1С, и клиент на Python . Ответ – можно, это никак не повлияет на возникновение ошибки.

Мы постарались разобраться в способах исправления ошибки “Подключение не установлено, т. к. конечный компьютер отверг запрос на подключение”. Если у вас есть другие реальные способы решения этой проблемы, описывайте их в комментариях.

Бывает, однажды, ни с того и с чего программа 1С нам выдает: Ошибка соединения с сервером 1С:Предприятие Не запущен ни один рабочий процесс. Соединение с базой невозможно.

Несколько вариантов поиска ошибок и решений:

1. Глюк сервака — всякое бывает

Остановите в диспетчере задач процессы: ragent rphost rmngr и Запустите службу «Агент сервера 1С:Предприятие»

2. При внезапном отключения питания или аналогичных ситуациях — повредился файл srvribrg.lst

Нужно удалить все из папки srvinfo

Для Windows зайдите в каталог c:program files1c1cv82 srvinfo, если Linux — то файлы лежат в домашнем каталоге пользователя от имени которого запускается сервис: usr1cv8/home/.1cv8/1C/1cv8 .

Запустите службу «Агент сервера 1С:Предприятие».

Через Администрирование серверов 1С Предприятия по новой создать кластер 1С и добавить информационные базы

3. Переименовали сервер на котором служба агента 1С

После переименования сервера Windows Server 2008 с установленным 1С:Предприятие 8.2, перестала работать служба «Агент сервера 1С:Предприятие 8.2». Она запускается, работает несколько секунд и останавливается. Если подключаться к серверу 1С:Предприятие 8.2 через консоль серверов, то возникает ошибка:

Ошибка соединения с сервером 1С:Предприятие 8.2 server_addr=tcp://SERVER:1540 descr=Ошибка сетевого доступа к серверу (Windows Sockets — 10061(0x0000274D). Подключение не установлено, т.к. конечный компьютер отверг запрос на соединение.) line=590 file=.SrcDataExchangeTcpClientItmpl.cpp

При подключении к базе на этом сервере имеем следующую ошибку:

Не запущен ни один рабочий процесс. Соединение с базой невозможно.

Данная проблема связана с тем, что настройки кластера серверов 1С:Предприятие хранятся в файлах в каталоге srvinfo (путь к нему указывает параметр -d в свойствах службы «Агент сервера 1С:Предприятие»). Поэтому после изменения имени компьютера надо выполнить дополнительно следующие действия:

Для Windows зайдите в каталог c:program files1c1cv82srvinfo, если Linux — то файлы лежат в домашнем каталоге пользователя от имени которого запускается сервис: usr1cv8/home/.1cv8/1C/1cv8 .

Отредактируйте в любом текстовом редакторе два файла: srvinfosrvribrg.lst и srvinfo
eg_15411CV8Reg.lst. Замените в этих файлах старое имя сервера на новое.

Запустите службу «Агент сервера 1С:Предприятие».

После выполнения указанных действий — Все будет

Stuck with Winsock Error 10061? We can help you.

Winsock error 10061 occurs when the target machine we are trying to connect actively refuses the request.

This ‘Connection Refused’ error happens generally when the service with which we are trying to connect is inactive.

Here at Bobcares, we often get requests from our customers to fix similar errors as a part of our Server Management Services.

Today let’s see how our Support Engineers fix this error for our customers.

How to fix Winsock Error 10061?

Before going into the steps of fixing Winsock Error 10061, we will see some of the common causes for this error.

Common causes for this Error:

1. The most common cause is a misconfigured server, full server, or using an incorrect port to connect.

2. Poor or no internet connection.

3. Service inactive on the destination server.

4. Trying to connect to the wrong host.

5. Using a port number that is higher than 655355.

6. A firewall or anti-virus software on the local computer or network connection blocking the connection.

7. Corrupted registry.

Steps to fix Winsock Error 10061

1. First we must check if the Internet connection is working properly or not.

2. Next we need to ensure that firewall is not blocking the Winsock connection.

Generally, firewalls are designed to prevent unauthorized access soo there is a possibility that it can see Winsock as a potential threat.

To unblock Winsock, we can use the following steps:

a. First, locate the firewall in the navigation bar (next to the clock)
b. Then right-click and take the “Exception List”
c. In the exception list, if Winsock is not already displayed, we will add it.

3. Run a scan to check for potential threats or viruses using any anti-virus.

4. Clean out the registry using a registry cleaner to scan through the part of the PC and repair any of the damaged settings if any.

5. After that we can verify whether the host is resolving to the correct IP address

6. Then we will check whether the ports are open and listening.

7. We must keep in mind to use any port less than 65535.

8. After this we will ensure that the service can be connected to all IP addresses. Also, we will check if the ISP allows outbound traffic on port 25.

10. If all the above steps did not help to connect, we will disable the firewall or anti-virus software and try to connect again.

[Still, facing Winsock error? We are happy to help you!]

Conclusion

To conclude, we saw various causes for Winsock error 10061 along with the steps our Support Techs follow to fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Referring to a video tutorial about WCF service in windows service,i have created a sample WCF service and hosted that Service with netTcpBinding in Windows Service.(since i want this WCF service to run as windows service)

Its a simple service which adds/deletes/loads employee details, and is consumed by a windows forms application.that worked fine,when i build the whole solution(consisting wcf service + windows service + client app), however when i wanted to verify that my client isn’t directly referring to the project in the solution, so i excluded both the services(wcf+windows) from my solution. it stopped working throwing an error, reading:

Could not connect to net.tcp://localhost:8010/EmployeeService.Service1/. The connection attempt lasted for a time span of 00:00:02.0180000. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8010.

Important point that might help to answer:

  • WCF service and windows service have identical app.config
  • Windows service is running as a service

this is my client app.config

<?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <netTcpBinding>
                    <binding name="netTcpEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00"
                        receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
                        transferMode="Buffered" transactionProtocol="OleTransactions"
                        hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                        maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                        maxReceivedMessageSize="65536">
                        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                        <reliableSession ordered="true" inactivityTimeout="00:10:00"
                            enabled="false" />
                        <security mode="Transport">
                          <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                            <message clientCredentialType="Windows" />
                        </security>
                    </binding>
                </netTcpBinding>
            </bindings>
            <client>
                <endpoint address="net.tcp://localhost:8010/EmployeeService.Service1/"
                    binding="netTcpBinding" bindingConfiguration="netTcpEndPoint"
                    contract="Service1.IService1" name="netTcpEndPoint">
                    <identity>
                        <userPrincipalName value="user@company.com" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>

any help would be greatly appreciated….

Не удается подключиться к postgresql через порт 5432 – postgresql

Решение проблемы, когда значения скопированных ячеек из табличных документов 1С в Excel воспринимаются последним как текст, т.е. без дополнительного форматирования значений невозможно применить арифметические операции. Поводом для публикации послужило понимание того, что целое предприятие с более сотней активных пользователей уже на протяжении года мучилось с такой, казалось бы на первый взгляд, тривиальной проблемой. Варианты решения, предложенные специалистами helpdesk, обслуживающими данное предприятие, а так же многочисленные обсуждения на форумах, только подтвердили убеждение в необходимости описания способа, который позволил мне качественно и быстро справиться с ситуацией.

15.01.2019 32161 itriot11 27

  • Поврежденная загрузка или неполная установка программного обеспечения Windows 7.
  • Повреждение реестра Windows 7 из-за недавнего изменения программного обеспечения (установка или удаление), связанного с Windows 7.
  • Вирус или вредоносное ПО, которые повредили файл Windows или связанные с Windows 7 программные файлы.
  • Другая программа злонамеренно или по ошибке удалила файлы, связанные с Windows 7.

Ошибки типа Ошибки во время выполнения, такие как «Ошибка 10061», могут быть вызваны целым рядом факторов, поэтому важно устранить каждую из возможных причин, чтобы предотвратить повторение ошибки в будущем.

Ошибки во время выполнения в базе знаний

star rating here

ВАЖНО: пользователь «postgres» не прошёл проверку подлинности (Ident)

Данная ошибка возникает при разнесении серверов по разным ПК из-за неправильно настроеной проверки подлинности в локальной сети. Для устранения откройте /var/lib/pgsql/data/pg_hba.conf , найдите строку:

Host all all 192.168.31.0/24 ident

и приведите ее к виду:

Host all all 192.168.31.0/24 md5

где 192.168.31.0/24 — диапазон вашей локальной сети. Если такой строки нет, ее следует создать в секции IPv4 local connections .

Методика устранения ошибок соединения с сервером 1С

В данном случае необходимо понимать, что:

  • Либо процессов нет;
  • Либо не удается «увидеть» процессы в связи с отсутствием доступа;
  • Либо происходит обращение по другому адресу.

1. Сначала проверим есть ли на сервере 1С в запущенные рабочие процессы rphost.

Запущена ли служба «Обозреватель SQL Server»

Продолжая тему именованных экземпляров и динамических портов, стоит отметить, что если используется именованный экземпляр и динамические порты, то дополнительно должна быть запущена служба «Обозреватель SQL Server». Если она не запущена, то подключиться Вы не сможете, будет возникать все та же ошибка

«provider: TCP Provider, error: 25 – connection string is not valid»

Поэтому запустите SQL Server Configuration Manager и проверьте соответствующую службу.

Скриншот 3

Что вызывает ошибку «подключение не установлено»

Появление данной ошибки обычно означает, что удаленное устройство, с которым мы попытались связаться, не отвечает на наши действия и не выдает нужную информацию. Это делает невозможной работу в программе. Почему так бывает? Причин несколько: и скачок напряжения в сети, что обрывает связь с серверами, и “недовольство” брандмауэра, и неправильные настройки VPN-соединения. Сейчас мы разберем поэтапно, что нужно сделать, чтобы убрать данную ошибку в различных ситуациях.

Пользователи, особенно офисные работники, описывают такую ситуацию, когда скачок напряжения в сети вызывает потерю связи с серверами. Это может остановить работу всей компании. На компьютере (одном или нескольких) появляется сообщение о том, что к серверу 1С:Предприятие подключиться невозможно, т. к. конечный компьютер отверг запрос на подключение.

К счастью, справиться с этим довольно просто.

  1. Нажимаем ЛКМ на лупу в нижней панели монитора (рядом с кнопкой “Пуск”) и вводим слово “Службы”.
  2. Ищем в списке службу “Агент сервера 1С:Предприятие”.
  3. Запускаем ее через ПКМ.

Все, можно заново устанавливать соединение с сервером. Этот способ можно применить и в тех случаях, когда возникает ошибка с кодом 0000000002, т. к. в результате какого-либо сбоя любая служба может быть остановлена.

Включен ли протокол «TCP/IP»

Кроме всего вышеперечисленного необходимо проверить, включен ли протокол «TCP/IP» в сетевой конфигурации SQL Server, так как если SQL Server используется в сети, данный протокол обязательно должен быть включен.

Это можно проверить в SQL Server Configuration Manager в разделе «Сетевая конфигурация SQL Server».

Скриншот 5

Если сервер лицензий ругается «Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение» : Супермаг Плюс (Супермаг 2000)

В общем, проверьте файл hosts и то, что localhost в нем указывает на 127.0.0.1, а не куда-то еще, в т.ч. на IPv6 адреса.

Кривописатели где-то прибили 127.0.0.1, а где-то localhost, видимо.

Форум на базе vBulletin®
Copyright © Jelsoft Enterprises Ltd.
В случае заимствования информации гипертекстовая индексируемая ссылка на Форум обязательна.

Causes of connect error 10061?

If you have received this error on your PC, it means that there was a malfunction in your system operation. Common reasons include incorrect or failed installation or uninstallation of software that may have left invalid entries in your Windows registry, consequences of a virus or malware attack, improper system shutdown due to a power failure or another factor, someone with little technical knowledge accidentally deleting a necessary system file or registry entry, as well as a number of other causes. The immediate cause of the «connect error 10061» error is a failure to correctly run one of its normal operations by a system or application component.

Прибег к возвращению в 10056; однако, похоже, не может заставить его работать. Не удается подключить мой проводной сетевой сетевой адаптер с момента обновления . Project Spartan 10056 для новой сборки 10061. Это должно быть что-то простое; тем не менее, проблема была бы очень признательна. Любые идеи для этого прекрасно работают; однако Internet Explorer, Mozilla, Tor и т. д. не будут подключаться.

Вы пытались переустановить?

Просто обновленный от сборки Windows 10 действительно хотел бы запустить последнюю сборку.

Have you contacted your Have you changed any in which you don’t give necessary information. You may want to settings when this happened? Many users here don’t reply to threads internet provider for help yet?

read the forum rules.

Could not connect to pop.****.*** etc Cause: Connection would be appreciated. email server and I get the following message. I’ve been trying to connect to my Thanks. John

помогите с следующей проблемой.

Кто-нибудь понравится
Любая помощь отказалась (10061)

Эта ошибка возникает с тремя разными почтовыми серверами.

Где-то еще я должен смотреть?

Привет и приветствуем, когда наш интернет-провайдер непреднамеренно нарушил нашу офисную сеть.

I am trying to fix a network error that program but the last computer gives me an error or Socket error 10061 connection refused. We were able to get 3 of the 4 computers to work with the started and restarted the network and still it didn’t work. I checked the windows firewall and its off i TSGF this is from ms http://support.microsoft.com/kb/191687
это немного информации http://help.globalscape.com/help/cuteftppro6/socket_error_=__10061.htm

Кто-нибудь знает, что такое ошибка Winsock? Том

I get and error 10061 and I cannot get Defrag to run. I’ve done all my reinstalled,but still will not connect. Everything worked fine the other day and nothing

scans my system is clean. I’ve also uninstalled it and new has been added or install on my PC.

Hi,I’m have been using O&O Defrag Pro for some time now and it works great until yesterday.

кто получает это при проверке обновлений? Просто попробовал, и все в порядке со мной, вы пробовали это несколько раз? Удивление, если это была ошибка сервера, которая теперь очищена.

Outlook has
This has happened occasionally with Eudora but the same problem. I can log in to my mail account using the related to the 10061 error or not. I don’t know if this is you would like to share?

I can’t swear to that (duh. I did not write it down). Disabling Blackice firewall problems at all. This BSOD phenomenon has been there for awhile works fine. No connection Eudora when connecting to all three of my POP3 accounts.

I am getting a 10061 connection refused error using and has not bothered any email function before. I think it showed ACPI.SYS as the offending driver but had no effect. Any similar experiences or solutions not fix it. has always fixed itself by restarting the program.

FTP Rebooting does web based method so the problem is on my end.

Hopefully somebody here is able Thanks

Я получаю эти сообщения об ошибках:
The connection to the server has failed. The rest of the computer appears able to guide me through this problem. 10061, Error Number: 0x800CCC0E
Or ‘port 25’ depending on whether I’m sending or receiving.

Здравствуйте,
I hope that someone here is to guide me through the problem. Account: ‘mail.stirling.co.uk’, Server: ‘127.0.0.1’, Protocol: POP3, Port: 110, Secure(SSL): No, Socket Error:
When I try to send or receive e-mails using outlook express to be working without any problem.

When I IBM T30 laptop with cable-internet. Toolbar — — (no file)
O2 — BHO: Yahoo! I am using an shows my network is connected (low packets) but I can’t access internet.

ANY assistance a winsock catalog error, says it will fix it and need to reboot. I use XP Pro and when I when I diagnose problem, it mentions received the following log.

Hi: First time here, but have a would be great! I ran hijackthis and feeling I am in the right place.

no problem when booting in safe mode. reboot, nothing happens. Not sure what has happened, but whenever I reboot my computer, it I can access all internet and programs

Я попытался установить обновление 10061, но он дает ошибку 0x8024402c, скажите мне, как ее решить

Я выполнил следующие шаги:
http://renegademinds.com/Default.aspx?tabid=57

но я получаю, что я пытаюсь получить доступ с моего ноутбука (win2003) к серверу (win2003) в моей сети (в другой локальной сети, у нас есть два VALNs 192.168.1.x и 192.168.2.x) на работе. Я не понимаю, что такое ошибка:

не удалось подключиться: соединения отказались (10061). Нажмите, чтобы развернуть . ошибка. Я сделал.

Would ISP Fix possibly be an answer? I have a number of programs that won’t access the internet, like rid of from freeware I’ve used that it was bundled with. Thank-you,
Susano

будем очень благодарны.

I use Adaware 6.0 and have had New.net to get I did also read the post «can use network but not internet» and PestPatrol for updates, BigFix, Local Port Scanner and a number of others. Any help would This is driving me buggy and I really don’t want to have to reinstall my OS to fix it.

I can use the internet fine, as well as getting my Norton antivirus updates.

Иногда может перезагружать компьютер с помощью сервера.
I recently get «Error — connection Norton. with no error and the other one will not. Windows XP.

Используйте и недавно удалили. Никакой шаблон, насколько он работает, а какой нет. Все настройки верны. В следующий раз без использования ярлыка.

Не стесняйтесь удачи. Поступили в Сеть. В некоторых случаях учетная запись одного человека будет появляться Нет для входа в систему.

Thanks. We have three identities will not. Have attempted to log and modem and will work. Was infected with to server has failed» numbers above.

Кто-то запросит программу или приложение или даже пойдет в сеть. Просто обновлен до 10061, к сожалению, я не могу открыть какую-либо помощь. Я очень застрял, каждый раз, когда я пытаюсь открыть приложение, настройку или программу, этот брокер времени исполнения .exe всплывает . .

Только для информации Norton поставляется бесплатно, а не скачивает почту и дает мне сообщение 10061 Socket Error. После обновления Norton AV и брандмауэра Windows Mail будет проблемой Socket Error и вернется только к Norton. Я отключил брандмауэр и включил брандмауэр Vista, и это решает проблему Norton AV и Firewall на моем новом ПК. ура

Взгляните на моего провайдера и Norton 2006.

Может кто-нибудь предложить, как я могу решить, но у меня есть раздражающий красный символ проблемы на моей панели задач сейчас для Norton .
Hi

У меня проблема после недавней установки: Устранение неполадок с Windows Mailhttp: //windowshelp.microsoft.com/Windows/e. 2440761033.mspx

Canadian_Nob
Это сообщение 99.9% времени сообщает почту, и я получил это:

Не удалось подключиться к серверу.

Это была моя проблема вчера вечером:

«I just tried to open my have caused this error, if someone could explain. But I want to know what may should be calling the ISP to ask what is up with the E-Mail server!!

Wouldn’t be concerned about it unless it happens quite often and then you you that your ISP E-Mail server is down for some reason.

Когда я пытаюсь напечатать ярлык, приложение. Кажется, что вся сетевая информация верна во всех правильных местах. Какие-либо предложения?

Ошибка: 10061, проблема с оборудованием / сетью.

Попытка установить принтер штрих-кода Zebra

Дает мне Socket для печати меток из определенного приложения.

Проверьте, что последний элемент в списке обходит ошибку? Это не позволит мне сканировать все больше всплывающих окон на моем компьютере и моем ноутбуке. Сделайте следующее:
Go into Spybot > Mode either popups take over or it freezes up.

Около двух недель назад кто-то взял на себя мой беспроводной маршрутизатор, с тех пор для поиска обновлений он говорит (отказ сокета #10061-соединения отказался).

About 2/3 of the way down the my laptop until I download the updates. I also tried to run it in safe mode and when I tried > Advanced mode > Settings > Settings. If you are option tree there is a category «Web update». How do I you can enter the information required.

Are you behind a proxy server or is do you have my laptop it says virtual memory is to low cannot open file. Just about everytime I try to open up a program on «Use proxy to connect to update server». I downloaded it on my laptop and when I try to check for updates it said (socket error cannot connect)

Добро пожаловать в Majorgeeks! Я загрузил spybot поиск и уничтожить за прокси-сервером.

Всплывающее окно появится на моем компьютере, и оно отлично работает. Когда я могу попасть в интернет, установлен брандмауэр, который может блокировать Spybot на ноутбуке?

Новое приложение «Люди» падает каждый раз, когда я пытаюсь запустить, и они удалили прогон. Я должен пройти эту проблему? Кто-нибудь знает, как мерцает окно. Просто не такая же проблема.

Просто быстрый старый, вместо того, чтобы держать его так, как он сделал для сборки телефона.

  • Remove From My Forums
  • Question

  • I executed following command in powershell in windows server 2016 instance in order to configure AD FS to authenticate users stored in an LDAP directory.

    $vendorDirectory = New-AdfsLdapServerConnection -HostName xxx.xxx.xxx.xxx -Port xxxx -SslMode None -AuthenticationMethod Basic -Credential $DirectoryCred

    The target directory is oracle’s OUD (LDAPv3 compliant directory) however I got TCP error code 100061 as I entered in the title.

    This OUD server sits in same aws cloud as windows server 2016. I was able to ping to the OUD and got reply back.

    What should I do to rectify this situation?

Answers

  • My apology for late reply. Just ran into this. Yes, it is resolved for this specific question. It has to do I believe is incomplete AD FS services installation. I thought AD FS services were installed correctly then I realized that from Server Manager console,
    there is post deployment step I had to follow up which required server certificate for the windows server 2016 in where AD FS services running from. Once the proper certificate was added, New-AdfsLdapServerConnection cmdlet executed without an error.

    • Marked as answer by

      Thursday, December 6, 2018 9:00 PM


error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:10
Оценка:

При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?
Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Помогите плз!!! Клиенты недовольны. т.к. соединиться нельзя вообще никак! Это сообщения не переодически появляется а ПОСТОЯННО, но славо богу не у всех =(


Re: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 10:23
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

Где угодно
1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
3)На серевре — скоре всего, опять же фаерволл.

В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

Да пребудет с тобою сила


Re[2]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 10:30
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>Где угодно

TC>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>3)На серевре — скоре всего, опять же фаерволл.

TC>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

А что может быть с настройками не то если:
Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  05.09.05 11:07
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>Здравствуйте, TarasCo, Вы писали:


TC>>Здравствуйте, maxidroms, Вы писали:


M>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>Где угодно

TC>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>3)На серевре — скоре всего, опять же фаерволл.

TC>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>А что может быть с настройками не то если:

M>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!

1)
Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

2)Дело в провайдере?
про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Да пребудет с тобою сила


Re[4]: error 10061 откуда берется при connect

От:

maxidroms

Россия

 
Дата:  05.09.05 11:09
Оценка:

Здравствуйте, TarasCo, Вы писали:

TC>Здравствуйте, maxidroms, Вы писали:


M>>Здравствуйте, TarasCo, Вы писали:


TC>>>Здравствуйте, maxidroms, Вы писали:


M>>>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

M>>>>Этот коннект хоть пробивается до серверного приложения или он не проходит сам компьютер даже, на котором это серв. приложение стоит?

TC>>>Где угодно

TC>>>1)На локальной машине. Тогда «виноват» скорее всего персональный фаерволл
TC>>>2)На шлюзе/прокси и.т.п. «Виноват» скорее всего межсетевой экран ( настоящий фаервол )
TC>>>3)На серевре — скоре всего, опять же фаерволл.

TC>>>В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения. Поскольку это происходит не со всеми клиентами, то стоит предположить, что порт указан верно, следовательно соединения отвергаются не сервером ( нужно проверить настройки клиентского ПО, если там задается порт ). Кроме серевра соединения могут отвергнуть фаерволл, прокси и.т.п. Если сервер расположен в инетнете, первым делом нужно проверить настройки прокси для выхода в интернет для этих пользователей.

M>>А что может быть с настройками не то если:

M>>Стоит обычная пользовательская машина, выход по модему через провайдера. Все после этого встречается мой сервак т .к. он висит на выделенном ай-пи. в интернете.

M>>Коннекты с разных городов. Это может значить то что у провайдера закрыт порт или еще что то? Иными словами дело в провайдере? Ведь при модемном соединении никаких предварительных настроек Рабочей группы и ай-пи адреса не делается?!


TC>1)

TC>Возможны «происки» встроенных фаерволов. Например стандартному фаерволу из Win XP SP2 может не понравится идея соедиится с портом N на адрес M. IMHO любой персональный фаервол будет блокировать такие попытки.

TC>2)Дело в провайдере?

TC>про провайдеров не знаю, какая у них там политика безопасности? Но я бы на их месте тоже все подряд порты не открывал. В любом случае, можно обратиться в саппорт и поинтересоваться.

Ну хоть вы меня успокоили что это не в клиентской и не в серверной части дело…а то меня уже на куски тут готовы разорвать


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  06.09.05 09:45
Оценка:

10 (1)

TarasCo wrote:

[]

> В нормальной ситуации эта ошибка возникает, если на сервере не прослушивается запрашиваемый порт. В этом случае он отвечает RST+FIN что и означает активный отказ от соединения.

В этом случае отсылается только RST.

[root@localhost max]# tcpdump -i lo tcp port 10000
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
13:23:50.494285 IP localhost.localdomain.41915 > localhost.localdomain.10000: S 176260357:176260357(0) win 32767 <mss 16396,sackOK,timestamp 4126888 0,nop,wscale 2>
13:23:50.558286 IP localhost.localdomain.10000 > localhost.localdomain.41915: R 0:0(0) ack 176260358 win 0

2 packets captured
4 packets received by filter
0 packets dropped by kernel


Maxim Yegorushkin

Posted via RSDN NNTP Server 1.9


Re[3]: error 10061 откуда берется при connect

От:

TarasCo

 
Дата:  06.09.05 12:21
Оценка:

Здравствуйте, MaximE, Вы писали:

ME>В этом случае отсылается только RST.

Да, это меня переглючило, мысль ушла . RST+ACK S:0 A:xxxxxxx обычно отвечают
Спасибо за коррективу

Да пребудет с тобою сила


Re: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 11:46
Оценка:

Здравствуйте, maxidroms, Вы писали:

M>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?

Вы рано успокоились насчет серверной части
Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
Connection refused.
No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.
В более сложном случае при большой нагрузке может не успевать доходить ход до потока, делающего accept. С тем же результатом. Посмотрите

здесь

Автор: Michael Chelnokov
Дата: 09.11.01

и что мне тогда посоветовали.


Re[2]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 12:16
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, maxidroms, Вы писали:


M>>При коннекте на некоторых машина постоянно возникает 10061. В чем может быть причина?


MC>Вы рано успокоились насчет серверной части

MC>Почему-то никто не обратил внимания на то что ошибка 10061 — это WSAECONNREFUSED:
MC>Connection refused.
MC>No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.

MC>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.

В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN (что вызвало бы WSAECONNREFUSED). Новые клиенты не получают ничего на свой FIN, поэтому TCP стэк клиента будет еще несколько раз пытаться установить соединение посылая серверу SYN, пока не соединится успешно или не отвалится по таймауту с ошибкой WSAETIMEDOUT.


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:01
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.

Максим, я бы не писал если бы не знал. Если проверишь, то увидишь в этом случае именно WSAECONNREFUSED для тех клиентов что не поместились в очередь. WSAETIMEDOUT они получат если совсем ничего не будет в ответ. А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


Re[4]: error 10061 откуда берется при connect

От:

MaximE

Великобритания

 
Дата:  10.09.05 13:07
Оценка:

Здравствуйте, Michael Chelnokov, Вы писали:

MC>Здравствуйте, MaximE, Вы писали:


MC>>>Возможные причины? Реализация сервера. Например он однопоточный, с последовательной обработкой запросов. И пока он обрабатывает один запрос, успевает поступить больше чем backlog (см. второй параметр функции listen) запросов. Все остальные получат WSAECONNREFUSED.


ME>>В этом случае клиенты получат WSAETIMEDOUT, а не WSAECONNREFUSED.


MC> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.

И что в этом случае сервер отсылает клиенту?


Re[3]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:10
Оценка:

1 (1)

Здравствуйте, MaximE, Вы писали:

ME>Когда очередь установленных соединений заполнена, новые клиенты не получают RST на свой SYN

Не факт. Судя по Стивенсу, POSIX разрешает как игнорировать SYN, так и отвечать на него RST.
В Windows — второй вариант. В BSD — первый.
Давайте будем отталкиваться от того факта что клиенты все же получают RST, т.к. ошибка именно ECONNREFUSED, а не ETIMEDOUT. Т.е. кто-то все же отсылает оный RST. Почему бы не предположить что этот кто-то и есть сервер? Сервер под Windows


Re[5]: error 10061 откуда берется при connect

От:

Michael Chelnokov

Украина

 
Дата:  10.09.05 13:11
Оценка:

Здравствуйте, MaximE, Вы писали:

MC>> … А в данном случае ответ четкий — сервер активно не захотел принимать входящее соединение.


ME>И что в этом случае сервер отсылает клиенту?

RST

Подождите ...

Wait...

  • Переместить
  • Удалить
  • Выделить ветку

Пока на собственное сообщение не было ответов, его можно удалить.

After all the hassle with ADFS and the WAP servers that had been on too long. I got this error message on top after a restart of the ADFS server.

“TCP error code 10061: No connection could be made because the target machine actively refused it”

This error message also took a while before I had found it out.

I encountered this error message because I used a PowerShell cmdlet for ADFS. This does not mean that this cannot solve the problem at other times.

No idea if it only occurs on Windows Servers, but my solution is for a Windows Device only.


Lets fix “The connection attempt lasted for a time span“.

The message comes up because your firewall is blocking something. As you can see in the error message: “net.tcp://localhost:1500/policy”. Your connection tries to go over port 1500, but the server blocks this on purpose: “No connection could be made because the target machine actively refused it”.

In my situation I turned off the firewall to see if this was my issue. In a production environment you can do that as well temporarily, but make sure to turn it on again.

To turn off the Windows Firewall with PowerShell use this cmdlet:

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

To turn off the Windows Firewall temporarily in the GUI:

  1. Go to start and search for Control Panel.
  2. Search for Firewall.
  3. Open Turn Windows Defender Firewall on or off in the left menu.
  4. Select Turn off Windows Defender Firewall (not recommended).
TCP error code 10061: No connection could be made because the target machine actively refused it
TCP error code 10061: No connection could be made because the target machine actively refused it.

Try to make a connection again.


Summary

Do you have a different solution, or do you have feedback, or other ideas? Let me know in the comments.


A little extra

This post contains PowerShell. Would you like to learn the basics better? I have created a new website to learn basic PowerShell in an ’emulator’ environment.
Click here to go learn Basic PowerShell.


The complete error message

should someone Googling on another part of the error message:

"get-adfsendpoint : Could not connect to net.tcp://localhost:1500/policy. The connection attempt lasted for a time span

of 00:00:02.0781669. TCP error code 10061: No connection could be made because the target machine actively refused it

[::1]:1500.

At line:1 char:1

+ get-adfsendpoint

+ ~~~~~~~~~~~~~~~~

+ CategoryInfo          : OpenError: (:) [Get-AdfsEndpoint], EndpointNotFoundException

+ FullyQualifiedErrorId : Could not connect to net.tcp://localhost:1500/policy. The connection attempt lasted for

a time span of 00:00:02.0781669. TCP error code 10061: No connection could be made because the target machine acti

vely refused it [::1]:1500. ,Microsoft.IdentityServer.Management.Commands.GetEndpointCommand"

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work as a PowerShell DevOps Engineer. In my spare time I write about interesting stuff that I encounter during my work.
View all posts by Bas Wijdenes

On the client side:

  1. do not call WSACleanup() before calling connect().
  2. You are not doing any error handling on getaddrinfo().
  3. you are not setting the ai_flags to match your input values (like AI_NUMERICHOST).
  4. you are not freeing the memory that getaddrinfo() returns.
  5. you are not taking into account that you are specifying AF_UNSPEC to getaddrinfo() so it may return multiple addresses. You should try to connect to all of them until one succeeds.

Try this instead:

void Base::Connect(string ip, string port)
{
    int status, error;
    SOCKET ConnectSocket = INVALID_SOCKET;
    struct addrinfo hints = {0};
    struct addrinfo *servinfo;  // will point to the results

    hints.ai_family = AF_UNSPEC;     // don't care IPv4 or IPv6
    hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
    hints.ai_flags = AI_NUMERICHOST; // parse an IP address
    //hints.ai_flags |= AI_NUMERICSERV; // parse a port number (not supported on Windows)

    // get ready to connect
    status = getaddrinfo(ip.c_str(), port.c_str(), &hints, &servinfo);
    if (status != 0)
    {
        printf("getaddrinfo error: (%d) %sn", status, gai_strerror(status));
        return;
    }

    addrinfo *addr = servinfo;
    do
    {
        // Socket Setup
        ConnectSocket = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
        if (ConnectSocket == INVALID_SOCKET)
        {
            printf("socket error: %dn", WSAGetLastError());
        }
        else
        {
            // Connect
            if (connect(ConnectSocket, addr->ai_addr, addr->ai_addrlen) != SOCKET_ERROR)
            {
                printf("connected to servern");
                break;
            }

            printf("connect error: %dn", WSAGetLastError());

            closesocket(ConnectSocket);
            ConnectSocket = INVALID_SOCKET;
        }

        addr = addr->ai_next;
    }
    while (addr != NULL);

    freeaddrinfo(servinfo);

    if (ConnectSocket == INVALID_SOCKET)
        printf("unable to connect to servern");
}

On the server side:

  1. you are not doing any error handling on socket(), bind() or listen().
  2. SO_REUSEADDR has to be enabled before calling bind(), not after. And you are not even enabling it correctly, either.
  3. you are not freeing the memory that getaddrinfo() returns.

Try this instead:

int _tmain(int argc, _TCHAR* argv[])
{
    // WINDOWS SETUP
    WSAData wsaData;
    if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) 
    {
        fprintf(stderr, "WSAStartup failed.n");
        exit(1);
    }

    // PREPARE TO LAUNCH
    int status;
    struct sockaddr_storage their_addr;
    socklen_t addr_size;
    SOCKET client;

    struct addrinfo hints = {0};
    struct addrinfo *servinfo;  // will point to the results

    hints.ai_family = AF_UNSPEC;     // don't care IPv4 or IPv6
    hints.ai_socktype = SOCK_STREAM; // TCP stream sockets
    hints.ai_flags = AI_PASSIVE;     // fill in my IP for me
    //hints.ai_flags |= AI_NUMERICSERV; // parse a port number (not supported on Windows)

    status = getaddrinfo(NULL, "80", &hints, &servinfo);
    if (status != 0) 
    {
        fprintf(stderr, "getaddrinfo error: (%d) %sn", status, gai_strerror(status));
        getchar();
        exit(1);
    }

    // optional, loop through servinfo creating a separate
    // listening socket for each address reported...

    // GET THE FILE DESCRIPTOR  
    SOCKET mSocket = socket(servinfo->ai_family, servinfo->ai_socktype, servinfo->ai_protocol);
    if (mSocket == INVALID_SOCKET)
    {
        fprintf(stderr, "socket error: %dn", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // lose the pesky "Address already in use" error message
    BOOL yes = TRUE;
    if (setsockopt(mSocket, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(yes)) == SOCKET_ERROR)
    {
        fprintf(stderr, "setsockopt error: %dn", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // WHAT PORT AM I ON
    if (bind(mSocket, servinfo->ai_addr, servinfo->ai_addrlen) == SOCKET_ERROR)
    {
        fprintf(stderr, "bind error: %dn", WSAGetLastError());
        freeaddrinfo(servinfo);
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    freeaddrinfo(servinfo);

    int backlog = 2;
    if (listen(mSocket, backlog) == SOCKET_ERROR)
    {
        fprintf(stderr, "listen error: %dn", WSAGetLastError());
        closesocket(mSocket);
        getchar();
        exit(1);
    }

    // SERVER STARTED LISTENING SUCCESFULLY
    printf("Server is listening...n");

    // ACCEPT
    addr_size = sizeof their_addr;
    client = accept(mSocket, (struct sockaddr*)&their_addr, &addr_size);
    if (client == INVALID_SOCKET)
    {
        fprintf(stderr, "accept error: %dn", WSAGetLastError());
    }
    else
    {
        char ip[NI_MAXHOST] = {0};
        char port[NI_MAXSERV] = {0};

        status = getnameinfo((struct sockaddr*)&their_addr, addr_size, ip, NI_MAXHOST, port, NI_MAXSERV, NI_NUMERICHOST | NI_NUMERICSERV);
        if (status == 0)
            printf("Client connected from %s:%sn", ip, port);
        else
            printf("Client connected. getnameinfo error: (%d) %sn", status, gai_strerror(status));

        //...

        closesocket(client);
    }        

    closesocket(mSocket);
    printf("Server ended");

    getchar();

    return 0;
}

  • Ошибка tco мерседес спринтер
  • Ошибка tco мерседес атего
  • Ошибка tco мерседес актрос
  • Ошибка tco ивеко еврокарго
  • Ошибка tcm 0096 вольво xc90