Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

NPrinting fails to send email with "ERROR: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed..."

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andre_Sostizzo
Digital Support
Digital Support

NPrinting fails to send email with "ERROR: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed..."

Last Update:

May 26, 2021 8:31:36 AM

Updated By:

Sonja_Bauernfeind

Created date:

Aug 23, 2018 2:44:50 PM

Configuring the email server in NPrinting and using the test email functionality fails with:

Email not sent. Check your email configuration

The Web Engine logs record:

Failed to send e-mail message to alias@domain.com. ERROR: System.Net.Sockets.SocketException (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <IP>:<SMTP tcp Port>??   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)??   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)??   at System.Net.Sockets.Socket.Connect(IPAddress address, Int32 port)??   at MailKit.Net.Smtp.SmtpClient.Connect(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)??   at Qlik.NPrinting.Repo.Service.MailService.<SendEmailAsync>d__4.MoveNext() in c:\Jws\release-18.9.x\server\NPrinting\src\Repo\Service\MailService.cs:line 63   
Qlik.NPrinting.Repo 18.9.5.0 Qlik.NPrinting.Repo.Service.MailService 20180820T105530.253-07:00 ERROR NPrinting NPrinting.domain.com 0 0 0 0 0 0 0 0


Or, while publishing a successfully generated report the following may also be registered in the Scheduler logs for specific user(s):

Qlik.NPrinting.Repo    19.0.4.0    Qlik.NPrinting.Repo.Service.MailService    20190722T161607.112-04:00    ERROR    SERVERNAME    Nprinting Task Identity    0    0    0    0    0    0    0    0    Failed to send e-mail message to user.name@domain.com. ERROR: 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: An existing connection was forcibly closed by the remote host??
...
Inner exception: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host??   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size). Inner stack trace:    at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size).       

 

Environment:

 

  • The SMTP server has disconnected/rejected relay from NPrinting or failed to send proper response code.
  • The SMTP server has not been configured to accept emails from the NPrinting server or the source user utilized by NPrinting. 
  • Also may be due to an incorrect NPrinting Email setting or another reason only identifiable on the SMTP server trace logs.

 

Resolution:


In cases as the one above, since the SMTP server has provided no further information before disconnecting or halting communication the Email settings should be checked against the SMTP server requirements. If issue continues more information should be requested from the SMTP server administration in order to determine the reason for not accepting the request from NPrinting.

To confirm email can be sent from the NPrinting server see How to set up Nprinting 17 to send emails using a gmail account or server

Labels (1)
Contributors
Version history
Last update:
‎2021-05-26 08:31 AM
Updated by: