CDR Tickets

Issue Number 4343
Summary Update RunPrintJob.cmd on Bonnies Computer
Created 2017-12-04 16:17:15
Issue Type Improvement
Submitted By Englisch, Volker (NIH/NCI) [C]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2018-07-18 16:48:54
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.217813
Description

While testing the mailers on Bonnie's computer I noticed that the script
RunPrintJob.cmd
has been setup to be run with a host parameter in order to connect to either DEV, QA, or STAGE instead of PROD.
However, this option did not work and produced an error.

We want to ensure Bonnie is able to test printing mailers from non-PROD servers.

Comment entered 2018-05-30 11:50:50 by Englisch, Volker (NIH/NCI) [C]

This is the problem I'm seeing on Bonnie's computer: When downloading the printjob from a non-PROD server the download works successfully but uncompressing the print file with the tar command fails:

...
C:\CDR\Mailers>if errorlevel 1 goto done

C:\CDR\Mailers>.\tar xvjf PrintFilesForJob16576.tar.bz2
C:\CDR\Mailers\tar.exe: *** 1. unable to allocate heap 0xBEA0000, heap_chunk_size 268435456, pid 12428, Win32 error 0
      0 [main] tar 17404 sync_with_child: child 12428(0x28C) died before initialization with status code 0x1
    781 [main] tar 17404 sync_with_child: *** child state waiting for longjmp
./tar: child process: Cannot fork: Resource temporarily unavailable
./tar: Error is not recoverable: exiting now

C:\CDR\Mailers>if errorlevel 1 goto done

C:\CDR\Mailers>pause
Press any key to continue . . .
Comment entered 2018-05-30 11:58:09 by Englisch, Volker (NIH/NCI) [C]

Obviously, the tar command that's part of the following print command is failing when a hostname is specified:

C:\CDR\Mailers> RunPrintJob.cmd 99999 cdr-dev.cancer.gov

while the command runs successfully (against PROD) when no hostname is specified:

C:\CDR\Mailers> RunPrintJob.cmd 99999

I tested to run the tar command by itself from the command prompt without problems:

C:\CDR\Mailers> tar xvjf PrintFilesForJob99999.tar.bz2
Comment entered 2018-05-30 12:05:46 by Englisch, Volker (NIH/NCI) [C]

I was able to work around the problem when I separate the compression (performed by bzip2) and extraction (performed by tar) jobs and modify the following command

C:\CDR\Mailers> tar xvjf PrintFilesForJob99999.tar.bz2

to these two

C:\CDR\Mailers> bzip2 -d PrintFilesForJob99999.tar.bz2
C:\CDR\Mailers> tar xvf PrintFilesForJob99999.tar

I don't understand why this change would make a difference or why in the first place the tar command would fail when a host is specified.

Do you have any idea, ?

Comment entered 2018-05-30 12:06:12 by Kline, Bob (NIH/NCI) [C]

Where would I find RunPrintJob.cmd on GitHub?

Comment entered 2018-05-30 12:08:24 by Englisch, Volker (NIH/NCI) [C]

I was hoping you could tell me. :-)

Is it possible it's not allowed on github because we specify printer names?

Comment entered 2018-05-30 12:10:48 by Kline, Bob (NIH/NCI) [C]

OK, where would I find it on the L: drive?

Comment entered 2018-05-30 12:16:23 by Englisch, Volker (NIH/NCI) [C]

I have a copy of her file here:

L:\OCPL\_Cross\CDR\temp\Volker

RunPrintJob.cmd is the original, RunPrintJobNew.cmd is the modified version.

Comment entered 2018-05-30 12:41:13 by Kline, Bob (NIH/NCI) [C]

Please put the files from C:\cdr\Mailers on Bonnie's machine in a subdirectory of L:\OCPL_Cross\CDR\temp\Volker (just the files, don't recurse into subdirectories).

Comment entered 2018-05-30 12:47:52 by Englisch, Volker (NIH/NCI) [C]

OK, I've created a subdirectory ForBob.

Comment entered 2018-05-30 12:51:47 by Kline, Bob (NIH/NCI) [C]

Hmm, the cygwin DLL (cygwin1.dll is the name, I think) isn't in that set. Is it somewhere else in the $PATH on her system? Please find it and add it to the ForBob set.

Comment entered 2018-05-30 12:54:19 by Kline, Bob (NIH/NCI) [C]

Also, where is PrintJob?

Comment entered 2018-05-30 12:58:11 by Englisch, Volker (NIH/NCI) [C]

I looked for her Cygwin directory but couldn't find it when I worked on her machine. I thought she might not use the cygwin tools.
When I tried to setup the script on my machine I did get and error regarding can't find cygwin1.dll but I had essentially the same problem - I wasn't able to run tar -j

I'll search for the DLL when Bonnie's back at her desk.

Comment entered 2018-05-30 12:59:44 by Englisch, Volker (NIH/NCI) [C]

PrintJob is part of the extracted *.tar.bz2 file.

Comment entered 2018-05-30 13:42:16 by Englisch, Volker (NIH/NCI) [C]

There were two DLLs in her directory:

  • cygwin1.dll

  • msvcr70.dll

I've copied both of those to your directory.

Comment entered 2018-05-30 15:29:58 by Kline, Bob (NIH/NCI) [C]

I am unable to reproduce the problem on my workstation. I even tried a second time, replacing "tar" with ".\tar" to make certain that I was running the same binary she's running, though it would seem I would have to have been anyway, since I got the error message complaining about the missing cygwin1.dll before I copied the DLLs you gave me into c:\cdr\Mailers. Her tar uncompresses and unpacks in one command on my machine.

You'll want to look at
nci6116g\3050ric907$ and get the two sets of output I sent there. :-)

Comment entered 2018-05-30 15:38:29 by Englisch, Volker (NIH/NCI) [C]

You'll want to look at
nci6116g\3050ric907$ and get the two sets of output I sent there.

Which printer is that? Where is it located?

I'd say we add a comment to the file on her machine and leave the workaround in place until she gets a new computer or the approach fails again.

Comment entered 2018-05-30 15:45:04 by Kline, Bob (NIH/NCI) [C]

I think that printer is located in the room next to the small kitchen.

One additional experiment you might try is to take the original script and modify it by replacing the default host in the script (cdr.cancer.gov) with a new default (cdr-dev.cancer.gov) and leave out the second command-line argument.

Comment entered 2018-07-18 16:33:25 by Englisch, Volker (NIH/NCI) [C]

I did what you suggested and received the following error message:

C:\CDR\mailers>tar xvjf PrintFilesForJob16611.tar.bz2
C:\CDR\mailers\tar.exe: *** 1. unable to allocate heap 0xFE70000, heap_chunk_size 268435456, pid 16344, Win32 error 0
      1 [main] tar 18660 sync_with_child: child 16344(0x314) died before initialization with status code 0x1
    479 [main] tar 18660 sync_with_child: *** child state waiting for longjmp
tar: child process: Cannot fork: Resource temporarily unavailable
tar: Error is not recoverable: exiting now

Using the work-around of splitting the tar command works in both cases, passing the host on the command line and setting the DEV host as the default.

Comment entered 2018-08-09 13:18:09 by Englisch, Volker (NIH/NCI) [C]

We had decided in last week's status meeting to close this ticket because we do have a work-around and we don't want to invest a lot more time in trying to figure out why our original approach isn't working anymore.
Closing ticket.

Elapsed: 0:00:00.001324