1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

Solved java.net.BindException on IP / Port unused

Discussion in 'Support' started by boboman13, Aug 24, 2013.

Thread Status:
Not open for further replies.
  1. boboman13

    boboman13 Member Contributor

    Hello.
    Upon using the latest build (literally just downloaded it 30 seconds ago) and the correct version of java (thanks Coelho) I got a BindException on an unused IP and Port. Here is the error:
    Code (text):
    [LilyPad] build 65 of AllInOne
    [LilyPad] fatal error: services
    java.net.BindException: Address already in use
            at sun.nio.ch.Net.bind0(Native Method)
            at sun.nio.ch.Net.bind(Net.java:444)
            at sun.nio.ch.Net.bind(Net.java:436)
            at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
            at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
            at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:101)
            at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:478)
            at io.netty.channel.DefaultChannelPipeline$HeadHandler.bind(DefaultChannelPipeline.java:1000)
            at io.netty.channel.DefaultChannelHandlerContext.invokeBind(DefaultChannelHandlerContext.java:453)
            at io.netty.channel.DefaultChannelHandlerContext.bind(DefaultChannelHandlerContext.java:438)
            at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:842)
            at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:193)
            at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:321)
            at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366)
            at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
            at java.lang.Thread.run(Thread.java:724)
    Also, using the following command gives no output
    Code (text):
    netstat -tulpn | grep :25572
    Here is my config file
    Code (text):
    {
      "proxy": {
        "bind": {
          "address": "69.46.74.62",
          "port": 25572
        },
        "outbound": {
          "address": "0.0.0.0"
        },
        "servers": [
          {
            "domain": "*",
            "server": "main"
          },
          {
            "domain": "creative.bobotropolis.com",
            "server": "creative"
          },
          {
            "domain": "pvp.bobotropolis.com",
            "server": "pvp"
          }
        ],
        "motd": "\u00265\u0026oBobotropolis \u0026f- \u0026aCreative is UP!",
        "playerMaximum": 100,
        "authenticate": true,
        "throttle": 2500,
        "tabEnabled": true,
        "localeFull": "You seem to be already logged in, please try again.",
        "localeOffline": "The requested server is currently offline. Please try again later!",
        "localeLoggedIn": "You seem to be logged in from another location, please try again.",
        "localeLostConn": "Lost connection... Please try to reconnect",
        "localeShutdown": "The server is being restarted. Please try to reconnect soon."
      },
      "queryTcp": {
        "bind": {
          "address": "0.0.0.0",
          "port": 5555
        }
      },
      "queryUdp": {
        "bind": {
          "address": "0.0.0.0",
          "port": 25572
        }
      },
      "connect": {
        "bind": {
          "address": "69.46.74.62",
          "port": 5091
        },
        "logins": [
          {
            "username": "main",
            "password": "~removed~"
          },
          {
            "username": "creative",
            "password": "~removed~"
          },
          {
            "username": "pvp",
            "password": "~removed~"
          }
        ]
      }
    }
    Is this an error or is this my fault?
  2. Stilldabomb

    Stilldabomb New Member

    Your queryUdp and bind are trying to use the same port. :p
  3. Stilldabomb

    Stilldabomb New Member

    And just to clarify on this, bind exceptions are almost never an error in the code, unless you set a port to a hard coded port in the code, which there should never be. I'm talking about any socket based project, not just LilyPad.
  4. boboman13

    boboman13 Member Contributor

    I managed to fix this, turns out a client of mine was using the :5555 port. We worked it out!

    Thanks for the help @Stilldabomb. This thread may be locked! :p
  5. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Marked as solved and locked

    Please open a new topic for further questions
Thread Status:
Not open for further replies.

Share This Page