plane icon indicating copy to clipboard operation
plane copied to clipboard

[bug]: curl works on WSL2, but not browser. Can't open or edit

Open XJTLUmedia opened this issue 1 year ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

curl 127.0.0.1:80, works, but when copy 127.0.0.1:80 into browser it does not work

Steps to reproduce

  1. Install docker on WSL2
  2. Try self host tutorial on plane.so, install plane on docker
  3. curl 127.0.0.1:80, works, but when copy 127.0.0.1:80 into browser it does not work

Browser

Google Chrome

Version

Self-hosted

XJTLUmedia avatar Dec 28 '23 07:12 XJTLUmedia

Hello @XJTLUmedia

We have tested the docker setup on the wsl recently and didn't find any issue with it. Can you verify if you WSL ports are exposed to windows?

sriramveeraghanta avatar Dec 28 '23 10:12 sriramveeraghanta

@sriramveeraghanta sriramveeraghanta hi, did you change any setting on docker to forward port on browser? if so, how did you do? did you successfully open 127.0.0.1:80 on browser?

I am currently using WSL2 now, is your WSL version 1 or 2?

XJTLUmedia avatar Dec 29 '23 01:12 XJTLUmedia

To access a WSL2 service from the Windows side, you need to specify the eth interface - use ip address to determine the ip of eth0, and from your Windows host use that IP instead of localhost (127.0.0.1).

jhamell avatar Dec 29 '23 15:12 jhamell

WSL2 supports it out of the box i guess. I have simply tried running docker compose, and i can access 127.0.0.1:80 from my windows browser.

Setup Steps:

  1. Enable WSL using wsl --install and install ubuntu.
  2. Install Docker Desktop on windows.
  3. Run docker compose as mentioned in the docs.plane.so

sriramveeraghanta avatar Dec 30 '23 13:12 sriramveeraghanta

hello, @jhamell when using ip addr. I got response like this

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether c8:7f:54:65:54:ef brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000

I saw no ip of eth0

XJTLUmedia avatar Dec 30 '23 14:12 XJTLUmedia

WSL2 supports it out of the box i guess. I have simply tried running docker compose, and i can access 127.0.0.1:80 from my windows browser.

Setup Steps:

  1. Enable WSL using wsl --install and install ubuntu.
  2. Install Docker Desktop on windows.
  3. Run docker compose as mentioned in the docs.plane.so

@sriramveeraghanta Hi, when I using curl, I got response like this

root@Alex-Computer3:/home/futuresight/plane-selfhost# curl http://127.0.0.1:8080 <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>Plane | Simple, extensible, open-source project management tool.</title><meta name="next-head-count" content="3"/><meta property="og:site_name" content="Plane | Simple, extensible, open-source project management tool."/><meta property="og:title" content="Plane | Simple, extensible, open-source project management tool."/><meta property="og:url" content="https://app.plane.so/"/><meta name="description" content="Open-source project management tool to manage issues, sprints, and product roadmaps with peace of mind."/><meta property="og:description" content="Open-source project management tool to manage issues, sprints, and product roadmaps with peace of mind."/><meta name="keywords" content="software development, plan, ship, software, accelerate, code management, release management, project management, issue tracking, agile, scrum, kanban, collaboration"/><meta name="twitter:site" content="@Plane | Simple, extensible, open-source project management tool."/><meta name="theme-color" content="#fff"/><link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png"/><link rel="manifest" href="/site.webmanifest.json"/><link rel="shortcut icon" href="/favicon/favicon.ico"/><link rel="preload" href="/_next/static/css/1dcc4f579262b0b6.css" as="style" crossorigin=""/><link rel="stylesheet" href="/_next/static/css/1dcc4f579262b0b6.css" crossorigin="" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" crossorigin="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script src="/_next/static/chunks/webpack-fa30d4f974962366.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/framework-729922d678744751.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/main-3f39b5f3634ac35e.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/_app-fef63231387e098a.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/88d491b7-d8d705e352fffd27.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/849baa33-e7af2d7cc05a7e63.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/3c425cc6-b3f8db24fe780acf.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/7939-01d6f0325bae1b72.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/3104-61e7d00aedee77f0.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/1858-3af116c0c1f8171a.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/1954-77f11bbfdf34a8a9.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/4997-367f35f2849df7e6.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/9012-1083f853ab7f83ff.js" defer="" crossorigin=""></script><script src="/_next/static/chunks/pages/index-c603e38b5b7323a7.js" defer="" crossorigin=""></script><script src="/_next/static/HdaoJUCv3uLUAHj4nESg_/_buildManifest.js" defer="" crossorigin=""></script><script src="/_next/static/HdaoJUCv3uLUAHj4nESg_/_ssgManifest.js" defer="" crossorigin=""></script></head><body><div id="__next"><script>!function(){try{var d=document.documentElement,n='data-theme',s='setAttribute';var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';d[s](n,'dark')}else{d.style.colorScheme = 'light';d[s](n,'light')}}else if(e){d[s](n,e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="pointer-events-none fixed right-5 top-5 z-50 h-full w-80 space-y-5 overflow-hidden"></div><div class="h-screen w-full overflow-hidden"><div class="flex h-full w-full items-center justify-center"><div role="status"><svg aria-hidden="true" height="32px" width="32px" class="animate-spin fill-blue-600 text-custom-text-200 " viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg><span class="sr-only">Loading...</span></div></div></div></div><script id="__NEXT_DATA__" type="applicatio

I changed .env and .docker compose both to 8080 to see if it works, still have the same problem

Hmmm… can't reach this page127.0.0.1 took too long to respond Try:

Running network diagnostics with Get Help Search the web for 127 0 0 1 Checking the connection Checking the proxy and the firewall ERR_CONNECTION_TIMED_OUT

XJTLUmedia avatar Dec 30 '23 14:12 XJTLUmedia

@sriramveeraghanta wait, did you install docker on windows, or docker on WSL2 ubuntu system? I installed docker inside ubuntu of WSL2

XJTLUmedia avatar Dec 30 '23 14:12 XJTLUmedia

@sriramveeraghanta wait, did you install docker on windows, or docker on WSL2 ubuntu system? I installed docker inside ubuntu of WSL2

When working with WSL, the typical approach is to install Docker on your Windows system instead of on Ubuntu, allowing you to expose Docker containers to Windows.

sriramveeraghanta avatar Dec 31 '23 05:12 sriramveeraghanta

I am closing this issue due to inactivity. I hope the steps I have provided above are helpful. Please feel free to reopen the issue if you are still experiencing the problem.

sriramveeraghanta avatar Jan 13 '24 07:01 sriramveeraghanta