ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

can't spawn child process - why not?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • can't spawn child process - why not?

    this isn't a personal post - i have 3 kids with a 4th on the way. no trouble there!

    I have a type of TCP/IP server that can't spawn a child process to handle a connection request. The crazy thing is that it previously worked fine.... then i created a separate subsystem for it to run in.... and now when i go back to running in QBATCH... it augers in. BTW, i know QBATCH is NOT where to run this type of thing... but i need a place to do a 'quick and dirty' connection test, and QBATCH should work just fine for that.

    The long version:

    The company I work for has, for lack of better analogy, a specialized telnet server. This server uses port 2130 by default. You can test that connection by sending the command 'telnet machinename 2130' and it will open a very non-descript telnet session.

    we have a start program for the AS400, and use SAVF file(s) to install it in it's own library.

    however, when i attempt to connect in the manner above, the telnet connection immediately slams shut. the session looks like this:

    Trying 192.168.1.44...
    Connected to gizmo.
    Escape character is '^]'.
    Connection closed by foreign host.

    ---snip----

    after the Escape char line, it should just sit there and stare at me; i know what to enter to further test it.

    Now, here's the part i don't understand: this PREVIOUSLY ran just fine in QBATCH like this. i could test it and it was just fine. not wanting to run in "production" in QBATCH, i created a separate subsystem (this forum) to run my telnet server in. Then, i removed the subsystem and all other calls required to start in the subsystem (and start on IPL).... and now my "simple test" doesn't work.
    frunstrating.

    so, when i start the server, it sits in subsystem QBATCH... until the first connection request. Then,
    QPRINT in QGPL fills up. So then if I do a WRKOUTQ, then select opt 5 work with queue QPRINT, i see 2 or 3 files. one is 1 page long,
    it displays the server startup message(s), and that looks fine. that one may or may not be there. Then there is a file with pages 0... so obviously i can't display it. then, there's a file that will be, oh, about 1800 pages long. if i select it and display it,
    it will contain:

    Error creating diveline process: 3489
    Bad file descriptor in select. errno: 3450
    Bad file descriptor in select. errno: 3450
    Bad file descriptor in select. errno: 3450
    Bad file descriptor in select. errno: 3450

    --snip--

    all these are messages coming out of my our product. the last line will continue for 2000 pages
    and fill up the outq.

    our server operates like some web servers: a daemon listens for connection requests, then spawns a child process to service that connection. our developers tell me at the point of failure, the server is trying to spawn a child process. for whatever reason, the OS won't let it.

    if i go to WRKSBS, select QBATCH 8=work with subsystem jobs, I can see my server sitting there with status=MSGW. i can do a 4=end, then F4,
    OPTION=*IMMED, and Delete Spooled Files = *YES, and it appears to end and clean up after itself. i guess.

    Like i said, this use to work just fine. I am using the SAME executable i used before. Then i created a subsystem for it, set this server to autostart with the subsystem, set the subsystem to start on IPL.... then removed all that and re-installed so I could test my procedures for all of this. and now, the same server that use to work just fine doesn't.

    Maybe there is a patron saint of the AS400 i could entreat to assist me in my quest.... this is making me loopy.

    thanks for ANY help anyone out there can provide.

    matt
    Some people are like slinkies.
    Not really good for anything, but
    you can't help but smile when you
    see them tumble down the stairs.

  • #2
    Its your software

    I checked all authorities and they looked fine.

    So i ran the command to point diveline to the correct directory.


    its:
    Code:
    DVLNDIR DIR('/home/atlantis')
    I dont see anything else that looks "funny"

    Its running on port 2130 @ 192.168.1.44 You will have to test at this point to get error message again.


    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Nope, same problem.

      I'd be inclined to say it's our software too, except for the fact that this very executable ran just fine before i created the subsystem and messed with the QSTRUP program.

      any other suggestions?

      my understanding is that the OS is preventing the child process from launching. since the QBATCH subsystem can only have one process, where do those child processes get sent to? maybe that subsystem is full and can't take another process?

      thx for the help - again!

      matt
      Some people are like slinkies.
      Not really good for anything, but
      you can't help but smile when you
      see them tumble down the stairs.

      Comment


      • #4
        I found the following message in the QEZJOBLOG OUTQ for my program (the screen scrape below is not complete - i couldn't get the whole message to fit on the screen)

        --- snip ----

        . . . . . : open_file__FP6_PCB_TViVP11create_file
        . . . . . : 2199
        Printer device PRT01 not found. Output queue changed to
        ry QGPL.
        The printer device PRT01 not found. The output queue was
        spooled printer file QPRINT in library QGPL. Recovery . . .
        he following before you run the program again: -- Change or
        inter device name for the spooled printer file QPRINT in
        ing either the Change Printer File (CHGPRTF) command or the
        r File (OVRPRTF) command. -- Add or create the configuration
        (CRTDEVPRT command).
        0:22.818672 QWPPUT QSYS 04F3 QWPPUT QSYS 04F3
        Reached maximum number of spooled records for file QPRINT

        --- snip ---

        ok, so it can't fine PRT01. big deal, there has never been a printer attached to this AS400.

        this help any?

        matt
        Some people are like slinkies.
        Not really good for anything, but
        you can't help but smile when you
        see them tumble down the stairs.

        Comment


        • #5
          Printer not the problem

          The printer is not the problem

          Im not sure about the spaw jobs to test just make QBATCH multi threaded.


          CHGSBSD

          Code:
                              Change Subsystem Description (CHGSBSD)           
                                                                               
          Type choices, press Enter.                                           
                                                                               
          Subsystem description  . . . . . SBSD                                
            Library  . . . . . . . . . . .                  *LIBL              
          Storage pools:                   POOLS                               
            Pool identifier  . . . . . . .                *SAME                
            Storage size . . . . . . . . .                                     
            Activity level . . . . . . . .                                     
                                    + for more values                          
          Maximum jobs . . . . . . . . . . MAXJOBS        *SAME                
          Text 'description' . . . . . . . TEXT           *SAME
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            ok then, quick questions:

            MAXJOBS is *SAME, just as shown below. what does *SAME mean in this context? should I set it to *NOMAX or 2 or what?

            how did QBATCH get single threaded if it wasn't before?

            matt
            Some people are like slinkies.
            Not really good for anything, but
            you can't help but smile when you
            see them tumble down the stairs.

            Comment


            • #7
              just for our test

              I would change to *NOMAX then

              Start and stop the subsystem


              ENDSBS and STRSBS
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                that did it; good to go now.

                but please answer my questions:

                what is the value of *SAME in this instance and how can i find that out?

                how did my qbatch get single-threaded when it was previously multi-threaded?

                when i create a specific subsystem for this process, i obviously need to make it multi-threaded. is that the default when i create a subsystem?

                thx again - you da bomb.
                Some people are like slinkies.
                Not really good for anything, but
                you can't help but smile when you
                see them tumble down the stairs.

                Comment


                • #9
                  Gotta see for yourself

                  The values that say *SAME say that cause they are in use and couldnt be retrived, got to endsbs to see then.

                  or RTVCFGSTS will work....



                  You have to test the subsystem thing for yourself...but it creates single threaded and you have to change to multiple.



                  hope that helps
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment

                  Working...
                  X