Issue Number | 5158 |
---|---|
Summary | [Publishing] Error Message in export-docs.log |
Created | 2022-10-10 16:40:35 |
Issue Type | Inquiry |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2022-10-18 18:59:01 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.329473 |
I'm seeing an error message in the export-docs.log file indicating an error when trying to create an already existing directory. The message is
2022-10-06 18:02:05.371 [ERROR] Failure creating d:/cdr/Output/Job20801.InProcess/GlossaryTerm Traceback (most recent call last): File "D:\cdr\Publishing\export-docs.py", line 198, in write_doc os.makedirs(directory) File "D:\Python\lib\os.py", line 225, in makedirs mkdir(name, mode) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'd:/cdr/Output/Job20801.InProcess/GlossaryTerm'
I've seen this message on
09/22
09/23
09/26
10/06
10/07
It's possible these messages are related to NIH network issues but it's probably a good idea to identify what's causing these messages.
I haven't been noticing any failures of the publishing jobs but, again, it's worth it to take a closer look.
We had another occurrence of this error today at 15:24:04 h while running a hot-fix export. Looking at the code, we're checking if a directory exists and when it does not exist the directory gets created in the following step. When the process is trying to create the directory it then fails because now the directory does exist which is an error. This error, however, doesn't cause the program to exit.
It's likely that one thread is in the process of creating the directory while another is testing the directory's existence. I've modified the code to not throw an exception if the directory already exists.
export-docs.py
https://github.com/NCIOCPL/cdr-publishing/commit/9ec54cc
This one is difficult to test since the error messages are only seen when looking at the log of a publishing job after it finished (successfully). We would need to look at the regular publishing job but we're not running regular publishing jobs on the QA server. We did, however, run a few publishing jobs here and there on QA without issues. Therefore, we can tell the minor code change has not introduced any additional problems. We will have to wait until the code is on PROD and we can review the logs of the publishing jobs.
I'm marking this as QC verified for now.
This error shows roughly about once a week. We will monitor the logs for the publishing jobs for a couple of weeks and then close the ticket.
The current log file shows the error on the following publishing days:
03/20
03/24
03/29
03/31
04/03
04/07
04/14
04/21
04/28
05/05
05/08
05/12
All of these errors were logged before Pauling landed (05/23). I will monitor the logs for another week or two and declare the issue to be fixed at that time assuming we are error-free. It's looking good so far.
We're now going for over a month without an error in the log file.
Closing ticket.
Elapsed: 0:00:00.001469