Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Ivailo Hristov](https://secure.gravatar.com/avatar/efdd8e453136ed08984b330ef33e2dbd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ivailo Hristov
6,297 PointsProcess finished with exit code 100
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @838ms [Thread-1] INFO spark.embeddedserver.jetty.EmbeddedJettyServer - == Spark has ignited ... [Thread-1] INFO spark.embeddedserver.jetty.EmbeddedJettyServer - >> Listening on 0.0.0.0:4567 [Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.6.v20151106 [Thread-1] ERROR spark.embeddedserver.jetty.EmbeddedJettyServer - ignite failed java.net.BindException: Address already in use: bind 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.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326) at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80) at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.server.Server.doStart(Server.java:384) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at spark.embeddedserver.jetty.EmbeddedJettyServer.ignite(EmbeddedJettyServer.java:129) at spark.Service.lambda$init$1(Service.java:452) at java.lang.Thread.run(Thread.java:745)
Process finished with exit code 100
again and again, i already disconnecd two Main runners, refresh gradle project...
2 Answers
![Alexander Nikiforov](https://uploads.teamtreehouse.com/production/profile-photos/5494222/micro_IMG_0409.jpg)
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsLooks like you have to change port number.
ignite failed java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind0(Native Method) at
That is the error message : "Address is already in use".
Try writing
public static void main(String[] args) {
// code
port(9000);
// code
}
See docs here
The other option would be to find out which application is using port 4567
and try to kill it.
Will take more time and googling, but it is good to do it once for experience.
![Ivailo Hristov](https://secure.gravatar.com/avatar/efdd8e453136ed08984b330ef33e2dbd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ivailo Hristov
6,297 PointsThe problem is that I have written sign in instead sign-in... newbie job. Thank you very much for your answer
Ivailo Hristov
6,297 PointsIvailo Hristov
6,297 Pointsi put port code here
package com.teamtreehouse.courses;
import spark.ModelAndView; import spark.template.handlebars.HandlebarsTemplateEngine;
import java.util.HashMap; import java.util.Map;
import static spark.Spark.get; import static spark.Spark.port; import static spark.Spark.post;
public class Main {
}
but when i type my name and click Sign in - 404 not found and this message pop
[qtp1032579415-20] INFO spark.http.matching.MatcherFilter - The requested route [/sign%20in] has not been mapped in Spark for Accept: [text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8]
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsAlexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsThe message that you see:
[qtp1032579415-20] INFO spark.http.matching.MatcherFilter - The requested route [/sign%20in] has not been mapped in Spark for Accept: [text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8]
Indicates that you make a request to
/sign in
,i.e.sign
, space,in
, which is converted to%20
.So HTTP converts
/sign in
to/sign%20in
.I think there is a problem in your template file in
index.hbs
the buttonSign in
can be attached to asign in
instead ofsign-in
.Please post
index.hbs
file