[BUG]Error spawning child process: Systemressourcen zur Beendigung der Anforderung stehen nicht zur Verfügung. Server SC not stopped.
We use Service Commander on different machines and it works great so far. On one of our customers machines we now have this issue when making an ENDSBS *ALL the system stops everything as expected but when you want to make a GO SAVE Option 21 it brings the above mentioned error message and doesn't do the save.
We already had that last week. Last week I started QCTL again, went to Shell, made a sc check all the processes we configured and found out that one of the processes still running. I stopped it, made the ENDSBS *ALL again and it worked.
Today we had the same problem, did the same but it didn’t work.
It looks like that is happening after we installed the part that includes Service Commander into STRTCPSVR.
On another system at this customer which is a copy of this we don’t have these problems.
Any ideas are welcome
Hi @mlitters
The STRTCPSVR integration of Service Commander makes IBM i call SC when running the command ENDTCPSVR SERVER(*ALL).
Running Service Commander requires the job to be in a subsystem allowing new threads to be started (since SC is a PASE and Java program).
Do you end all subsystems before GO SAVE 21? This is not required (since it's part of the operation done by GO SAVE 21) and can cause ENDTCPSVR to fail when running SC.
We also have SC integrated in STRTCPSVR and use GO SAVE 21 regularly, and we have not seen this issue.
Hi @chrjorgensen many thanks for your comment und feedback. As mentioned above we also have no issues on other systems which are configured the same way with the same (PASE) processes. We will change the way of doing it and don't endsbs *ALL for testing. But in real life the customer need to make an ENDSBS *ALL before GO SAVE -> 21 because he also need to do something else. The SC is running in QUSRWRK right now (on three machines at this customer) and running multiple Node.js and Python Jobs. What confused us also was the fact that last week we had the same problem and after restarting QCTL, I could stop the Node.js SC process that causes the problem manually and after that with ENDSBS *ALL everything was fine. This weekend the same way didn't work. QUSRWRK was down. No Jobs running but still the child process running "somewhere". As mentioned - that happens after the STRTCPSVR AddOn was installed. We now uninstalled that and installed it again - everything was fine and we will test it on Saturday.
Many thanks for your support to this. We are really excited to see what happens and how this continues.
Hi @mlitters
Be aware that Service Commander behaves differently than other TCP services - it requires new threads to operate (because of Java). The STRTCPSVR integration is simply a native C program called by STRTCPSVR and ENDTCPSVR because of the server registry, i.e. the *SC entry in the QUSRSYS/QATOCSTART table. The C program starts a PASE job calling bash and sc.
If the subsystem is being ended, it will not allow new threads and ENDTCPSVR for Service Commander will fail. Ending the native TCP services does not require new threads and run in the current thread (job) and does not fail even if the subsystem is ending.
I just checked the QMNSRBND program running the GO SAVE 21 and other GO SAVE menu entries (you can retrieve the source for the program). And it will first end all TCP/IP services (i.e. call ENDTCPSVR for Service Commander) if ending TCP/IP is selected and then end all subsystems immediately.
So if you want to do ENDSBS *ALL before GO SAVE 21, then you will have to end the TCP services first - or at least end the services controlled by Service Commander. If your ENDSBS is complete, then you can only end the native TCP/IP services, but not Service Commander services.
I will suggest either
- ending the Service Commander controlled services before running
ENDSBS *ALL, or - end all TCP/IP services manually, i.e.
ENDTCPSVR *ALL, and then ignore the error for Service Commander before GO SAVE 21.
Btw, I'm curious what you mean by
still the child process running "somewhere".
When all subsystems have ended, no user jobs or processes can run at all - so what job did you see?
If a job will not end and can't be ended by the system, the subsystem containing the job will also not end - and you will see the subsystem and job in WRKACTJOB. You may be able to end both by ENDSYS *IMMED in that situation. But following my suggestions above should avoid ending in that situation.
HTH.
Best regards, Christian
Many thanks @chrjorgensen ,
what I mean with the
still the child process running "somewhere".
is, that after ENDSBS *ALL all the Subsystems and jobs within are gone but the error still appears that "Error spawning child process". To me it sounds there is something still running "somewhere". When I understand your explanation correctly that comes from the ENDTCPSRV?!? When I make a ENDTCPSRV before the ENDSBS that brings no error. That sounds very weird to me and the next thing that confuses is, that it works on other machines with the same configuration.... We will see on Saturday ;-)
@mlitters It's probably due to some running or order of operations, that one machine fails where other succeeds.
Yes, the spawning error comes from the ENDTCPSVR, when it tries to end SC - this requires new threads not allowed when the subsystem is ending.
Let us know how it goes on Saturday. 👍