On 08/08/07, Keith Hodges keith_hodges@yahoo.co.uk wrote:
On 8/7/07, Keith Hodges keith_hodges@yahoo.co.uk wrote:
We in the gjallar camp have been trying to get a remote server connection without success. I am using beta2.
The Magma test cases run all tests across via the remote connection; hundreds of them with multiple connects, disconnects and even quitting the server image (twice!) in the middle of a huge commit and the clients reconnect succesfully after the server recovery..
So can you tell me what code you are using to start the server and then what code to connect the clients?
It appears that it is sending 'connect' and it is being recieved as an MAMalformed etc due to the class id not being recognized. It is #207 when the largest id in the ClassIdManager is 206.
This 'connect' request is sent only by the lower-level framework, Ma client server, on behalf of Magma, to establish the #protocol (merely a list of classes). You should check what class the client thinks is 207. 207 seems awfully high too, something is almost certainly not configured correctly.
You should try two vanilla Magma images (without Gjaller), establish a server on one:
MagmaServerConsole new open: '/path/to/the/repository' ; processOn: 1010 ; inspect
and connect from another image:
(MagmaSession host: 'serverName' port: 1010) connectAs: 'test' ; inspect
Note you can connect to a Gjaller repository even without the Gjaller code in the client; the missing classes will be created on the fly in order to instantiate the domain instances (but with no methods).
I debugged client-side code to point where #commit: begun, im also tried to change read strategy to default - same result. Evaluating statements you given above producing no errors, so the bug is not at connect stage (it connects OK) but at commit. Its not costs to mention, that everything works just fine when using MagmaLocalLocation.
processRequest: aMaRepositoryRequest aMaRepositoryRequest repositoryController: self. << this code causes an error because aMaRepositoryRequest is 'MaMalformedRequestError: class-definition not found' i don't know why its not catching error before entering this method. I think this is a bug.
Few stack steps above, in MaTcpRequestServer>>processRequestByteArray: after eveluating: requestObject := self materializeRequest: requestByteArray. requestObject set to MaMalformedRequestError , and then without any checking it used as argument in #processRequest: , which causes MNU
I also notice that the error occurs when it tries to send repositoryController to this MaMalformed error instance and this occurs outside of the MaError handler.
Yes. The Malformed check is actually in MaTcpRequestServer>>#materializeRequest:.
Is there some initialization that I need to do to get the class id's set up correctly?
No, not for Magma.
Secondly sig tried opening a telnet to the magma port and sending random characters in. he got a rather drastic Out of Memory error and a corrupted image.
On the server or telnet client? I assume on the client right? That'll learn him. :)
No! Error was raised not in Telnet client (i just run a dummy command line program) , but in image where currently magma server runs.
So he told Magma to listen on the port reserved for telnet?
Actually the server should have signaled a MalformedRequest error which would have been serialized and shipped back to the telnet client. Is that what happened?
No, as you can see its not. It causes MNU in server request processing cycle, and abandoning it makes non-served request hanging around. Also, a client image hangs indefinitely waiting for response - socket still open, but no data in it, because of abandoned request processing before it can send response. Maybe you should put a timeout there, so when no data arrived in say 2 minutes, client should raise an error?
I'm curious about this story, but this version of Magma is not designed to be strong against misuse or attack, so I don't know how concerned I'll be about it (again, for this version).
Well, i was just curious how well server behaves when, on occasion or on intent, something opens connection with it and starts sending random data.
It is late and I am not feeling very coherent. If you need more to go on I can give you an image tomorrow
Send me more information about what is being done, what steps including the code snippets.
Regards, Chris
Setools mailing list Setools@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/setools
Well, i was just curious how well server behaves when, on occasion or on intent, something opens connection with it and starts sending random data.
Ok, I fixed this. No malformed request will get through now, whether from a telnet client or otherwise. It should be impossible to crash the server remotely.
Individual packages are posted, but I haven't yet posted a new Configuration.
Thanks, Chris
So he told Magma to listen on the port reserved for telnet?
hehe, just found this in your previous post.. using telnet is my standard practice to check if something responsive on given host at given port.. usually i type:
telnet somehost someport <enter> :)
also, if this a HTTP server after connect , i usually type: GET / HTTP/1.0 Host: somehost
:)
On 13/08/07, Chris Muller asqueaker@gmail.com wrote:
Well, i was just curious how well server behaves when, on occasion or on intent, something opens connection with it and starts sending random data.
Ok, I fixed this. No malformed request will get through now, whether from a telnet client or otherwise. It should be impossible to crash the server remotely.
Individual packages are posted, but I haven't yet posted a new Configuration.
Thanks, Chris _______________________________________________ Setools mailing list Setools@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/setools
setools@lists.squeakfoundation.org