KB‎ > ‎

Publication logs become locked and cannot be updated or deleted

Ref: 2633343 (201006031622)
Last Edited: August 15th, 2011
 When a publication takes place, log files (such as progresslog.txt) are generated. However, these log files cannot be amended or deleted; when trying to delete, a warning giving the message "Error Deleting File or Folder. It is being used by another person or program" will be displayed. On subsequent publishes, these log files are not updated and so the same log files are emailed to the user.
There may be a record in the Application Event log, such as this:
Event Type: Warning
Event Source: PublicationWrapper
Event Category: None
Event ID: 0
Date:  17/01/2011
Time:  13:47:09
User:  N/A
Computer: JBVPCWS2K3TR
System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: 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
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
   at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
   at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
   at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
   at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
   at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
   at System.Net.Mail.SmtpClient.GetConnection()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- End of inner exception stack trace ---
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at PublicationWrapper.clsMain.SendConfirmationEmail(String strEmailAddress, String strProgressLog, String strUserActionsRequiredLog, String strMenuProgressLog, String strMenuUserActionsRequiredLog)
   at PublicationWrapper.clsMain.ProcessTask(FileInfo objTask, String strQueueFolder)
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
 The cause is usually a failure when trying to send a publication notification e-mail.
 The error described above can be reproduced by configuring the use of a mail server that doesn't exist.
 This issue is improved in Publication Server 10.1.11. However, if the problem still occurs, then either:
  • Restart the PubWrapper service, which will release the lock and allow the log files to be updated. This will need to be done prior to each publication.
  • Schedule a CMD script that restarts the service to run just before the scheduled publications.
    REM Restarts the Publication Service, but only if there isn't a publication running, i.e. the Queue folder is empty.
  • set QueueRoot=C:\Program Files\Triaster\PublicationServer\PublicationWrapper
    set PublicationService=PN Publication Wrapper
    if not exist "%QueueRoot%\Queue\*.pntask" (
     net stop "%PublicationService%"
     net start "%PublicationService%"
    This script checks that the Queue folder is empty of PNTASK files (which should signify that there are no publications running) before restarting the publication service.
  • Deactivate the sending of publication notification e-mails.
    (How to Enable or Disable Publication Notification E-mails)
Applies to:
  • Publication Server 10.1.0, 10.1.11 

Fixed in:
  • Process Navigator 11.2