4 Replies Latest reply on Dec 13, 2013 7:06 AM by Jonathan Devine

    Intermittent java.io.IOException: The pipe is being closed

    Jonathan Devine Newbie

      Hi,

       

      I've been configuring JBoss EAP 6.1 (with JBoss AS 7.2) for a while now as we are trying to upgrade from our previous JBoss 5. I'm setting up the domain mode but I'm having a few problems, one of which is an intermittent "pipe is being closed" error on startup. As an example I have been doing some testing of another issue (VFS directory filling up every time a restart is done), this testing involves starting and stopping the app server lots of time. I had no problem doing this last night, but on doing the exact same thing this morning I find the following error in process-controller.log:

       

      08:29:56,349 ERROR [org.jboss.as.process.Server:live-server.status] (ProcessController-threads - 3) JBAS012006: Failed to send data bytes to process 'Server:live-server' input stream: java.io.IOException: The pipe is being closed

      at java.io.FileOutputStream.writeBytes(Native Method) [rt.jar:1.7.0_40]

      at java.io.FileOutputStream.write(FileOutputStream.java:345) [rt.jar:1.7.0_40]

      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) [rt.jar:1.7.0_40]

      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) [rt.jar:1.7.0_40]

      at org.jboss.as.process.ManagedProcess.sendStdin(ManagedProcess.java:160) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

      at org.jboss.as.process.ProcessController.sendStdin(ProcessController.java:183) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

      at org.jboss.as.process.ProcessControllerServerHandler$InitMessageHandler$ConnectedMessageHandler.handleMessage(ProcessControllerServerHandler.java:140) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

      at org.jboss.as.process.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:269) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

      at org.jboss.as.process.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:223) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]

      at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

      at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

       

      The configuration is in domain mode such that I have 3 server groups, with one server in each, each with their own profile, however only 'live-server' is set to startup by default. I restarted my machine (local pc) and now the error isn't happening. I've had this happen before though, often after changing a configuration file (although without corrupting it as far as I can tell), although I haven't done that this morning.

       

      Is this a known problem? Is the server not shutting down properly and locking down a port? I'm running JBoss as a windows service if that helps, but I've had this issue when running it from plain old domain.bat also.

       

      Thanks.

        • 1. Re: Intermittent java.io.IOException: The pipe is being closed
          Emanuel Muckenhuber Master

          I haven't seen this before, so can you explain a bit more about how you restart the servers? Are there some errors in the server.log, or can you just attach the logs here? Also did you try using EAP 6.1.1 or EAP 6.2.0 instead?

          • 2. Re: Intermittent java.io.IOException: The pipe is being closed
            Jonathan Devine Newbie

            The server.log for live-server itself doesn't register anything, nothing is logged. The full log for process.controller.log is below:

             

            08:29:54,368 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.Final-redhat-1
            08:29:54,477 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
            08:29:56,287 INFO  [org.jboss.as.process.Server:live-server.status] (ProcessController-threads - 3) JBAS012017: Starting process 'Server:live-server'
            08:29:56,318 INFO  [org.jboss.as.process.Server:live-server.status] (reaper for Server:live-server) JBAS012010: Process 'Server:live-server' finished with an exit status of 1
            08:29:56,349 ERROR [org.jboss.as.process.Server:live-server.status] (ProcessController-threads - 3) JBAS012006: Failed to send data bytes to process 'Server:live-server' input stream: java.io.IOException: The pipe is being closed
            at java.io.FileOutputStream.writeBytes(Native Method) [rt.jar:1.7.0_40]
            at java.io.FileOutputStream.write(FileOutputStream.java:345) [rt.jar:1.7.0_40]
            at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) [rt.jar:1.7.0_40]
            at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) [rt.jar:1.7.0_40]
            at org.jboss.as.process.ManagedProcess.sendStdin(ManagedProcess.java:160) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.ProcessController.sendStdin(ProcessController.java:183) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.ProcessControllerServerHandler$InitMessageHandler$ConnectedMessageHandler.handleMessage(ProcessControllerServerHandler.java:140) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:269) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:223) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
            at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
            at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

            08:29:56,349 ERROR [org.jboss.as.protocol.connection] (ProcessController-threads - 3) JBAS016610: Failed to read a message: java.io.IOException: The pipe is being closed
            at java.io.FileOutputStream.writeBytes(Native Method) [rt.jar:1.7.0_40]
            at java.io.FileOutputStream.write(FileOutputStream.java:345) [rt.jar:1.7.0_40]
            at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) [rt.jar:1.7.0_40]
            at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) [rt.jar:1.7.0_40]
            at org.jboss.as.process.ManagedProcess.sendStdin(ManagedProcess.java:160) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.ProcessController.sendStdin(ProcessController.java:183) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.ProcessControllerServerHandler$InitMessageHandler$ConnectedMessageHandler.handleMessage(ProcessControllerServerHandler.java:140) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:269) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at org.jboss.as.process.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:223) [jboss-as-process-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
            at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
            at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

             

            This morning when getting the error (which is not currently happening since a pc reboot) I was starting and stopping the service through the windows services menu. I registered the JBoss domain process as a service using the connectors downloadable from JBoss Web Native Connectors Downloads - JBoss Community. I am on a windows 7 32 bit machine so I am using "binaries 2.0.10-windows x86".

             

            I had to modify the installable service.bat, the startup and shutdown tasks in service.bat I am using are shown here:

             

            :cmdStart
            REM Executed on service start
            del .r.lock 2>&1 | findstr /C:"being used" > nul
            if not errorlevel 1 (
              echo Could not continue. Locking file already in use.
              goto cmdEnd
            )
            echo Y > .r.lock
            jbosssvc.exe -p 1 "Starting %SVCDISP%" > ../domain/log/run.log
            call domain.bat < .r.lock >> run.log 2>&1
            jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> ../domain/log/run.log
            del .r.lock
            goto cmdEnd

            :cmdStop
            REM Executed on service stop
            echo Y > .s.lock
            jbosssvc.exe -p 1 "Shutting down %SVCDISP%" > ../domain/log/shutdown.log
            rem call jboss-cli.bat --connect /host=master:shutdown >> ../domain/log/shutdown.log 2>&1
            jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> ../domain/log/shutdown.log
            del .s.lock
            goto cmdEnd

             

            Although as I've mentioned, I've experienced the same problem simply by starting up with domain.bat directly (ie double clicking domain.bat in windows explorer, and closing the cmd windows to shut it down).

            • 3. Re: Intermittent java.io.IOException: The pipe is being closed
              Tomaz Cerar Master

              This is a known issue with default jvm memory we bundle. They do not work on 32bit windows.

               

              see Re: Error when running domain.bat for cluster same problem.

               

              I will just paste same reply here:

               

              This is known issue for default EAP 6.1 config we ship. (it is also mentioned in release notes as known issue)

               

              anyhow, issue only occurs on 32bit JVM on windows (doesn't matter if you use 64bit version of windows).

              fix is quite simple. just lower memory settings as default we ship are too big in any case.

               

              open domain.xml and on bottom of file you will see settings for server-groups

               

              Change them to use much lower heap sizes.

               

              now there is

              <heap size="1303m" max-size="1303m"/>

               

              if you change that to something like

              <heap size="128m" max-size="512m"/>

               

              it should work as it should.

               

              --

              tomaz

              • 4. Re: Intermittent java.io.IOException: The pipe is being closed
                Jonathan Devine Newbie

                Thanks, it was indeed the heap size, I had originally reduced it from 1303m to 1024m which worked most of the time, but as I reported I still got this problem intermittently. Reducing the heap size further seems to stop the error when it occurs.