While updating service references in the Web app in VS, error: An unexpected error occured on a send. An error occured while making the HTTP request - wcf

There was an error downloading 'XYZmetadata'.The underlying connection was closed: An unexpected error occurred on a send.Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.An existing connection was forcibly closed by the remote host. Metadata contains a reference that cannot be resolved: 'XYZ'.
An error occurred while making the HTTP request to XYZ. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host If the service is defined in the current solution, try building the solution and adding the service reference again.
My VS code is written on one server, while the site runs on the IIS in a different server. Site is opening fine in the IIS server. But when the same link from IIS server is used as endpoint address in the web.config file of WebApp in different server, it gives above error while updating the service references. We are upgrading Visual studio from 2013 to 2019. Below is the log error for WCF service seen, when the code is run in the Visual studio(Local host)
<failedRequest url="http://localhost:4495/"
siteId="2"
appPoolId="Clr4IntegratedAppPool"
processId="10820"
verb="GET"
remoteUserName=""
userName=""
tokenUserName="NA\kur111545"
authenticationType="anonymous"
activityId="{00000000-0000-0000-2900-0080010000FE}"
failureReason="STATUS_CODE"
statusCode="401"
triggerStatusCode="401"
timeTaken="109"
xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
Below is the log error for WebApplication, when the code is run in the Visual studio(Local host):
<failedRequest url="http://localhost:4516/"
siteId="3"
appPoolId="Clr4IntegratedAppPool"
processId="11500"
verb="GET"
authenticationType="NOT_AVAILABLE" activityId="{00000000-0000-0000-0600-0080010000FF}"
failureReason="STATUS_CODE"
statusCode="303"
triggerStatusCode="303"
timeTaken="62"
xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
We are using Windows Authentication but, in the log files it shows anonymous authentication, even after disabling the Anonymous authentication in the IIS server. Ports 443 and 80 are enabled. And windows firewall is OFF in the server where the sites are hosted.
Below is the log data in the IIS server where the sites are running in a Remote server.
Log files for web Application in the IIS server:
//Software: Microsoft Internet Information Services 10.0
//Version: 1.0
//Date: 2022-08-23 01:09:01
//Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2022-08-23 01:09:01 10.8.138.25 OPTIONS * - 80 - 10.8.148.33 - - 404 6 0 339
Log files for WCF service in the IIS server:
//Software: Microsoft Internet Information Services 10.0
//Version: 1.0
//Date: 2022-08-23 01:09:01
//Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2022-08-23 01:09:01 10.8.138.25 OPTIONS * - 80 - 10.8.148.33 - - 404 6 0 339

Related

CloudHub worker trying to connect to SFTP site which allows whitelisted IPs only

I have a Mule 4 application [App1] created on CloudHub. I tried to deploy the application's jar file onto CloudHub. This application has a Static IP [eg. 100.101.102.103] assigned to it in Runtime Manager. This IP address is whitelisted by customer to allow communication with their SFTP sites and APIs. My Mule application has APIs and some SFTP flows. When I try to deploy my mule application [App1], the deployment fails with below error:
Connectivity test failed for config 'SFTP_Config'. Application deployment will continue. Error was: Could not establish SFTP connection with host: 'sftp.hostname' at port: '22' - Error during login to 'sftpuser#sftp.hostname'.
The SFTP Config is:
<sftp:config name="SFTP_Config" doc:name="SFTP Config" doc:id="5d626288-5181-41d5-807d-2786ea4292d8" >
<sftp:connection host="${sftp.host}" port="${sftp.port}" username="${secure::sftp.username}" password="${secure::sftp.password}" connectionTimeoutUnit="MINUTES" connectionTimeout="2" responseTimeoutUnit="MINUTES" responseTimeout="2" workingDir="${sftp.peoplePosition.directory}">
<reconnection failsDeployment="false" >
<reconnect frequency="${sftp.retryInterval}" count="${sftp.retryAttempts}" />
</reconnection>
</sftp:connection>
</sftp:config>
I also tried using failsDeployment="false" in the SFTP configuration as recommended in this KB article
but it didn't work either.
The log shows:
[2023-02-16 05:59:00.754] ERROR
org.mule.extension.sftp.internal.connection.SftpConnectionProvider
[qtp1351434790-36]: Auth fail
com.jcraft.jsch.JSchException: Auth fail
[2023-02-16 05:59:00.824] WARN
org.mule.runtime.core.internal.connection.
PoolingConnectionManagementStrategy
[qtp1351434790-36]: Failed to create a connection while
applying the pool initialization policy.
org.mule.runtime.api.connection.ConnectionException:
Could not establish SFTP connection with host: 'sftphost' at port: '22'
- Error during login to sftpuser#sftphost
at
org.mule.runtime.core.internal.connection.ErrorTypeHandler
ConnectionProviderWrapper.lambda$connect$0(ErrorTypeHandler
ConnectionProviderWrapper.java:70)
at java.util.Optional.map(Optional.java:215)
I have verified the SFTP credentials, they are working fine with Winscp.
Is there any way a CloudHub worker can complete the deployment successfully or validate the SFTP configuration using Static IP instead of it's own IP address?

