Author | Topic: 11004 - again and a Server dies - Ideas but no solution | |
---|---|---|
Hubert Brandel | 11004 - again and a Server dies - Ideas but no solution on Sun, 12 May 2002 04:05:52 +0200 Hi to all, I have tested the CLIENT / SERVER from socket at home: 1. PC Win98 on TCPIP 192.168.1.201 - ethernet with ar220 switch/DSL-router 2. PC Win2000 on TCPIP 192.168.1.203 - ethernet with ar220 switch/DSL-router same network no internet and got error: 11004 Same Error on both machines (server 1. - client 2. / server 2. - client 1.) PING is working ! Then i dialed in over ISDN into Arcornet with 1. PC and started server on it. Started the Client on the PC 2, with the IP Adress from IPCONFIG from 1. PC (ISDN Adapter is 1.) and it worked ok !!! So now I startet server on PC 2., red the IP Adress out of ar220 switch/DSL-router (defined the virtual Server on the needed port) and startet the Client with this adress (not the internal 192...) 1. Time the Servertask LOGED the Access from the client, but the client get an error back with the text 'Interne Datenstrukturen beschdigt' this was send from Server.EXE. The second access and the server goes away without any message. I have put the XPPERROR.LOG in here: FATAL ERROR LOG SYS Thread-ID: 888 Module: EXE Error Codes: EH: 2310 Sub: 200(c8) OS: 0 XPP: 41 Call Stack of Thread 1 (432): MAIN(51) Call Stack of Thread 2 (848): @SERVERTHREAD@I@EXECUTE(112) Call Stack of Thread 3 (888): @CLIENTTHREAD@I@EXECUTE(230) File: D:\ALASKA\XPPW32\SOURCE\samples\ASINET\SOCKETS\SERVER.EXE TimeStamp: 20020512 03:30 End of FATAL ERROR LOG. I have had a little Modification in the server.exe so i could see that ERROR - 1: gave back the errormessage, generated from local errorcodeblock/object: METHOD ClientThread:execute LOCAL nError := 0 LOCAL cLength := Space(4) LOCAL cBuffer LOCAL nBytes LOCAL xData LOCAL bError LOCAL oError := NIL /* * Obtain length of message to read from socket */ nBytes := SocketRecv( ::nSocket, @cLength, 4, @nError ) IF nError <> 0 .OR. nBytes <> 4 cBuffer := "ERROR:" + LTrim(Str(nError)) + " BYTES RECEIVED:" + LTrim(Str(nBytes)) cLength := U2Bin( Len( cBuffer ) ) SocketSend( ::nSocket, cLength + cBuffer ) RETURN self ENDIF /* * Read message from socket */ nBytes := Bin2U( cLength ) cBuffer := Space( nBytes ) nBytes := SocketRecv( ::nSocket, @cBuffer, nBytes, @nError ) IF nError == 0 /* * CLIENT.EXE sends an array of code bocks! * Convert array, evaluate the code blocks * and return result as binary data. */ bError := ErrorBlock( {|e| break(e) } ) BEGIN SEQUENCE xData := Bin2Var( cBuffer ) xData := ::evalData( xData ) cBuffer := Var2Bin( xData ) RECOVER USING oError cBuffer := "ERROR - 1:" + oError:description ------->>> this gave back the errormessage. END SEQUENCE ErrorBlock( bError ) ELSE cBuffer := "ERROR - 2:" + LTrim(Str(nError)) ENDIF The Win 98 IP-Config from 1. PC - without ISDN access aktivated - : Windows 98 IP-Konfiguration 0 Ethernet Adapter : IP-Adresse. . . . . . . . . : 0.0.0.0 Subnet Mask . . . . . . . . : 0.0.0.0 Standard-Gateway . . . . . . : 1 Ethernet Adapter : IP-Adresse. . . . . . . . . : 192.168.1.201 Subnet Mask . . . . . . . . : 255.255.255.0 Standard-Gateway . . . . . . : 192.168.1.1 It looks like it is not allowed to have 2 Adapters in it and use Adapter 2 for Internet/Intranet ?????? Bye Hubert | |
Andreas Herdt | Re: 11004 - again and a Server dies - Ideas but no solution on Mon, 13 May 2002 14:15:22 +0200 Hi, Hard to say what's going wrong from this place. But it seems that the error is reproducable, isn't it? So please, start the server in the debugger and step through the code. Thereafter describe at which line the server fails. -- Andreas Herdt Alaska Software Technology AG ------------------------------------------------------------- Technical Support EMEA: mailto:support@de.alaska-software.com Technical Support APRA: mailto:support@us.alaska-software.com News Server: news://news.alaska-software.com Homepage: http://www.alaska-software.com ------------------------------------------------------------- "Hubert Brandel" <Hubert.Brandel@gmx.de> schrieb im Newsbeitrag news:3cddcd18$1@asgcom.alaska-software.com... > Hi to all, > > I have tested the CLIENT / SERVER from socket at home: > > 1. PC Win98 on TCPIP 192.168.1.201 - ethernet with ar220 switch/DSL-router > 2. PC Win2000 on TCPIP 192.168.1.203 - ethernet with ar220 switch/DSL-router > > same network no internet and got error: 11004 > > Same Error on both machines (server 1. - client 2. / server 2. - client 1.) > PING is working ! > > Then i dialed in over ISDN into Arcornet with 1. PC and started server on > it. > Started the Client on the PC 2, with the IP Adress from IPCONFIG from 1. PC > (ISDN Adapter is 1.) > and it worked ok !!! > > So now I startet server on PC 2., red the IP Adress out of ar220 > switch/DSL-router (defined the virtual Server on the needed port) and > startet the Client with this adress (not the internal 192...) > 1. Time the Servertask LOGED the Access from the client, but > the client get an error back with the text 'Interne Datenstrukturen > beschdigt' this was send from Server.EXE. > The second access and the server goes away without any message. I have put > the XPPERROR.LOG in here: > > FATAL ERROR LOG > SYS Thread-ID: 888 > Module: EXE > Error Codes: EH: 2310 Sub: 200(c8) OS: 0 XPP: 41 > Call Stack of Thread 1 (432): > MAIN(51) > Call Stack of Thread 2 (848): > @SERVERTHREAD@I@EXECUTE(112) > Call Stack of Thread 3 (888): > @CLIENTTHREAD@I@EXECUTE(230) > File: D:\ALASKA\XPPW32\SOURCE\samples\ASINET\SOCKETS\SERVER.EXE > TimeStamp: 20020512 03:30 > End of FATAL ERROR LOG. > > I have had a little Modification in the server.exe so i could see that > ERROR - 1: gave back the errormessage, generated from local > errorcodeblock/object: > > METHOD ClientThread:execute > LOCAL nError := 0 > LOCAL cLength := Space(4) > LOCAL cBuffer > LOCAL nBytes > LOCAL xData > LOCAL bError > LOCAL oError := NIL > > /* > * Obtain length of message to read from socket > */ > nBytes := SocketRecv( ::nSocket, @cLength, 4, @nError ) > > IF nError <> 0 .OR. nBytes <> 4 > cBuffer := "ERROR:" + LTrim(Str(nError)) + " BYTES RECEIVED:" + > LTrim(Str(nBytes)) > cLength := U2Bin( Len( cBuffer ) ) > SocketSend( ::nSocket, cLength + cBuffer ) > RETURN self > ENDIF > > /* > * Read message from socket > */ > nBytes := Bin2U( cLength ) > cBuffer := Space( nBytes ) > nBytes := SocketRecv( ::nSocket, @cBuffer, nBytes, @nError ) > > IF nError == 0 > /* > * CLIENT.EXE sends an array of code bocks! > * Convert array, evaluate the code blocks > * and return result as binary data. > */ > bError := ErrorBlock( {|e| break(e) } ) > BEGIN SEQUENCE > xData := Bin2Var( cBuffer ) > xData := ::evalData( xData ) > cBuffer := Var2Bin( xData ) > RECOVER USING oError > cBuffer := "ERROR - 1:" + oError:description ------->>> this gave > back the errormessage. > END SEQUENCE > ErrorBlock( bError ) > ELSE > cBuffer := "ERROR - 2:" + LTrim(Str(nError)) > ENDIF > > > The Win 98 IP-Config from 1. PC - without ISDN access aktivated - : > > Windows 98 IP-Konfiguration > > 0 Ethernet Adapter : > > IP-Adresse. . . . . . . . . : 0.0.0.0 > Subnet Mask . . . . . . . . : 0.0.0.0 > Standard-Gateway . . . . . . : > > 1 Ethernet Adapter : > > IP-Adresse. . . . . . . . . : 192.168.1.201 > Subnet Mask . . . . . . . . : 255.255.255.0 > Standard-Gateway . . . . . . : 192.168.1.1 > > It looks like it is not allowed to have 2 Adapters in it and use Adapter 2 > for Internet/Intranet ?????? > > Bye > Hubert > > > > | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 14 May 2002 00:14:25 +0100 Hi, > Hard to say what's going wrong from this place. But it seems that the error is reproducable, isn't it? Yes it is, but not everytime the same: With a logfile i got out, that the line: METHOD ClientThread:execute ... bError := ErrorBlock( {|e| break(e) } ) ? date(),time() BEGIN SEQUENCE ?? " len(cBuffer)",len(cBuffer),"nBytes:",nBytes -> this was the last message in LOG !!! xData := Bin2Var( -> Killerline my logfile (client on Win98 over ISDN-Arcor-Internet) to (server on Win2000 over DSL-ROUTER/SWITCH): ---------------------------------------------------------------------------- -------- 13.05.2002 22:33:49 Server up and running ... Press ESC to QUIT OS(): Windows 2000 05.00 Build 02195 Service Pack 2 Version(): Xbase++ (R) Version 1.70 13.05.2002 22:33:54 Servicing: {2, 38404, 917541076} -> IP-Adresse: 212.144.176.54 -> PORT: 38404 13.05.2002 22:33:54 len(cBuffer) 1433 nBytes: 532 ---------------------------------------------------------------------------- -------- 13.05.2002 22:37:15 Server up and running ... Press ESC to QUIT OS(): Windows 2000 05.00 Build 02195 Service Pack 2 Version(): Xbase++ (R) Version 1.70 13.05.2002 22:37:52 Servicing: {2, 39684, 917541076} -> IP-Adresse: 212.144.176.54 -> PORT: 39684 13.05.2002 22:37:52 len(cBuffer) 1433 nBytes: 532 ---------------------------------------------------------------------------- -------- 13.05.2002 22:38:56 Server up and running ... Press ESC to QUIT OS(): Windows 2000 05.00 Build 02195 Service Pack 2 Version(): Xbase++ (R) Version 1.70 13.05.2002 22:39:03 Servicing: {2, 40452, 917541076} -> IP-Adresse: 212.144.176.54 -> PORT: 40452 13.05.2002 22:39:03 len(cBuffer) 1433 nBytes: 532 --------------------------******************--------------####### The computer receive only 532 Byte instead off 1433 and give the xppfatal.log: FATAL ERROR LOG SYS Thread-ID: 900 Module: EXE Error Codes: EH: 2310 Sub: 119(77) OS: 0 XPP: 41 Call Stack of Thread 1 (432): MAIN(60) Call Stack of Thread 2 (852): @SERVERTHREAD@I@EXECUTE(121) Call Stack of Thread 3 (900): @CLIENTTHREAD@I@EXECUTE(243) File: D:\ALASKA\XPPW32\SOURCE\samples\ASINET\SOCKETS\SERVER.EXE TimeStamp: 20020513 22:40 End of FATAL ERROR LOG. What I see is that -> PORT: 40452 ist reported by TCPIP, but I told to use 1042, My firewall has only opened 1042 as virtual server (i told to do so because of sourcecode entry). Then I told the firewall allow all ports for this server. Sometimes there was no connection possible, do i have to open all ports ? I have used the direkt IP Adresses (xxx.xxx.xxx.xxx) and after I killed the DF-TCPIP Adapter 0 from Win98 I could work on local adresses now. It looks like ASINET all the time use the first IP-Adapter, wich was empty in the case of no ISDN connetion. But I need the Internet way. It could be, that installation is not perfekt enought for the ASINET, but all other Produkts work fine and I want to learn about Internetprogramming without a Webserver (don't have one). By the way, who knows german profiders, wich offer fixed IP-Adresses and a flatrate for the server of my little App. The 3 man shop, which is asking for that dont have too much money. Bye Hubert | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 14 May 2002 01:50:00 +0100 Hi, nochmal, diesmal auf deutsch - ist einfach einfacher ... > Hi, > > Hard to say what's going wrong from this place. But it seems that the error is reproducable, isn't it? der Fehler ist jetzt reproduzierbar ... nach Umstellung aller Maschinen auf DHCP und Autokonfiguration luft im LAN alles, wenn keine weiteren Adapter offen sind. bers Internet: Firewall aktiv ohne Durchgriff oder Server luft nicht, oder im LAN mit ISDN aktiv: 10061 - /* Connection refused */ -> heit das Zugriff verweigert oder ??? Firewall mit virtual Server auf PORT oder fr Rechner ausgeschaltet: Win98 - Client - ISDN -> DSL - Server Win2000 Server.Exe schmiert ab wie gemeldet. in Gegenrichtung funktioniert es. (Leider kann ich den Win2000 nicht ans ISDN anhngen...): Win2000 - Client - DSL -> ISDN - Server Win98 alles OK ! 11004 bekomme ich jetzt keine mehr, dies mu wohl doch an der manuellen Installation der Adressen gelegen haben ??? > > METHOD ClientThread:execute ..... > > /* > > * Read message from socket > > */ > > nBytes := Bin2U( cLength ) > > cBuffer := Space( nBytes ) > > nBytes := SocketRecv( ::nSocket, @cBuffer, nBytes, @nError ) ****** hier werden nBytes=1433 Bytes angefordert, aber nur 532 geliefert ????? ******* > > > > IF nError == 0 > > /* > > * CLIENT.EXE sends an array of code bocks! > > * Convert array, evaluate the code blocks > > * and return result as binary data. > > */ > > bError := ErrorBlock( {|e| break(e) } ) > > BEGIN SEQUENCE ***** bis hier geht es noch gut ******* > > xData := Bin2Var( cBuffer ) ******> Tdlicher Befehl.... ***** hier kommt das Programm nicht an ******** > > xData := ::evalData( xData ) > > cBuffer := Var2Bin( xData ) > > RECOVER USING oError > > cBuffer := "ERROR - 1:" + oError:description ------->>> this gave > > back the errormessage. > > END SEQUENCE > > ErrorBlock( bError ) > > ELSE > > cBuffer := "ERROR - 2:" + LTrim(Str(nError)) > > ENDIF | |
Andreas Herdt | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 14 May 2002 12:38:01 +0200 To the world: My reply will be in english please read below: "Hubert Brandel" <Hubert.Brandel@gmx.de> schrieb im Newsbeitrag news:3ce0505d$1@asgcom.alaska-software.com... > Hi, > > nochmal, diesmal auf deutsch - ist einfach einfacher ... > > > Hi, > > > > Hard to say what's going wrong from this place. But it seems that the > error is reproducable, isn't it? > > der Fehler ist jetzt reproduzierbar ... > > nach Umstellung aller Maschinen auf DHCP und Autokonfiguration luft im LAN > alles, wenn keine weiteren Adapter offen sind. > > bers Internet: > > Firewall aktiv ohne Durchgriff oder Server luft nicht, oder im LAN mit ISDN > aktiv: 10061 - /* Connection refused */ > -> heit das Zugriff verweigert oder ??? > > Firewall mit virtual Server auf PORT oder fr Rechner ausgeschaltet: > Win98 - Client - ISDN -> DSL - Server Win2000 > Server.Exe schmiert ab wie gemeldet. > in Gegenrichtung funktioniert es. (Leider kann ich den Win2000 nicht > ans ISDN anhngen...): > Win2000 - Client - DSL -> ISDN - Server Win98 > alles OK ! > > 11004 bekomme ich jetzt keine mehr, dies mu wohl doch an der manuellen > Installation der Adressen gelegen haben ??? > > > > METHOD ClientThread:execute > ..... > > > /* > > > * Read message from socket > > > */ > > > nBytes := Bin2U( cLength ) > > > cBuffer := Space( nBytes ) > > > nBytes := SocketRecv( ::nSocket, @cBuffer, nBytes, @nError ) > ****** hier werden nBytes=1433 Bytes angefordert, aber nur 532 geliefert > ????? ******* I will reply in english for not have to write this twice. If you don't understand, please give me advise and I will give it another try via privat email. Translation: 1433 bytes are expected but 532 bytes are delivered only. The reason should be that that the sample is a very stupid one It expects that all data is delivered by the first SocketRecv(). This is not guaranteed by the socket api. You have to code this, for example: local cBuffer, nBufLen, cResponse, nBytes cResponse := "" cBuffer := Space( BUFLEN ) do while 0 != ( nBytes := SocketRecv( :nSocket. @cBuffer, BUFLEN, @nError ) cResponse += Alltrim( cBuffer ) cBuffer := Space( BUFLEN ) end do Please add also a check for nError into the loop. This will guarantee that all data are read from the socket. Please take also into consideration the fact that there might be more bytes in the request as required. If the length of the string received is not exactly the string which is send, a Bin2Var must fail after the BEGIN SEQUENCE line below. > > > > > > IF nError == 0 > > > /* > > > * CLIENT.EXE sends an array of code bocks! > > > * Convert array, evaluate the code blocks > > > * and return result as binary data. > > > */ > > > bError := ErrorBlock( {|e| break(e) } ) > > > BEGIN SEQUENCE > ***** bis hier geht es noch gut ******* > > > xData := Bin2Var( cBuffer ) ******> Tdlicher Befehl.... > ***** hier kommt das Programm nicht an ******** > > > xData := ::evalData( xData ) > > > cBuffer := Var2Bin( xData ) > > > RECOVER USING oError > > > cBuffer := "ERROR - 1:" + oError:description ------->>> this > gave > > > back the errormessage. > > > END SEQUENCE > > > ErrorBlock( bError ) > > > ELSE > > > cBuffer := "ERROR - 2:" + LTrim(Str(nError)) > > > ENDIF > -- Andreas Herdt Alaska Software Technology AG ------------------------------------------------------------- Technical Support EMEA: mailto:support@de.alaska-software.com Technical Support APRA: mailto:support@us.alaska-software.com News Server: news://news.alaska-software.com Homepage: http://www.alaska-software.com ------------------------------------------------------------- | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 14 May 2002 17:14:00 +0100 Hi, > I will reply in english for not have to write this twice. > If you don't understand, please give me advise I can read english better than write > The reason should be that that the sample is a very stupid one > It expects that all data is delivered by the first SocketRecv(). > This is not guaranteed by the socket api. ahhh, I thought that ASINET takes care of that. OK no Problem, so I will take care ... Bye the way, you wrote, there could come more then the expected amount of byte, do I have to read this as long as there is nothing comming (or an error occours) or only the expected bytes ? Bin2Var does every Xbase++ Var have to converted with Var2Bin and Bin2Var or only arrays ? Can you recomment books to read for the basics on ASINET / TCPIP ? Those things should be written in the asinet.hlp (wait until all bytes ar in ...) - how to now ? -, but I newer had a handbook that told the basics ... maybe Borland TurboBasic had one ... Its like every clipper and clippertoolshandbook ... the examples are poor for the function, but nowhere is explained why and with what use to use... Good to have this forum, even when I have to ask in the evening from home (firewall on work blocks all newsgroups - the 'experts' tried to give free yours, but it didn't work. Bye and thanks Hubert Brandel | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 14 May 2002 20:52:32 +0100 Hi, just for the future ... > do while 0 != ( nBytes := SocketRecv( :nSocket. @cBuffer, BUFLEN, @nError ) this line will hang (is hanging), wenn all Bytes are received ! so BUFLEN is the first time the same as the amount of sended Bytes (nByte in example) . The loop has to work until all Bytes are here, BUFFLEN have to decrease with the amount of received Bytes: BUFFLEN := nSendedBytes cResult := "" do while BUFFLEN > 0 cBuffer := space( BUFFLEN ) nBytes := SocketRecv( ::nSocket, @cBuffer, BUFLEN, @nError ) if nError > 0 exit else BUFFLEN -= nBytes cResult += alltrim(cBuffer) endif enddo if nError = 0 cResult := left(cResult,nSendedBytes) .... | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Sun, 19 May 2002 18:06:12 +0100 Hi, > Translation: 1433 bytes are expected but 532 bytes are delivered only. > > The reason should be that that the sample is a very stupid one > It expects that all data is delivered by the first SocketRecv(). This is not guaranteed > by the socket api. You have to code this, for example: After thinking that all have to implement those loops, and the fact that we don't work with the API Funktion directly, would it not be better to change the ASINET function once that it does the loop inside it ? Maybe in 1.90 ... Would be easier for everyone ... Thanks a lot for your help, now my Server EXE works on Win2000 over DSL. Bye Hubert | |
Hubert Brandel | Re: 11004 - again and a Server dies - Ideas but no solution on Tue, 21 May 2002 22:20:12 +0100 |