You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装/卸载Tomcat后Chrome Port forwarding异常(红色)原因求助

Troubleshooting Chrome Port Forwarding Red Status After Tomcat Installation/Uninstallation

Hey there, let's figure out why your Chrome port forwarding is stuck red even after you uninstalled Tomcat. It's frustrating when a tool that worked fine suddenly breaks, so let's walk through the most likely causes and fixes step by step:

1. The Target Port Is Still Occupied by Another Process

Tomcat typically uses port 8080 by default, but even after uninstalling it, another process might have grabbed that port (or whatever port you're trying to forward). Here's how to check and fix it:

  • Windows: Open Command Prompt as admin and run:
    netstat -ano | findstr :<your-port-number>
    
    Look for the PID in the last column, then open Task Manager, go to the Details tab, find that PID, right-click and end the process.
  • macOS/Linux: Open Terminal and run:
    lsof -i :<your-port-number>
    
    Use the PID to kill the process with kill -9 <PID>.

2. Chrome DevTools Configuration Got Corrupted

Sometimes Tomcat's installation/uninstallation can mess with Chrome's DevTools settings related to port forwarding. Try these fixes:

  • Test in Incognito Mode: Open an incognito window, fire up DevTools, and try setting up port forwarding again. If it works, your main Chrome profile has corrupted settings.
  • Reset DevTools: In DevTools, click the three-dot menu > Settings > Scroll to the bottom > Click "Restore defaults and reload".
  • Clear Chrome Profile Data: If resetting DevTools doesn't work, go to Chrome Settings > Privacy and security > Clear browsing data > Select "All time" and check "Cached images and files" + "Site settings", then clear. Note: This will reset some site permissions, so back up any important settings first.

3. System-Level Network Rules/Firewall Blocking the Port

Tomcat might have added firewall rules or system port forwarding settings that weren't removed during uninstallation:

  • Windows Firewall: Go to Control Panel > System and Security > Windows Defender Firewall > Advanced settings. Check both Inbound and Outbound Rules for any entries related to Tomcat or your target port. Delete any leftover rules, then restart Chrome.
  • macOS: Go to System Settings > Network > Advanced > Firewall. Check if there's a rule blocking Chrome or your port. Also, run sudo pfctl -s nat in Terminal to see if any leftover port forwarding rules exist, and remove them if needed.
  • Linux: Check your iptables rules with sudo iptables -L and look for any Tomcat-related entries. Use sudo iptables -D <rule-number> to delete unwanted rules.

4. Tomcat Wasn't Uninstalled Completely

Even if you used the uninstaller, some residual files or services might still be running in the background:

  • Windows: Open Services (press Win+R, type services.msc). Look for any services named "Apache Tomcat" or similar. If found, stop the service, right-click > Properties > Set Startup type to "Disabled", then delete the service using sc delete <service-name> in Command Prompt (admin).
  • macOS/Linux: Check for leftover Tomcat folders (e.g., /usr/local/tomcat, ~/Library/Tomcat on macOS, /opt/tomcat on Linux) and delete them. Also, run ps aux | grep tomcat to see if any Tomcat processes are still running, then kill them with kill -9 <PID>.

5. Chrome Extension or Version Conflict

Sometimes extensions can interfere with DevTools functionality, or an outdated Chrome version might have bugs:

  • Disable All Extensions: Go to Chrome Settings > Extensions, toggle off all extensions, then restart Chrome and test port forwarding.
  • Update Chrome: Go to Chrome Settings > About Chrome. Chrome will automatically check for updates; install any available updates and restart the browser.

If none of these fix the issue, try testing port forwarding with another browser (like Firefox DevTools) to confirm if the problem is specific to Chrome or a system-wide network issue.

内容的提问来源于stack exchange,提问作者Bhautik Chudasama

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:14:05