Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Firewalls

How to Fix a Java Web App Not Reachable by IP Address on a VPS

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If your Java or Spring Boot app answers on localhost but not on the VPS public IP, check the layers in order: effective port, listening socket, bind address, VPS firewall, cloud ingress firewall, and any reverse proxy. A healthy JVM alone proves none of these. The most common direct-exposure fix is setting server.address=0.0.0.0, confirming the app is listening on the intended port (Spring Boot defaults to 8080 in a standalone application), and allowing that TCP port in both firewall layers. If a proxy owns ports 80 or 443, connect to those public ports instead of the Java backend port.

Start with the fault domain, not the Java process

“The service is running” and “the service is reachable by IP” are different statements. A JVM can remain active after the web server failed to start, listen on a different port, or bind only to loopback. A firewall can then discard traffic even when the listener is correct. Treat the path as separate checkpoints:

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. The application starts without a web-server error.
  2. An HTTP listener exists on the port you expect.
  3. The listener is bound to an interface that can receive the request.
  4. The VPS operating-system firewall permits the port.
  5. The cloud provider’s ingress or security-group firewall permits the source.
  6. A proxy or load balancer, if present, forwards the public request to the Java listener.

Test from inside out. The first checkpoint that fails narrows the repair; changing several settings at once makes the original fault harder to identify.

How the three core checks differ

Process

A Java PID only shows that a process exists. Startup may have selected a different profile, failed to create an embedded server, or started a non-HTTP worker. Read the current startup log and inspect the running deployment rather than relying on a checked-in configuration file.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Port

The port is the TCP number on which the HTTP server accepts connections. In a standalone Spring Boot application, the documented default main HTTP port is 8080; the value can be changed with server.port. A JVM listening on 9090 will not answer requests sent to 8080, even if every firewall rule is correct.

Bind address

The bind address determines which local interfaces accept packets. A listener on 127.0.0.1:8080 accepts loopback traffic only. That explains a successful curl http://127.0.0.1:8080/ alongside a failure against the VPS address. Binding to 0.0.0.0 asks the process to listen on all IPv4 interfaces; binding to a specific private interface is narrower and is preferable when only a reverse proxy should call the app.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 1: Establish the effective Spring configuration

Begin with the values the running instance actually selected. Spring Boot can receive properties from configuration files, environment variables, and command-line arguments; deployment-time values can override what is committed in the project. Record the active HTTP port, bind address, context path, and whether TLS is enabled.

For a direct HTTP test on every IPv4 interface, the relevant properties are:

server.address=0.0.0.0
server.port=8080

Use the narrowest address that matches the design. If Nginx, Apache, or a load balancer is the only caller, bind Java to the private interface or loopback and expose only the proxy. Use 0.0.0.0 when the application itself must accept connections arriving on any IPv4 interface.

Read startup evidence

Search the startup output for the embedded server’s port and for binding or startup errors. A message indicating that the application started on a port other than 8080 is decisive. Errors about an address already being in use, an unavailable certificate, or a failed context can leave a Java process present without a usable HTTP endpoint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Check deployment overrides

For a systemd service, container, or launch script, inspect its environment and command line. A command-line property such as --server.port=9090 takes effect even when application.properties still says 8080. After changing a property, restart the service and verify the new listener; editing a file without restarting does not change an already running JVM.

Step 2: Prove that a listener exists

Run the socket inspection command on the VPS:

sudo ss -lntp

Locate the expected port and correlate the owning PID with the Java process. The address and port shown by ss are more reliable than assumptions from source files.

  • 127.0.0.1:8080: the web server is loopback-only. Local curl can succeed while packets addressed to the VPS interface are rejected before HTTP processing.
  • 0.0.0.0:8080: the process is listening on all IPv4 interfaces, so proceed to routing and firewall checks.
  • A private-interface address only: requests must arrive through that interface; a public-IP request may not be accepted directly.
  • A different port: use that port for the diagnostic request or correct server.port.
  • No matching listener: investigate startup failure, a wrong profile, a stopped service, or a non-HTTP application.

Do not infer that a port is open merely because the Java PID is present. The socket must be in a listening state and owned by the expected process.

Step 3: Test locally, then test the VPS interface

Start with loopback:

curl -v http://127.0.0.1:8080/

