Author Topic: Error Wont stay connected  (Read 8203 times)

0 Members and 1 Guest are viewing this topic.

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Error Wont stay connected
« on: November 05, 2007, 12:03:35 am »
im getting this error any ideas anyone?

ArtOfWar: [23:56:37.734] java.io.IOException: Connection lost
ArtOfWar: [23:56:37.735] bot.PacketThread.run(PacketThread.java:145)
java.net.SocketException: Socket closed
       at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
       at java.net.SocketOutputStream.write(SocketOutputStream.java:124)
       at bot.PacketThread.send(PacketThread.java:254)
       at bot.BotCore.sendPacket(BotCore.java:127)
       at PluginMain$GetAd.run(PluginMain.java:165)
       at bot.BotCore$JOTimerTask.run(BotCore.java:1011)
       at java.util.TimerThread.mainLoop(Timer.java:432)
       at java.util.TimerThread.run(Timer.java:382)
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline 3ICE

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Error Wont stay connected
« Reply #1 on: November 05, 2007, 05:02:20 am »
warden?

(SC bots automatically disconnect after 2 minutes)

(there is no way to fix it yet)

(use a war3 bot until someone breaks warden)

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #2 on: November 05, 2007, 06:41:14 am »
Thanks for the help but now I got a new error.........  Also I cant seem to figure out how to change the BNLS server under liux. I was able to sign on with windows java off desktop but this linux is killing me

ArtOfWar: [06:44:27.485] NOTICE: Bot 'ArtOfWar' has been started.
ArtOfWar: [06:44:27.505] DEBUG: Entering disconnect()
ArtOfWar: [06:44:27.509] DEBUG: Entering connect()
ArtOfWar: [06:44:27.620] INFO: Trying BNLS server: bnls.valhallalegends.com
ArtOfWar: [06:44:27.705] INFO: Resolving ip for server: useast.battle.net
ArtOfWar: [06:44:27.740] INFO: Resolves to 12 different addresses
ArtOfWar: [06:44:27.745] INFO: Choosing address 5 [useast.battle.net/63.240.202.139]
ArtOfWar: [06:44:27.760] INFO: Attempting to connect
ArtOfWar: [06:44:27.879] INFO: Connected to /63.240.202.139:6112
ArtOfWar: [06:44:27.886] INFO: Trying BNLS server: bnls.valhallalegends.com
ArtOfWar: [06:44:27.907] INFO: Connected to useast.battle.net:6112
ArtOfWar: [06:44:27.911] INFO: Sending protocol byte (0x01).
ArtOfWar: [06:44:27.914] INFO: Switching to Binary protocol.
ArtOfWar: [06:44:27.919] INFO: Sending authorization.
ArtOfWar: [06:44:28.104] INFO: Authorization sent, waiting for reply.
ArtOfWar: [06:44:28.108] INFO: Beginning to receive packets
ArtOfWar: [06:44:28.125] DEBUG: Logon type: 2
ArtOfWar: [06:44:28.129] DEBUG: Server token: 14d9d8e5
ArtOfWar: [06:44:28.135] DEBUG: UDP Value: 1280017
ArtOfWar: [06:44:28.152] DEBUG: MPQ Time: Tue Aug 29 14:32:34 EDT 2006
ArtOfWar: [06:44:28.160] DEBUG: Version Check MPQ: ver-IX86-5.mpq
ArtOfWar: [06:44:28.164] DEBUG: Server signature is present.
ArtOfWar: [06:44:28.170] INFO: Checking server's signature...
ArtOfWar: [06:44:28.200] INFO: Server successfully authenticated -- it's Blizzard's
ArtOfWar: [06:44:28.435] DEBUG: Client token: 0x5c9c3ce6
ArtOfWar: [06:44:28.438] DEBUG: Version Hash: 0x11404ba
ArtOfWar: [06:44:28.442] DEBUG: Checksum: 0x519bc165
ArtOfWar: [06:44:28.445] DEBUG: CDKey owner: l)rugs(R)Us
ArtOfWar: [06:44:28.466] INFO: CDKey and Version check sent.
ArtOfWar: [06:44:28.474] exceptions.InvalidVersion: Old game version (it wants you to download WAR3_IX86_120E_121A_enUS.mpq)
ArtOfWar: [06:44:28.474] Login.getLogin(Login.java:183)
ArtOfWar: [06:44:28.475] PluginMain.processedPacket(PluginMain.java:333)
ArtOfWar: [06:44:28.475] pluginmanagers.PluginRegistration.processedIncomingPacket(PluginRegistration.java:722)
ArtOfWar: [06:44:28.476] bot.PacketThread.run(PacketThread.java:179)
« Last Edit: November 05, 2007, 07:22:23 am by xgreedyx »
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Error Wont stay connected
« Reply #3 on: November 05, 2007, 12:40:59 pm »
I know there's an option to change it, but I'm not sure where the configuration file is. Check in the bot folder, and in ~/.javaop/

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #4 on: November 05, 2007, 03:21:29 pm »
If I run on my PC I see that file. But when running on the linux server it don't exist.
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #5 on: November 05, 2007, 06:04:56 pm »
Never mind All is well after I found were to change blns in /root
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Error Wont stay connected
« Reply #6 on: November 05, 2007, 10:28:57 pm »
Why are you running javaop as root? You should always work in a user account, and use sudo if needed. Avoid logging in as root whenever possible!

Also, when you are root, ~ == /root

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #7 on: November 06, 2007, 12:56:11 am »
Im just learning Linux as a server admin and its very complicated. I'm trying to do to much I guess and as for the root thing I guess thats a big no from what I hear.

Everytime I try to install something or do anything new its takes me for ever. I have to search and read like a mofo. But I guess thats a big flaw I should look into because I also run a teamspeak server under root. I'm going to search on how to make a user account. I been so tied up on admining my website with nuke-evo and mysql lol.

I can say though I love my dedicated linux server and being able to to thing like this that I love doing. Also I hate Plesk8 lol but i only use it to access MySQL & create ftp accounts etc... Although I know I could do this all from a shell but wow that set me back even more.

Thanks again

P.S. How do I keep it running in background.........
I tryed java -jar JavaOp2.jar& and java -jar JavaOp2.jar & But no luck. When I close Putty or type exit I still see chat on the screen and it go's bacl to the shell promp were I can type normal commands like ps aux or cd etc.. Any ideas what I'm doing wrong?
« Last Edit: November 06, 2007, 01:05:53 am by xgreedyx »
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Falcon

  • Full Member
  • ***
  • Posts: 241
  • I haven't visited my profile!
    • View Profile
Re: Error Wont stay connected
« Reply #8 on: November 06, 2007, 01:59:02 am »
Just type adduser into bash and it will prompt you to enter all the info such as username/password etc.

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #9 on: November 06, 2007, 02:19:48 am »
Didn't work here is error......... Also I got it to stay running in the background I just used different command to name it so I can close and reopen in putty at a later time. I remembered this from my Counterstrike Source Server.

login as: root
root@clanaow.org's password:
Last login: Tue Nov  6 02:22:49 2007 from 4-234.187-72.tampabay.res.rr.com
Have a lot of fun...
u15176807:~ # adduser
-bash: adduser: command not found
u15176807:~ #




It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Error Wont stay connected
« Reply #10 on: November 06, 2007, 02:30:03 am »
Try useradd.

If that doesn't work, try prepending both of those with /usr/sbin and /sbin.

As a tip, Google will almost always turn up a viable solution for things like this if your search query is descriptive enough, ie "add user linux" or "adding a user in linux".

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Error Wont stay connected
« Reply #11 on: November 06, 2007, 02:38:22 am »
Or, you can access Linux material exclusively from: http://www.google.com/linux
And like a fool I believed myself, and thought I was somebody else...

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Error Wont stay connected
« Reply #12 on: November 06, 2007, 02:45:02 am »
Or, you can access Linux material exclusively from: http://www.google.com/linux

Is it just me, or is that worded in a very misleading way? :)

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Error Wont stay connected
« Reply #13 on: November 06, 2007, 02:45:39 am »
Haha, yes, yes it is.  I'm sure you could move those words around and get something better.  I think in a different order then what makes grammatical sense.  You'll notice quite a few of my posts are like this.  :P
And like a fool I believed myself, and thought I was somebody else...

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Error Wont stay connected
« Reply #14 on: November 06, 2007, 01:17:35 pm »
P.S. How do I keep it running in background.........
I tryed java -jar JavaOp2.jar& and java -jar JavaOp2.jar & But no luck. When I close Putty or type exit I still see chat on the screen and it go's bacl to the shell promp were I can type normal commands like ps aux or cd etc.. Any ideas what I'm doing wrong?

Don't be confused by the behavior of backgrounded processes; the stdout will still be directed to your terminal window, but stdin will still go to your shell.

If you wish to run it as a deamon, you can try modifying this script that I use for my bot, which will save the pid and stdout/stderr to files (bnubot.pid, stdout.txt, stderr.txt):
#!/bin/sh
PIDFILE=bnubot.pid
if [ -f $PIDFILE ] ; then
        echo "it is still running"
else
        echo "starting a new one"
        java -jar BNUBot.jar -plugins net.bnubot.bot.html.HTMLOutputEventHandler > stdout.txt 2> stderr.txt &
        pid=$!
        echo $pid > $PIDFILE
fi

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline Ender

  • x86
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: Error Wont stay connected
« Reply #15 on: November 06, 2007, 10:50:53 pm »
Use the command nohup. That way, when you end a terminal session, the program doesn't die.

nohup java -jar javaop.jar &

or something like that

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #16 on: November 06, 2007, 11:22:46 pm »
I'm not sure how I would do that, but I have an idea. (I'm not a complete noob!! LOL) I would take that code and put in a text. What  do you think I should name the whole file? After I decide that how should I start it or make sure that I am using the correct commands? I bought this "Linux book for Dummies", but I think I should find a better one, which has more information about running a dedicated server. My book goes over all the different types of Linux OS that is available. It explains how to install applications as well, but it shows it using the GUI.
Code: [Select]
#!/bin/sh
PIDFILE=bnubot.pid
if [ -f $PIDFILE ] ; then
        echo "it is still running"
else
        echo "starting a new one"
        java -jar BNUBot.jar -plugins net.bnubot.bot.html.HTMLOutputEventHandler > stdout.txt 2> stderr.txt &
        pid=$!
        echo $pid > $PIDFILE
fi

P.S. Blaze.....
I use google all the time and read and search when i'm confused or stuck. But I didn't come here for that root adduser problem. It was just brought up in conversation, so I thought what harm would it hurt to ask about it. I felt comfortable knowing that there were some knowledgable guys here and they seemed very helpful. My main point though... I always google before posting  ;D
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Camel

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
    • BNU Bot
Re: Error Wont stay connected
« Reply #17 on: November 07, 2007, 12:45:33 am »
Yes, paste that in to a file called "check.sh" and then do "chmod 755 check.sh" and "./check.sh"

<Camel> i said what what
<Blaze> in the butt
<Camel> you want to do it in my butt?
<Blaze> in my butt
<Camel> let's do it in the butt
<Blaze> Okay!

Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #18 on: November 07, 2007, 11:54:53 pm »
Yes, paste that in to a file called "check.sh" and then do "chmod 755 check.sh" and "./check.sh"

Ok will do ty so much you been a great help.....

I'm so siked though I been looking for a bot for our clan to setup on my box for 3years and I just found this lol You guys rock!
It Is What It Is...... With Out The Playa There Would Be No GAME!

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Error Wont stay connected
« Reply #19 on: November 08, 2007, 04:11:13 pm »
If I run on my PC I see that file. But when running on the linux server it don't exist.

Note that in Linux, a file name that starts with . isn't visible. Pass the -a argument (all) to ls to see them.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline xgreedyx

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • The Art Of War
Re: Error Wont stay connected
« Reply #20 on: November 11, 2007, 02:56:36 am »
thankyou.........
It Is What It Is...... With Out The Playa There Would Be No GAME!