Darwinbots Forum

Bots and Simulations => Evolution and Internet Sharing Sims => Internet Mode Commentary => Topic started by: MysticalDumpling on February 25, 2014, 04:53:58 PM

Title: IM is kinda, sorta working
Post by: MysticalDumpling on February 25, 2014, 04:53:58 PM
However, go to http://forum.darwinbots.com/index.php/topic,6285.msg1389000.html#msg1389000 (http://forum.darwinbots.com/index.php/topic,6285.msg1389000.html#msg1389000) Unzip in the main Darwinbots folder, not any of the subfolders and create the subfolder IM, with 2 folders inside that- inbound and outbound. It is rather large, though. So far, do not put spaces in your IM username.
Title: Re: IM is kinda, sorta working
Post by: Billy on July 27, 2014, 07:01:56 AM
Getting "[Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"

Does this mean the server is down?
Title: Re: IM is kinda, sorta working
Post by: Botsareus on July 27, 2014, 10:19:21 PM
Peter is currently not running IM as he finished development on it. We did not have any serious stress test. Still, I am going to start a server up early next month if I can get it to work.
Title: Re: IM is kinda, sorta working
Post by: Peter on July 28, 2014, 11:45:42 AM
It's also connecting to a different ip(that isn't mine). If necessarily I could also compile it to .exe so anyone has the possibility to run a IM server.
Title: Re: IM is kinda, sorta working
Post by: Billy on July 30, 2014, 03:28:44 PM
Peter is currently not running IM as he finished development on it. We did not have any serious stress test. Still, I am going to start a server up early next month if I can get it to work.

Thanks, that sounds cool. It's been SO long since we've had a good internet multisim, and I miss it!
Title: Re: IM is kinda, sorta working
Post by: Billy on July 30, 2014, 03:33:19 PM
It's also connecting to a different ip(that isn't mine). If necessarily I could also compile it to .exe so anyone has the possibility to run a IM server.

Sounds like an interesting idea. I think one internet mode server at a time is quite enough for now though, considering the number of active users.
Title: Re: IM is kinda, sorta working
Post by: vrukt on August 18, 2014, 06:12:07 PM
First time posting but I've been following, and fiddling with, Darwinbot's for a few years now. Would be interested in seeing a server go up.

Went looking for a good a-life simulator after watching Richard Dawkins 'The Blind Watchmaker', as he fiddles with a few amazing ones dating back over 20 years now. First assumption was that there must be dozens of amazing a-life simulators out, and there are a few interesting ones, but to me Darwinbot's was definitely one of the more interesting ones.

Looking forward to an internet mode guys!
Title: Re: IM is kinda, sorta working
Post by: spork22 on August 19, 2014, 12:06:52 PM
Of all the life sims I've found, Darwinbots has been my favorite by far. Keep up the good work, guys :D
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 19, 2014, 01:22:28 PM
[bump]

Got distracted with the fact that my tablet decided to turn the touch screen off permanently. That is, Nokia did not realize that the only way to wake the screen in windows8.1 is by using the touch screen. Good job guys!

So far I have tried two different Linux hacks to get IM working with no luck. May end up switching providers.

Found two bugs while running leagues
1.) Some meta data tags can break the simulator if you know what you are doing (F1), I have seen this before but was too lazy to fix.
2.) Got div/0 in F2 mode for some reason, I wonder if it is related to my weather mod.

All other leagues completed but yet to post results because ns if weather works correctly.

Title: Re: IM is kinda, sorta working
Post by: Peter on August 21, 2014, 01:23:31 PM
[bump]So far I have tried two different Linux hacks to get IM working with no luck. May end up switching providers.
There's always this  (http://forum.darwinbots.com/index.php/topic,6466.msg1390181.html#msg1390181)option.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 22, 2014, 12:47:12 PM
I know, what I do not know is will it be 'always on' also, I am still grinding on it (or should I say Koding) when I am not working on other stuff.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 22, 2014, 12:47:58 PM
I have not reached my 'give up' point yet.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 22, 2014, 05:03:18 PM
 Going to log in and give it another go tomorrow, unless of course I check on my experiments tomorrow morning and find a fresh error. I got some tweaks from my Python buddy I got to try.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 23, 2014, 11:17:08 AM
