Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:04:16+00:00 2026-06-18T08:04:16+00:00

I have to execute a compiled Java server through an ant task for an

  • 0

I have to execute a compiled Java server through an ant task for an assignment so that I can build a client for it.
I don’t have the code of the server but it’s supposed to run on the 8181 port of the localhost after being launched. It’s working in windows and on other linux machines but I cannot run on this one (crunchbang).
This is the error I get:

BUILD SUCCESSFUL
Total time: 1 second
root@drne:/home/wallen/uni/workspace/A5# ant run-server
Buildfile: /home/wallen/uni/workspace/A5/build.xml

setseed:

run-server:
     [java] Exception in thread "main" com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address
     [java]     at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:102)
     [java]     at com.sun.xml.internal.ws.transport.http.server.HttpEndpoint.publish(HttpEndpoint.java:63)
     [java]     at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:171)
     [java]     at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:113)
     [java]     at javax.xml.ws.Endpoint.publish(Endpoint.java:240)
     [java]     at it.polito.dp2.PJS.lab5.PJSInfoServer.main(Unknown Source)
     [java] Caused by: java.net.BindException: Cannot assign requested address
     [java]     at sun.nio.ch.Net.bind0(Native Method)
     [java]     at sun.nio.ch.Net.bind(Net.java:344)
     [java]     at sun.nio.ch.Net.bind(Net.java:336)
     [java]     at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
     [java]     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
     [java]     at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:98)
     [java]     at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
     [java]     at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
     [java]     at com.sun.net.httpserver.HttpServer.create(HttpServer.java:129)
     [java]     at com.sun.xml.internal.ws.transport.http.server.ServerMgr.createContext(ServerMgr.java:84)
     [java]     ... 5 more
     [java] Java Result: 1

Things I’ve tried:

  • checking if there is another server running on that port
  • running it as su
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:04:17+00:00Added an answer on June 18, 2026 at 8:04 am

    I managed to fix what was giving me this error and as I supposed at the beginning of the matter it was not related to any java code: my loopback interface was weirdly down.
    ifconfig lo up did the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Java code that connects to an SQL server DB but I cannot
I have a C++ application that works and compile perfectly. I can execute and
I have a client/server program that attempts to send and receive an object. There
I have a bytecode weaver that I want to execute during the eclipse build.
I have an Ant script that I would like to execute using a button
I have a code/class/script in JAVA that I want to be executed when someone
I have a Java app that use a bunch of JNI calls to execute
I have some lisp initialisation code: (eval-when (:compile-toplevel :load-toplevel :execute) (require 'asdf)) (eval-when (:compile-toplevel
I have a report to which I have execute-only access - I don't have
I have an Execute SQL task (SQL 2008) where I'm using two SSIS variables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.