If the application uses a different port, substitute the effective value. A response status of 200, 401, 403, or 404 still proves that TCP reached an HTTP server. A 404 means the requested path or context path is not mapped; it does not mean that port 8080 is closed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Next, request the VPS private address from the VPS itself:

curl -v http://<vps-private-address>:8080/

This distinguishes loopback binding from a listener reachable on the server interface. If the private-address test fails while loopback works, inspect ss, the bind setting, local routing, and the host firewall before changing cloud rules.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Read connection symptoms carefully

  • Connection refused: the destination was reachable but no service accepted the connection, or an active rule rejected it. Confirm the listener and port rather than treating refusal as proof of a single cause.
  • Timeout: packets may be filtered, routed incorrectly, or sent to an address with no responding service. Check both firewall layers and the public-IP attachment.
  • HTTP response with an unexpected status: networking and TCP are working; investigate path, context path, authentication, virtual-host rules, TLS scheme, or application behavior.

Step 4: Correct a loopback-only bind

If ss shows 127.0.0.1, set the address required by your architecture. For direct exposure, use:

server.address=0.0.0.0
server.port=8080

Restart the application, run sudo ss -lntp again, and repeat both curl tests. If a reverse proxy is the sole public entry point, do not broaden the Java bind unnecessarily; configure the proxy’s upstream to the private address and keep the backend inaccessible from the internet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remember that 0.0.0.0 is an IPv4 wildcard. It does not by itself make an IPv6 listener available, and it does not bypass firewalls. If clients use an IPv6 address, verify that the application, host firewall, provider firewall, and DNS all support IPv6 separately.

Step 5: Open the correct port in both firewall layers

After the listener and bind address are correct, permit the exact TCP port at the VPS operating-system firewall and at the cloud provider’s ingress, security-group, or network-firewall layer. A rule in only one place is insufficient: the host can drop traffic that the provider allows, and the provider can drop traffic before it reaches a permissive host firewall.

Choose the smallest exposure that meets the use case:

  • For a reverse-proxy deployment, expose public TCP 80 and 443 and keep the Java backend port private.
  • For a temporary direct test, expose the actual backend port, such as 8080, only for the required source ranges where possible.
  • For an administrative or internal service, restrict ingress to the known office, VPN, or proxy source addresses instead of the whole internet.

Google Cloud’s guidance for VMs with external IP addresses emphasizes that only intended services and traffic should be reachable and that firewall rules can restrict selected ports and source IPs. The same least-exposure principle applies to other VPS platforms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Verify the rule matches reality

Confirm protocol (TCP rather than UDP), destination port, source range, network or security-group attachment, and rule priority. Check that the public IP is attached to the intended VM and that the firewall policy applies to its network interface. If a provider offers separate IPv4 and IPv6 rules, configure the family you actually test.

Step 6: Account for a reverse proxy or load balancer

A proxy changes the public endpoint. If Nginx, Apache, or a load balancer owns ports 80 or 443, users should connect to the public IP or hostname on those ports, not automatically to :8080. The Java process can remain on a private backend port while the proxy handles TLS, filtering, and forwarding.

Trace the proxy path

  1. Confirm the proxy service is running and listening on the public port with ss -lntp.
  2. Verify its upstream target matches the Java listener’s actual address and port.
  3. From the VPS, curl the upstream address directly to prove that proxy-to-Java traffic works.
  4. Ensure the host firewall permits the proxy’s connection to the backend port.
  5. From an external network, request the public IP or hostname on 80 or 443 and inspect the proxy logs.

A proxy can return its own 404, 502, or TLS error. A 502 commonly means the proxy cannot connect to the configured upstream; compare the upstream setting with the listener shown by ss.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Preserve the public URL

Spring Boot documents that a proxy or load balancer can change the apparent host, port, and scheme. Configure forwarded or X-Forwarded-* headers consistently so redirects and generated links use the public HTTPS URL rather than an internal address or port. Header handling must match the proxy configuration; enabling it on one side only can produce incorrect redirects even when the initial request succeeds.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Step 7: Test from a genuinely external network

Once loopback and VPS-interface requests work, test from a separate network, such as a mobile connection or an external probe. A request from the same private network can be affected by NAT loopback (hairpin) behavior and may not represent what an internet client sees.

Use the literal public IPv4 address first. This removes DNS as a variable. After the address works, test the hostname and confirm it resolves to the current VPS address rather than an old VM, proxy, or load balancer. If HTTPS is configured, test the correct scheme and public port; sending plain HTTP to a TLS listener or HTTPS to a plain HTTP port produces misleading errors.

Interpret the first failed layer

Observed result Most useful next checks
Localhost fails Application startup errors, effective port, context path, TLS mode, and whether an HTTP listener exists
Localhost works; VPS interface fails Bind address, local routing, and VPS host firewall
VPS interface works; external access fails Provider ingress rules, public-IP attachment, upstream routing, and external firewall policy
TCP connects; HTTP result is wrong Path, context path, proxy routing, virtual-host rules, TLS scheme, authentication, and application logs

This sequence prevents a common mistake: opening increasingly broad firewall rules when the application is still listening only on loopback or on the wrong port.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose direct exposure or a reverse proxy deliberately

Design Public endpoint Java bind TLS and filtering Firewall surface Forwarded-header concern Best fit
Direct Java port Public IP with the application port, commonly 8080 Public interface or 0.0.0.0 Handled by the Java application Backend port must be exposed Usually absent unless another proxy exists Temporary tests or a simple controlled deployment
Reverse proxy Public IP or hostname on 80/443 Private interface or loopback Proxy can terminate TLS and apply request filtering Expose 80/443; restrict backend traffic Must be handled consistently for host, port, and scheme Public services that need a constrained edge and centralized TLS

A direct port is quicker for isolating application connectivity. A reverse proxy generally reduces the publicly exposed surface and gives one place for certificates, request limits, access logs, and routing, but adds another service whose status and upstream configuration must be checked.

Common cases and targeted repairs

The properties file says 8080, but ss shows 9090

A deployment override is active. Inspect environment variables, launch arguments, service definitions, and selected Spring profiles. Use the effective 9090 value for a diagnostic curl, then remove or correct the override and restart if 8080 is the intended endpoint.

Port 8080 is listening on 0.0.0.0, but the public IP times out

The application bind is no longer the likely fault. Check the VPS firewall, provider ingress rule, source range, network attachment, route, and whether the public IP belongs to this VM. Confirm the test is sent to the correct protocol and port from an external network.

The proxy returns 502 while localhost:8080 works

Test the proxy’s configured upstream address from the VPS. A proxy pointed at 127.0.0.1:8080 cannot work if Java moved to another port; a proxy pointed at a private address cannot work if the application binds only to loopback. Correct the upstream, restart or reload the proxy, and verify backend firewall permissions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The IP works, but the hostname redirects to an internal port

The request reached the application, so inspect forwarded-header handling and the proxy’s public scheme and host settings. Ensure the application trusts the headers supplied by the intended proxy and that redirects are generated for the public URL.

A 404 appears during the test

Keep the successful TCP evidence. Check the application context path and route, then request the correct path. If a proxy is involved, determine whether the 404 came from the proxy’s virtual-host or location rule rather than from Spring.

Security checks before leaving the port public

  • Expose only the ports required by the chosen architecture.
  • Keep management and actuator endpoints off the public interface unless they are explicitly protected and needed.
  • Prefer TLS at the public edge for an internet-facing service.
  • Restrict backend ports to the proxy, VPN, or administrative source ranges.
  • Review both host and provider firewall rules after temporary troubleshooting access is removed.
  • Monitor proxy and application logs so connection failures can be separated from authentication or route errors.

Changing the bind address to make a test pass also changes who can reach the process. Treat that setting as a security decision, not merely a connectivity toggle.

A repeatable verification checklist

  1. Read the current startup log and deployment settings.
  2. Write down the effective port, bind address, context path, and TLS mode.
  3. Run sudo ss -lntp and match the listener to the Java PID.
  4. Run curl -v against loopback.
  5. Run curl -v against the VPS private interface.
  6. Correct server.address or server.port if the socket is wrong, then restart.
  7. Check the VPS host firewall for the exact TCP port.
  8. Check provider ingress or security-group rules, source ranges, and public-IP attachment.
  9. If a proxy exists, test its public listener, upstream target, and forwarded headers.
  10. Repeat the request from an external network using the literal public IP, then verify DNS and HTTPS.

Following these steps turns “localhost works, IP fails” into a bounded investigation: application, socket, interface, host firewall, provider firewall, proxy, or external routing. Fix the first failed layer and retest before moving outward.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

FirewallsJavaLinuxnetworkingreverse proxySpring BootVPS

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.