Thread: very annoying error

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 very annoying error 
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    Code:
    java.net.SocketException: Broken pipe
    	at java.net.SocketOutputStream.socketWrite0(Native Method)
    	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    	at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    	at net.com.codeusa.net.PlayerSocket.write(PlayerSocket.java:108)
    	at net.com.codeusa.net.codec.RS2LoginProtocol.directFlushStream(RS2LoginProtocol.java:295)
    	at net.com.codeusa.net.codec.RS2LoginProtocol.updateServer(RS2LoginProtocol.java:219)
    	at net.com.codeusa.net.codec.RS2LoginProtocol.login(RS2LoginProtocol.java:37)
    	at net.com.codeusa.Engine.connectAwaitingPlayers(Engine.java:266)
    	at net.com.codeusa.Engine.run(Engine.java:148)
    	at java.lang.Thread.run(Thread.java:619)
    getted this error and my server crash getting this every 20 mins
    Reply With Quote  
     

  2. #2  
    +Jedi+
    Guest
    do you know if someone is crashing your server or not?
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jun 2007
    Age
    29
    Posts
    3,003
    Thanks given
    52
    Thanks received
    98
    Rep Power
    3208
    i think it has a broken pipe
    Reply With Quote  
     

  4. #4  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    Code:
    /*
     * Class PlayerSocket
     *
     * Version 1.0
     *
     * Friday, August 15, 2008
     *
     * Created by Palidino76
     */
    
    package net.com.codeusa.net;
    
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.SocketException;
    import java.net.Socket;
    
    import net.com.codeusa.model.*;
    public final class PlayerSocket {
        /**
         * The Player this class belongs to.
         */
        public Player player;
        /**
         * The SocketChannel used for recieving and sending bytes.
         */
        public Socket socket;
        /**
         * InputStream for accepting bytes.
         */
        public InputStream input;
        /**
         * OutputStream for sending bytes.
         */
        public OutputStream output;
    
        /**
         * Constructs a new PlayerSocket.
         * @param p The Player which the frame should be created for.
         * @param s The socket this PlayerSocket belongs to.
         */
        public PlayerSocket(Player p, Socket s) {
            player = p;
            socket = s;
            try {
                input = socket.getInputStream();
                output = socket.getOutputStream();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    
        /**
         * Reads one byte from the socket.
         * @return Returns a single byte from the buffer, or -1 if an error occurs.
         */
        public int read() throws Exception {
            if (input == null || input.available() < 1) {
                return -1;
            }
            return input.read();
        }
    
        /**
         * Reads a given number of bytes from the socket.
         * @param read The number of bytes to read from the buffer.
         * @return Returns the number of bytes that were successfully read.
         */
        public int read(int read) throws Exception {
            if (input == null) {
                return -1;
            }
            return input.read(player.stream.inBuffer, 0, read);
        }
    
        /**
         * Get the number of available bytes.
         * @return Returns the number of bytes available to be read.
         */
        public int avail() throws Exception {
            if (input == null) {
                return 0;
            }
            return input.available();
        }
    
        /**
         * Writes a byte to the remote host.
         * @param b Writes one byte to the buffer.
         */
        public void write(byte b) throws Exception {
            if (socket == null) {
                return;
            }
            output.write(b);
        }
    
        /**
         * Writes bytes to the remote host.
         * @param array Array to write bytes from.
         * @param startPos The position in the array to start writing at.
         * @param finishPos The last position of the array to stop writing at.
         */
        public void write(byte[] array, int startPos, int finishPos) throws Exception {
            if (socket == null) {
                return;
            }
            output.write(array, startPos, finishPos);
        }
    
        /**
         * Flush the outstream.
         */
        public void flush() throws Exception {
            if (socket == null) {
                return;
            }
            output.flush();
        }
    }
    playersocket class
    Reply With Quote  
     

  5. #5  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    any1 know how to fix?
    Reply With Quote  
     

  6. #6  
    Registered Member
    AndyJay's Avatar
    Join Date
    Jun 2008
    Posts
    1,285
    Thanks given
    38
    Thanks received
    48
    Rep Power
    84
    First time I've ever seen a Broken Pipe error.. Wtf lol?

    Surprised no "advanced coders" have replied, I guess they don't know either.


    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Jul 2007
    Posts
    268
    Thanks given
    0
    Thanks received
    1
    Rep Power
    101
    I ehm had this on a z508 based server, I had backuped some files and repaced the broken ones with old working ones.
    Reply With Quote  
     

  8. #8  
    Номер 1


    Leanbow's Avatar
    Join Date
    Feb 2008
    Posts
    5,895
    Thanks given
    1,564
    Thanks received
    2,624
    Rep Power
    5000
    dont have old 1
    Reply With Quote  
     

  9. #9  
    Registered Member
    X Mercy X's Avatar
    Join Date
    May 2009
    Age
    31
    Posts
    1,336
    Thanks given
    3
    Thanks received
    41
    Rep Power
    301
    call the plumber

    Reply With Quote  
     

  10. #10  
    Registered Member
    X Mercy X's Avatar
    Join Date
    May 2009
    Age
    31
    Posts
    1,336
    Thanks given
    3
    Thanks received
    41
    Rep Power
    301
    duno but on irc its a disconnecting error so check ur connection or summit like dat related server side

    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •