jabbink / PokemonGoBot

DEFUNCT - Bot that plays Pokemon Go
https://www.pogobot.club/
GNU General Public License v3.0
559 stars 233 forks source link

Anyway to run the bot again without restarting computer? #1175

Closed IgnitEngineer closed 8 years ago

IgnitEngineer commented 8 years ago

Hey guys, whenever i stop running the bot and try to start it again, this is what happens:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:62) at org.springframework.boot.loader.Launcher.launch(Launcher.java:104) at org.springframework.boot.loader.Launcher.launch(Launcher.java:61) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) ... 3 more Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use at io.undertow.Undertow.start(Undertow.java:186) at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainer.start(UndertowEmbeddedServletContainer.java:121) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:293) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760) at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360) at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) at ink.abb.pogo.scraper.MainKt.main(Main.kt:89) ... 8 more Caused by: java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:433) at sun.nio.ch.Net.bind(Net.java:425) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:190) at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243) at io.undertow.Undertow.start(Undertow.java:142) ... 19 more

I just want to know if anyone knows how to fix this without restarting computer? I try to use lsof to find the ports to kill but there ware too many!

jabbink commented 8 years ago

Hi @IgnitEngineer,

It looks like there is some information missing from your ticket that will be needed in order to diagnose and fix the problem at hand. Please take a look at the Contribution Guidelines and default Issue template (the one you did not follow), which will tell you exactly what your ticket has to contain in order to be processable.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two days (until 2016-08-21 14:45) I'll close this ticket so it doesn't clutter the bug tracker.

Best regards, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

MacDogg commented 8 years ago

Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use The fix for this is to change your port in the config file or by launching the bot with a switch. I'll have to check for the exact code... In config.properties _gui_portsocket=8001 Change that to another port. Start the bot like this and change the XXXX to another port: java -jar PokemonGoBot.jar --server-port=XXXX, maybe that will override the gui_port_socket entry?

Sieberkev commented 8 years ago

FAQ

Taraegon commented 8 years ago

You probably have Windows. On the off chance you run OSX: Ctrl-C in your Terminal. Then open your Monitor. You can find that in the Utilities folder. Look for the Java process. Force quit. In Terminal relaunch your bot. Enjoy.

Muwai commented 8 years ago

@IgnitEngineer

Type this into Terminal:

lsof -n -i4TCP:8080

Now type: kill -9 PID

PID = the Process ID that the first command gave you.

Now type the regular command: java -jar PokemonGoBot-0.6.0.jar

It happens to me when my Mac is using a Java process such as Oldschool Runescape. Works every time.

patzor commented 8 years ago

or when in terminal just do:

killall -9 java

but make sure there is no other java running aside from bot :P cheers

jabbink commented 8 years ago

Since apparently some of the required information is still missing, I'm closing this now, sorry. Feel free to reopen this or create a new issue once you can provide all required information.