That is awfully funky, apparently Python uses the indentation itself to signal an end to a block of code.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 23, 2014, 01:03:45 PM
Hey Peter,

New error that requires your attention:

Quote
an integer is required
Traceback (most recent call last):
  File "client.py", line 147, in <module>
  File "socket.pyc", line 224, in meth
TypeError: an integer is required

The command line I am sending to it is
Code: [Select]
-in "D:\in" -out "D:\out" -pid  2820 -name "Newbie 8907" -port "????" -server "??.??.??.??"
I can pm you port and ip if you want.

At first I thought it was the "pid" so I put it back in, can I take the pid out completely as we are not using it?

attached is my mod of the server side, not much changed on it except I added a debug line to print to my terminal.

btw Peter, this off the setup bundle with version 2.47.02
Title: Re: IM is kinda, sorta working
Post by: Peter on August 23, 2014, 02:00:55 PM
Silly, I'm not casting the port to a int.  :unsure:
Updated client attached.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 23, 2014, 02:37:37 PM
[bump](Update tomorrow)
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 11:54:04 AM
hmm... Interesting, winzip 'Unknown Permission method'
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 11:57:20 AM
Got it.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 12:21:56 PM
Peter, you compiled it in 64bit. I need it 32bit... thx
Title: Re: IM is kinda, sorta working
Post by: Peter on August 24, 2014, 12:31:57 PM
Added
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 01:17:30 PM
Nice! New error, assuming the source is matching the compiled client side. Attached is the latest problemo:

Quote
[Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected ost has failed to respond
Traceback (most recent call last):
  File "client.py", line 151, in <module>
  File "socket.pyc", line 224, in meth
error: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 01:25:10 PM
lol they keep changing the port range on me, let me give this one more try here
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 01:30:21 PM
fresh one,fresh one!

Quote
Quote
sending D:\out\140824132806The One (1G)(Shen)-23.04.05.txt12.dbo
invalid literal for int() with base 10: 'HTTP/'
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: 'HTTP/'

Title: Re: IM is kinda, sorta working
Post by: Peter on August 24, 2014, 01:37:24 PM
HTTP?

Seems like the start of a http response. I'm doing nothing with http, hacked a own 'protocol' on top of tcp. Did you change the server in any way?
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 01:43:58 PM
I ran a "chmod +x server2.py" on it, thats all I am aware of.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 24, 2014, 01:53:35 PM
That would just set the execute bit, if I'm not mistaken.

Did it work at first, or is this the first you get when you start the client? Does the server print anything of a accepted connection?

The http bit is weird. When I send a http request to it I get a http 404 back. But with the client I get nothing from it, get a(Errno 10060,  timeout).

No http error with the client, yet.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 01:57:16 PM
Quote

Did it work at first, or is this the first you get when you start the client? Does the server print anything of a accepted connection?

The http bit is weird. When I send a http request to it I get a http 404 back. But with the client I get nothing from it, get a(Errno 10060,  timeout).

No http error with the client, yet.

This is the first time I got this far actually. Let me put the VM back on, sec
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 02:03:58 PM
Oky Doky , VM back online
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 02:05:56 PM
Peter, please join me for an Darwinbots IRC session, up now.
My bro is saying quote: "yeah it is TCP, I have no idea where the HTTP is coming from, since you used python socket"
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 03:25:58 PM
Quote
shameless whatsup
shameless whatsup
Corrupt header
shameless whatsup
shameless whatsup
Corrupt header
shameless whatsup
shameless whatsup
invalid literal for int() with base 10: 'GET /'
shameless whatsup
shameless whatsup
Corrupt header
shameless whatsup
shameless whatsup
invalid literal for int() with base 10: 'GET /'
shameless whatsup
shameless whatsup
Corrupt header
shameless whatsup
shameless whatsup
invalid literal for int() with base 10: 'GET /'
shameless whatsup
^CTraceback (most recent call last):
  File "server.py", line 239, in <module>
    ServerControl()
  File "server.py", line 145, in __init__
    inputready,outputready,exceptready = select.select(readList,writeList,[])
KeyboardInterrupt
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 03:26:34 PM
Still have no idea how we are going to work around the 'log-in' issue.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 03:28:54 PM
client side old error is back!

Quote
sending D:\out\140824152136The One (1G)(Shen)-23.04.05.txt12.dbo
invalid literal for int() with base 10: 'HTTP/'
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: 'HTTP/'
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 03:33:36 PM
Also after "Keyboard Interrupt" the damn thing dies on me.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 03:54:04 PM
ok, I am giving up on this one here, lets see if Panda can get it to work.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 04:09:22 PM
Panda what default IP you want me to put in there so I can post my final revision.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 24, 2014, 04:24:15 PM
The asked explanation for what it all means.

Corrupt header:  It didn't sent enough bytes in time. When enough bytes are in, it will still be seen as a real header. Should normally happen quite rarely. (as it means it didn't sent at least 5 bytes in one go, that's not a good connection)

invalid literal for int() with base 10: 'GET /':  (is the start of a HTTP GET request from a browser.) Server kicks client for breaking protocol.

invalid literal for int() with base 10: 'HTTP/': is a HTTP response from a server. Breaking protocol, client restarts.
Full string is : HTTP/1.1 400 Bad Request, which is a correct  response from http server from the junk that's sent at by the client,  but it's not supposed to end at a http server.

In case it wasn't clear, it's using TCP, which is also used by HTTP. (that's why it can receive data from a browser and do a initial connect to websites.)
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 24, 2014, 04:51:32 PM
So as long as a VM allows TCP based connections the code will work. Thx Peter I'll keep that in mind. Unfortunately there are no free TCP VMs I can hack unto to get it to work, and since I don't want to go trough the pain and trouble of maintaining my own VM it is best I leave it up to the people who know what they are doing.
Title: Re: IM is kinda, sorta working
Post by: vrukt on August 29, 2014, 01:13:04 AM
Is IM over LAN possible right now?
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 29, 2014, 01:26:36 PM
Yes, it is. Just replace the .exe with a copy from LocalIM folder.
However, never tested it on a true Lan. Let me know if it works.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 29, 2014, 05:12:06 PM
Aside from localIM(I don't have a clue how it works) you should be able to run the IMserver.exe that's around somewhere here and let the clients connect to that (LAN)  IP.

Asdie that, I might have access to a usable VPS soonish.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 29, 2014, 06:47:12 PM
Awesome!

LIM works by simply moving a file of a timer.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 29, 2014, 07:53:47 PM
Currently running at

IP: 198.50.150.51
Port: 80

Didn't yet find a reason on why I can't use the port I wanted. But I'll fix that later.
Title: Re: IM is kinda, sorta working
Post by: vrukt on August 29, 2014, 08:03:00 PM
I'm in! Worked well until I tried to get robotdata by clicking on a bot... then it locked up. Trying to troubleshoot it now.

*edit*Ya, seemed to be just a 1 off issue, it's working fine now.

Seeing your multiply just eat everything, I keep adding in bots trying to overwhelm it, but it's resilient.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 29, 2014, 08:58:21 PM
I do not know how you did it Peter but you are good. I will play with it tomorrow. Is it an always on signal now?
Title: Re: IM is kinda, sorta working
Post by: Peter on August 30, 2014, 05:56:37 AM
It should be always on. When I just checked it was offline, but that may be because I may not have run it as a background process.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 02:47:29 PM
its alive! :happy:
Title: Re: IM is kinda, sorta working
Post by: vrukt on August 30, 2014, 03:37:42 PM
Oh ok! I noticed it was down last night, but I had just been fiddling with my router, and thought I had messed something up, didn't have the time to troubleshoot, but sure am glad it was on your end Peter :D
Title: Re: IM is kinda, sorta working
Post by: Peter on August 30, 2014, 04:02:03 PM
A heads up, the current port where it's running will change.
Curiously high range ports don't seem to work properly, so I'll keep it low. Second server is already up at port 79. I'll takeout the 80 port server next week, as I have other plans for that port.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 04:50:05 PM
Hey Peter, I had some experience where I have sent close to 200 robots before getting any back. And am getting the following once in a while:

Quote
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830164518Base.txt114.dbo
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: ''

Also, when I am about to start posting a message on the forum it magically starts working! Alright, lets see what happens when I log off the forum.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 04:55:30 PM
meh,

Quote
[Errno 10061] No connection could be made because the target machine actively re
fused it
Traceback (most recent call last):
  File "client.py", line 151, in <module>
  File "socket.pyc", line 224, in meth
error: [Errno 10061] No connection could be made because the target machine acti
vely refused it
Title: Re: IM is kinda, sorta working
Post by: Peter on August 30, 2014, 05:38:03 PM
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830164518Base.txt114.dbo
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: ''
Let me know if you get this message more often, error is coincidentally with getting bots back. My sim connected to server 79 is quite slow  with 3k bots,  which may also account for  slow sendback.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 06:35:45 PM
Here is a fresh run after I implemented my latest 'mod'

Quote
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_1
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_2
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_3
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_4
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183342Base.txt12.dbo
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: ''
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 06:36:24 PM
Not too bad so far.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 06:38:56 PM
Quote
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_1
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_2
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_3
received C:\Users\Owner\Darwinbots2\IM\inbound/neworganism_4
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183342Base.txt12.dbo
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: ''
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183417Base.txt16.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183417Base.txt15.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183354Alga_Minimalis_Chloro
plastus.txt14.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183352Alga_Minimalis_Chloro
plastus.txt13.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183340Mutate.txt11.dbo
server got no bots
server got no bots
server got no bots
server got no bots
server got no bots
server got no bots
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830183625Base.txt17.dbo
invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "client.py", line 154, in <module>
  File "client.py", line 68, in _run
  File "client.py", line 109, in _recvFile
  File "client.py", line 145, in decode_length
ValueError: invalid literal for int() with base 10: ''

What is interesting here is that the server has no bots after reserving at least 7.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 06:47:18 PM
Quote
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830184219Alga_Minimalis_Chlor
plastus.txt118.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830184206Alga_Minimalis_Chlor
plastus.txt117.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830184158Alga_Minimalis_Chlor
plastus.txt116.dbo
server got no bots
sending C:\Users\Owner\Darwinbots2\IM\outbound\140830184113Base.txt115.dbo
server got no bots

Here is another sample for you. I am currently running in my eco_evo mode. I am going to put more stress on the cpu by running stuff parallel to simulate more realistic conditions. Unfortunately, that means I have to not physically use my viao because the video card has a recent tendency to overheat. Update tomorrow. Hope I do not get hacked overnight somehow.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 06:52:35 PM
On a final note, it is looking like something happened to the server side, not sure what though. I am clearly not getting any robots and it says server has none.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 07:05:11 PM
Hey peter, it is looking like a dos attack on the server. Someone just trysted to dos me, I ended up switching wifis.
Title: Re: IM is kinda, sorta working
Post by: vrukt on August 30, 2014, 07:27:16 PM
Would like to add I got the same "invalid literal for int() with base 10" after a few bots went back and forth.

I see yours Botsareus. They seem to be killing my poor triple spinner.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 30, 2014, 07:44:27 PM
Hey vrukt, go to my post at simulation emporium, join the eco_evo simulation fun.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 31, 2014, 05:26:25 AM
Minor change in how the client works. If you see "waiting...",the client likely just avoided the earlier error. Post if you see it.

What do you mean with a DoS attack, bot? I don't see any issues with the server.

The message "the server has no bots" might be a bit misleading. It only sends back bots from others, it might have 10k bots in storage only from you and still say it.

It's 32 bit
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 31, 2014, 11:07:29 AM
Thank you for the update. I did not get hacked over night too bad. I thought I had a dos because svn was lagging real bad until I switched over to a different WiFi.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 31, 2014, 11:31:47 AM
Peter, please give me the ".py" file also. I am going to run some tests on Tuesday and do a brand new drop.
Title: Re: IM is kinda, sorta working
Post by: Peter on August 31, 2014, 12:46:32 PM
Here ya go.
Title: Re: IM is kinda, sorta working
Post by: Botsareus on August 31, 2014, 12:47:06 PM
TY!