Azure Devops Self-Hosted Agent fail connecting behind corporation network - SSL Error / An existing connection was forcibly closed by the remote host

Got this problem with me for 2 weeks so far and still not figure it out yet, been trying to test on multiple computer and here is the symptom.
When setup Agent on any Computer that is using Corporation Network got SSL exception:
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception
---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
....
Attempt 1 of GET request to https://dev.azure.com/{org}/_apis/connectionData?connectOptions=1&lastChangeId=366981152&lastChangeId64=366981152 failed (Socket Error: ConnectionReset)
Below is what i had tried:
1). Pass the GET request directly to Browser / Postman > working fine and receive the connectionData from Azure Devops:
*Note: no proxy and no web filter applied to the site
https://dev.azure.com/{org}/_apis/connectionData?connectOptions=1&lastChangeId=366981152&lastChangeId64=366981152
2). Telnet from cmd > working fine as well
> Telnet test.dev.azure.com 443
3). Follow the instruction here https://stackoverflow.com/a/71667810/9391928 and run Debugging Script and Mitigation Script (Modify Registry) to Enforce TLS1.2 and so far all check is green but still Unknown ISSUE FOUND:
Probing: status.dev.azure.com
ISSUE FOUND: This may be TLS compatibility issue!
Probe failed when TLS-negotiating to 13.107.6.183:443. Error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
***
TLS 1.2 client usage enabled.
***
Cipher Suite check passed: at least one of the TLS 1.2 cipher suites supported by Azure DevOps is enabled.
***
Key Exchange check passed.
***
Elliptic curve check passed: at least one elliptic curve supported by Azure DevOps is enabled
***
.NET Framework release is 4.7+ (release 528372)
TLS 1.2 enforced for applications targetting .NET Framework 4.0/4.5.x
TLS 1.2 enforced for applications targetting .NET Framework 4.0/4.5.x (32bit app on 64bit OS)
TLS 1.2 enforced for applications targetting .NET Framework 3.5
TLS 1.2 enforced for applications targetting .NET Framework 3.5 (32bit app on 64bit OS)
All mitigations required to ensure TLS 1.2-compatibility of legacy .NET applications are in place.
4). Prepare a Laptop and test register/run agent with vs without corporation network, fail whenever connect to corporation network (using non-corporation network work fine)
5). Running Client SSL check from postman / browser for both case with vs without corporation network and got return the same TLS1.3 with all similar cipher suites supported (included "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" & "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" which is used by Azure Devops)
request : https://www.howsmyssl.com/a/check
response: "given_cipher_suites": [
"TLS_AES_128_GCM_SHA256",
"TLS_AES_256_GCM_SHA384",
"TLS_CHACHA20_POLY1305_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_3DES_EDE_CBC_SHA"
],
"ephemeral_keys_supported": true,
"session_ticket_supported": true,
"tls_compression_supported": false,
"unknown_cipher_suite_supported": false,
"beast_vuln": false,
"able_to_detect_n_minus_one_splitting": false,
"insecure_cipher_suites": {},
"tls_version": "TLS 1.3",
"rating": "Probably Okay"
6). Change the Probing Script to probe www.google.com and fail as well (of-courses success in normal network ^_V)
7). Double check DNS resolver to IP Address > resolver work fine, azure devops ip address is and same between both networks.
8). Write a .net console app to run a test (similar to the Probing Script) and always got Exception "An existing connection was forcibly closed by the remote host" when in Corporation Network. When out of Corporation Network the run is fine and Stream return NegotiatedCipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 for test.dev.azure.com (and TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 for www.google.com)
client.Connect(connectHost, 443); // Success
...
var askedProtocols = System.Security.Authentication.SslProtocols.Tls12;
stream.AuthenticateAsClient(connectHost, null, askedProtocols, false); // Always throw exception "An existing connection was forcibly closed by the remote host."
return new(connectHost, true, remoteEndpoint, null);
...
Any suggestion will be much appreciate guys !

