10 Replies Latest reply on Apr 16, 2004 8:35 AM by SunForumsGuest7-MOS

    Where are socket error codes explained?

    SunForumsGuest7-MOS
      Does anyone know where can I find explanations of socket error codes? eg. When doing a socket connect I get an error code=10061. I am using NT4 & JDK 2.2.1
      Is there an online reference anyone is aware of?

      TIA,
      Peter J
        • 1. Re: Where are socket error codes explained?
          SunForumsGuest7-MOS
          Hi, hope following passage will help you.

          #define WSABASEERR 10000
          /*
          * Windows Sockets definitions of regular Microsoft C error constants
          */
          #define WSAEINTR (WSABASEERR+4)
          #define WSAEBADF (WSABASEERR+9)
          #define WSAEACCES (WSABASEERR+13)
          #define WSAEFAULT (WSABASEERR+14)
          #define WSAEINVAL (WSABASEERR+22)
          #define WSAEMFILE (WSABASEERR+24)

          /*
          * Windows Sockets definitions of regular Berkeley error constants
          */
          #define WSAEWOULDBLOCK (WSABASEERR+35)
          #define WSAEINPROGRESS (WSABASEERR+36)
          #define WSAEALREADY (WSABASEERR+37)
          #define WSAENOTSOCK (WSABASEERR+38)
          #define WSAEDESTADDRREQ (WSABASEERR+39)
          #define WSAEMSGSIZE (WSABASEERR+40)
          #define WSAEPROTOTYPE (WSABASEERR+41)
          #define WSAENOPROTOOPT (WSABASEERR+42)
          #define WSAEPROTONOSUPPORT (WSABASEERR+43)
          #define WSAESOCKTNOSUPPORT (WSABASEERR+44)
          #define WSAEOPNOTSUPP (WSABASEERR+45)
          #define WSAEPFNOSUPPORT (WSABASEERR+46)
          #define WSAEAFNOSUPPORT (WSABASEERR+47)
          #define WSAEADDRINUSE (WSABASEERR+48)
          #define WSAEADDRNOTAVAIL (WSABASEERR+49)
          #define WSAENETDOWN (WSABASEERR+50)
          #define WSAENETUNREACH (WSABASEERR+51)
          #define WSAENETRESET (WSABASEERR+52)
          #define WSAECONNABORTED (WSABASEERR+53)
          #define WSAECONNRESET (WSABASEERR+54)
          #define WSAENOBUFS (WSABASEERR+55)
          #define WSAEISCONN (WSABASEERR+56)
          #define WSAENOTCONN (WSABASEERR+57)
          #define WSAESHUTDOWN (WSABASEERR+58)
          #define WSAETOOMANYREFS (WSABASEERR+59)
          #define WSAETIMEDOUT (WSABASEERR+60)
          #define WSAECONNREFUSED (WSABASEERR+61)
          #define WSAELOOP (WSABASEERR+62)
          #define WSAENAMETOOLONG (WSABASEERR+63)
          #define WSAEHOSTDOWN (WSABASEERR+64)
          #define WSAEHOSTUNREACH (WSABASEERR+65)
          #define WSAENOTEMPTY (WSABASEERR+66)
          #define WSAEPROCLIM (WSABASEERR+67)
          #define WSAEUSERS (WSABASEERR+68)
          #define WSAEDQUOT (WSABASEERR+69)
          #define WSAESTALE (WSABASEERR+70)
          #define WSAEREMOTE (WSABASEERR+71)

          #define WSAEDISCON (WSABASEERR+101)

          /*
          * Extended Windows Sockets error constant definitions
          */
          #define WSASYSNOTREADY (WSABASEERR+91)
          #define WSAVERNOTSUPPORTED (WSABASEERR+92)
          #define WSANOTINITIALISED (WSABASEERR+93)
          • 2. Re: Where are socket error codes explained?
            SunForumsGuest7-MOS
            Thanks zhangjun1. This list is a valuable start. Do you know if there is any text explanation available for each of the error codes.

            regards
            Peter J
            • 3. Re: Where are socket error codes explained?
              SunForumsGuest7-MOS
              There are some nice descriptions at http://www.sockets.com/err_lst1.htm

              Hope that helps,
              Anne

              • 4. Re: Where are socket error codes explained?
                SunForumsGuest7-MOS
                Thanks Anne, that's just what I was looking for.

                regards
                Peter J
                • 5. pls help me in the socket error
                  SunForumsGuest7-MOS
                  hi all,
                  i have encountered an error as follows while connecting to the rmi server
                  java.net.SocketException: connect (code=10061)
                  pls help. looking for valuable suggestion and guidance. ur help will b highly appreciated
                  • 6. Re: pls help me in the socket error
                    798701
                    Well, did you check the error code's meaning from http://www.sockets.com/err_lst1.htm ???
                    • 7. Re: pls help me in the socket error
                      SunForumsGuest7-MOS
                      actually the rmi server is located remotely.
                      yes i have checked the error description, it says the
                      "Berkeley description: No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host"
                      but i have given all permission in the policy file.
                      pls help me
                      • 8. Re: pls help me in the socket error
                        SunForumsGuest7-MOS
                        where i have to declare the constants as adviced by previous user ? in the client.class ? pls let me know
                        • 9. Re: pls help me in the socket error
                          798701
                          This has nothing to do with permissions and the policy file. "Connection refused" means that...

                          you tried to connect to the wrong port.
                          you tried to connect to the wrong destination host address
                          the server application isn't running on the destination host
                          the server application isn't listening on the right port.

                          I don't know what it means in the case of RMI but it sounds like either your server was running on the wrong port or it was not running at all.
                          • 10. Re: pls help me in the socket error
                            SunForumsGuest7-MOS
                            I have the a similiar problem but my server is local.
                            Wireless toolkit says that "cannot open socket for LIME event on port 30080 (is cahnges so the numer of the port is nos relevant), the port is not listening."
                            I am thinking that the problem is in either the telephone emulator or in the Wireless toolkit but 5 dais ago it worked perfectly.
                            Any ideas or suggestions?.