Unable to serve on http://localhost:8080

What is LocalHost: 8080

When we are talking about “HTTP,” we always assume port 80 of your device is in play. By default, your internet browser will automatically use that port when you type in an address, unless you specify a different port.

When you are running a web server on your computer, you obviously will need to access that server somehow--and since port 80 is already busy, you will need to use a different port to successfully connect to it. For this reason, your server is usually pre-configured to use port 8080.

So, when you are attempting to access your server, you would type in:

http:// (protocol) localhost (your computer) :8080 (port 8080) / (path pointing to the root of the public folder of your server)

What Does This Look Like for Ether Apps?

Before diving in, it’s important to note that all ether apps run inside of an ethers “container.” For reference, there is an ethers container running at http://ethers.io, which was provided by ethers author, Richard Moore. The developer documents help shed some light behind the “container” infrastructure.

Issues involving localport:8080, typically involve some issue with the user not receiving the “ethers ready now!” message. This will prevent you from accessing your app inside the local running instance of the ethers container and will serve your app at http://ethers.io.

FAQs

  • Before proceeding, please make sure that you have included the ethers-app.js script is included in your HTML.
  • Your HTML may contain a syntax error, such as not correctly closed with a pointy bracket. Something this minimal will create the error preventing you from seeing the “ethers ready now!” message
  • If you get the following message or a variation of sorts, this may prevent you from serving locally, due to some problem with the local port 8080.

One user-solution presented is that you can access your app locally by visiting:

http://localhost:8080/#!/app-link-insecure/localhost:8080/

All you need to do with yours is REPLACE “ethers.io” in the URL above with “localhost:8080”.

This will force serve your app inside the locally running instance of the ethers container, rather than the container running at http://ethers.io

For more assistance on this, please visit Blockgeeks for a live thread on this issue.

serving content from file:///Users/username/blockgeeks/3_decentralisedApps/explorerapp

Listening on port: 8080

Local Application Test URL:

mainnet: http://ethers.io/#!/app-link-insecure/localhost:8080/

ropsten: http://ropsten.ethers.io/#!/app-link-insecure/localhost:8080/

rinkeby: http://rinkeby.ethers.io/#!/app-link-insecure/localhost:8080/

kovan: http://kovan.ethers.io/#!/app-link-insecure/localhost:8080/

Why Am I Getting This Message?

If you are getting a local server failure, you will need to look at:

  1. Whether the server started
  2. Was the server started at the expected port?

Did the Server Start?

If the console window is still open, the expected message is:

Domain domain Started, where domain is the name of the default domain. This indicates that the default domain was started successfully.

If the console window is already closed, check for messages in the log file:

install_dir/domains/domain1/logs/server.log

If startup was successful, the expected message is similar to that on the console, and appears at the end of the log file:

[INFO][...][..][date&time][Application server startup complete .]

Was the Server Started at the Expected Port?

The server might be running at a different port number than expected, either because it was intentionally installed there, or because another server was already running on the default port when the server was installed.

Oracle has a great guide on this.

In determining which port number the server is actually using:

1. Examine the server’s configuration profile

install_dir/domains/domain1/config/domain.xml

2. Find the http-listener element

3. Inspect the value of the port attribute, and be sure to enter the correct port number when invoking the server.

Remember, the server’s default port number is 8080. So how can that expected value change?

  1. A different port number was specified during installation
  2. A previous installation exists
  3. If the specified port number is already taken by another application when the server is started, the port number rolls forward to the next available number. For example, if a server is already running on the default 8080 port, the new Application Server instance uses port number 8081. If two services are running, the port number rolls to 8082, and so on.
Start buying and trading cryptocurrency
Sign up and start opportunities with the future of currency
Sign Up Now