Dcm4chee Connection to ldap://ldap:389 broken - reconnect error

I'm using dcm4chee docker stack with ldap and postgreSQL and have a floating error:
ldap:389; socket closed; remaining name 'cn=Devices,cn=DICOM Configuration,dc=mdw,dc=io'
2018-07-13 06:30:42,089 INFO [org.dcm4che3.conf.ldap.ReconnectDirContext] (Thread-0 (ActiveMQ-client-global-threads)) Connection to ldap://ldap:389 broken - reconnect
All three services are running on the same host. What can I do to avoid that error?
Disable the firewall. If firewall was enabled add an exception for all 3 services.

Use network charge to import files PST in Office 365 - unable to read data from the transport connection

I am using a network charge to import files PST in Office 365 follow this link:
https://support.office.com/es-es/article/Usar-la-carga-en-la-red-para-importar-archivos-PST-en-Office-365-103f940c-0468-4e1a-b527-cc8ad13a5ea6?ui=es-ES&rs=es-ES&ad=ES
The transfer start, but in the end display (for the detail in every mailbox) the next:
"The transfer failed: Unable to connect to the remote server"
"The transfer failed: Unable to write data to the transport
connection: An existing connection was forcibly closed by the remote
host"
I have a user administrator and a file shared with all Access: to read and write, i don`t know if i need something special permission or disable something service?
Please your help!
Best Regards,
Verónica Muentes
"The transfer failed: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host"
The error is often caused by following 2 reasons.
Azure storage request either using http or https. That means it send requests through ports 80 or 443. So you need to make sure these ports are open to the internet.
Please double check whether you used a proxy on your machine. If yes, you need to disable the proxy or create a configuration file named 'AzCopy.exe.config' to the following location 'C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\'.
In this file you will need to add the following XML:
<configuration>
<system.net>
<defaultProxy>
<!--PROXY_ADDRESS: Is the proxy address used to connect to the internet, e.g. myproxy.company.com
PORT_NUMBER: Is the port number used to connect to the proxy, e.g. 8080-->
<proxy proxyaddress="http://PROXY_ADDRESS:PORT_NUMBER" bypassonlocal="true" />
</defaultProxy>
</system.net>
</configuration>

Alfresco & Solr SSL Cert handshake timeout

Server configuration:
Alfresco Community 4.0.e on Windows 2003 server
MySQL 5.5.27.3
MySQL Connector 5.1.22
I used the Windows installer to install Alfresco. The only deviation from the stock answers to the Advanced installation was to change the database driver settings:
db.driver=org.gjt.mm.mysql.Driver
db.name=alfresco
db.url=jdbc:mysql://localhost/alfresco?useUnicode=yes&characterEncoding=UTF-8
Solr settings in config, as set by the installer:
dir.root=C:/Alfresco/alf_data
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
Error message from catalina.log file:
WARNING: Exception getting SSL attributes
java.net.SocketException: SSL Cert handshake timeout
at org.apache.tomcat.util.net.jsse.JSSESupport.handShake(JSSESupport.java:189)
at org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:143)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1116)
at org.apache.coyote.Request.action(Request.java:350)
at org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:135)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:722)
How do I fix this? Suggestions? I haven't changed any of the stock configuration other than the MySQL install. The Alfresco tables were created without problems when Tomcat was started and I browsed to the Admin page at localhost:8080/Alfresco.
BTW, both Solr and Alfresco are hosted in the same Tomcat6 instance.
I tried to regen the keys as suggested by this post, but it didn't help.
Still get the same error. This must have something to do with the Server2003 configuration.
Just needed to use the version of java included with the 4.0.e windows installer. Using any other version that I had installed on the machine prevented it from working ( 6 and 7 ).