java - Hosting a runnable jar file (Discord bot) on a web server (Heroku) -
i finished creating simple discord bot in runnable jar. (as disclaimer, when comes web, i'm noob.) looking way freely run online , read these vps sites, none of them offered unlimited free plans. stumbled site called heroku, allows me run portion of month. i've figured out, there 1 error i've been unable fix:
error r10 (boot timeout) -> web process failed bind $port within 90 seconds of launch
my discord bot not connect heroku's server , think thats problem, have no clue how fix it. has encountered similar problem? going hosting bot right way? thanks.
edit: here full logs:
2016-06-11t17:00:56.792783+00:00 app[web.1]: 17:00:56.792 [main] debug d.btobastian.javacord.impldiscordapi - requested gateway wss://gateway.discord.gg (token: **************************************************ndxxxw0oq) 2016-06-11t17:00:56.765456+00:00 app[web.1]: 17:00:56.765 [main] debug d.btobastian.javacord.impldiscordapi - requesting gateway (token: **************************************************ndxxxw0oq) 2016-06-11t17:00:57.199263+00:00 app[web.1]: 17:00:57.199 [readingthread] debug d.b.j.utils.discordwebsocketadapter - sending connect packet 2016-06-11t17:00:57.267527+00:00 app[web.1]: 17:00:57.267 [readingthread] debug d.b.j.utils.discordwebsocketadapter - received ready-packet! 2016-06-11t17:00:57.270636+00:00 app[web.1]: 17:00:57.270 [readingthread] debug d.b.j.utils.discordwebsocketadapter - updating status (game: none, idle: false) 2016-06-11t17:01:38.508359+00:00 app[web.1]: 17:01:38.507 [pool-2-thread-1] debug d.b.j.utils.discordwebsocketadapter - sending heartbeat (interval: 41250) 2016-06-11t17:02:19.751552+00:00 app[web.1]: 17:02:19.751 [pool-2-thread-1] debug d.b.j.utils.discordwebsocketadapter - sending heartbeat (interval: 41250) 2016-06-11t17:02:22.866430+00:00 heroku[web.1]: error r10 (boot timeout) -> web process failed bind $port within 90 seconds of launch 2016-06-11t17:02:23.649874+00:00 heroku[web.1]: process exited status 137
so application not interact heroku server , "times out" appartently. when run locally, well, when upload heroku application, "times out." i've looked ways bind $port been unsuccessful far. i've inluded in procfile no results:
web: java $java_opts -dserver.port=$port -jar ideaprojects.jar --host=0.0.0.0 --port=$port
i've never interacted ports before, can me out? again.
edit2: tried run bot through "java-getting-started" adding java code end of theirs. heroku doesn't crash, seems bot doesn't run either.
heroku hosting web applications. not intended hosting processes aren't part of web application you're running on heroku, , trying run such process not work well.
you need vps host bot. yes, have pay this.
Comments
Post a Comment