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 132569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:17:00+00:00 2026-05-11T06:17:00+00:00

I have had no trouble getting the sockets working with localips, but once I

  • 0

I have had no trouble getting the sockets working with localips, but once I made the code change to use public ips, I’ve consistently gotten java.net.ConnectException.

I am using the port 8084, which as far as I know, is not used elsewhere In the command prompt, netstat -a | grep 8084 shows: File STDIN: TCP user-9114eb19a8:8084 user-9114eb19a8:0 LISTENING

I have gone into my router and ensured that it is open I get my public ip using a request to http://www.whatismyip.org

Server:

serverSocket = new ServerSocket (8084); 

Client:

socket = new Socket (hostaddr, 8084); //hostaddr is a string containing my public-IP //it works when the program is run on a localnetwork and I am using my local-ips 
  • 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. 2026-05-11T06:17:00+00:00Added an answer on May 11, 2026 at 6:17 am

    What type of router? Don’t forget that even though a port may be open on your router, you need to have your router Forward port 8084 to the destination computer’s internal IP, otherwise because of Network Address Translation (NAT) the router/firewall doesn’t know what to do with the traffic once it gets there.

    For example say your Client PC is in California with the IP 10.1.1.100, with a router using public IP of 70.62.50.42.

    Your Server PC is in New York with an IP 192.168.1.121, that is behind a router with internal IP 192.168.1.1 and public IP 40.20.26.63. You will need to make sure that you go into the router and forward port 8084 (TCP) to internal address 192.168.1.121 (the internal Server PC).

    Depending on the level of your router this terminology will be Port Forwarding, Virtual IPs, or Static NAT Translation (there are a few others but you get the idea).

    You won’t have to adjust any settings on the Client router, because that router already knows how to route your request out to the internet.

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

Sidebar

Related Questions

This seemed like it should be easy, but I have had trouble getting it
I'm working on an iOS app and have had some trouble with getting photos
I have had nothing but trouble with Winsock since I started using it. I
This question may have been asked before, but I had trouble finding an answer,
I have had trouble getting web pages to load within Cassini for about a
I have a problem with some excel code that I am having trouble getting
This is something that I have had trouble with in the past and it's
I have had incredible trouble building a binary of ffmpeg for Mac that works
I am having trouble with the following SQL statement. I have had this issue
I have had a few problems getting this right, so I wanted to ask

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.