sinamics / ztnet

ZTNET - ZeroTier Web UI for Private Controllers with Multiuser and Organization Support.
https://ztnet.network
GNU General Public License v3.0
587 stars 60 forks source link

[Bug]: There was a problem accessing with the domain name #586

Open v808comd opened 5 days ago

v808comd commented 5 days ago

🐛 Describe the Bug

I am using Ubuntu 22.04 . curl -s http://install.ztnet.network | sudo bash The domain name has been configured and there were no errors during installation When using a domain name to access, the page opens very slowly. 11

If aaaa records are configured for the domain name, login is not possible. After entering the password, you will be returned to the login page.

🔍 Steps to Reproduce

The server is configured with static global IP and static global IPv6. As shown in the picture, the web service port for IPv6 has not been opened 12 If the aaaa record of the domain name is deleted, it can be accessed, but clicking on any link is very slow.

🌐 Browser

Edge

🔧 Deployment Type

✨ Expected Behavior

No response

📋 ZTNET Logs

No response

🖼 Screenshots

No response

v808comd commented 5 days ago

Also, I am using a Chinese browser, and the login interface displays Chinese. However, after successfully logging in, the page displays English and needs to be manually changed to Chinese.

sinamics commented 5 days ago

try adding this line to .env file NEXTAUTH_URL_INTERNAL=http://localhost:3000

https://ztnet.network/installation/options#nextauth-configuration

v808comd commented 5 days ago

Unable to log in after adding

Nov 28 02:47:50 ztnet systemd[1]: Stopped ZTnet Service. Nov 28 02:47:50 ztnet systemd[1]: ztnet.service: Consumed 3.007s CPU time. -- Boot ec35702e5bd84a82b64f5e6ef9226fe2 -- Nov 28 02:47:58 ztnet systemd[1]: Started ZTnet Service. Nov 28 02:48:01 ztnet node[146]: <96> Next.js 14.1.4 Nov 28 02:48:01 ztnet node[146]: - Local: http://localhost:3000 Nov 28 02:48:01 ztnet node[146]: - Network: http://0.0.0.0:3000 Nov 28 02:48:01 ztnet node[146]: <9C><93> Ready in 364ms Nov 28 02:48:45 ztnet node[146]: [next-auth][error][CLIENT_FETCH_ERROR] Nov 28 02:48:45 ztnet node[146]: https://next-auth.js.org/errors#client_fetch_error fetch failed { Nov 28 02:48:45 ztnet node[146]: error: { Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed', Nov 28 02:48:45 ztnet node[146]: stack: 'TypeError: fetch failed\n' + Nov 28 02:48:45 ztnet node[146]: ' at node:internal/deps/undici/undici:12618:11\n' + Nov 28 02:48:45 ztnet node[146]: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', Nov 28 02:48:45 ztnet node[146]: name: 'TypeError' Nov 28 02:48:45 ztnet node[146]: }, Nov 28 02:48:45 ztnet node[146]: url: 'http://localhost:3000/api/auth/session', Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed' Nov 28 02:48:45 ztnet node[146]: } Nov 28 02:48:45 ztnet node[146]: [next-auth][error][CLIENT_FETCH_ERROR] Nov 28 02:48:45 ztnet node[146]: https://next-auth.js.org/errors#client_fetch_error fetch failed { Nov 28 02:48:45 ztnet node[146]: error: { Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed', Nov 28 02:48:45 ztnet node[146]: stack: 'TypeError: fetch failed\n' + Nov 28 02:48:45 ztnet node[146]: ' at node:internal/deps/undici/undici:12618:11\n' + Nov 28 02:48:45 ztnet node[146]: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', Nov 28 02:48:45 ztnet node[146]: name: 'TypeError' Nov 28 02:48:45 ztnet node[146]: }, Nov 28 02:48:45 ztnet node[146]: url: 'http://localhost:3000/api/auth/session', Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed' Nov 28 02:48:45 ztnet node[146]: } Nov 28 02:48:45 ztnet node[146]: [next-auth][error][CLIENT_FETCH_ERROR] Nov 28 02:48:45 ztnet node[146]: https://next-auth.js.org/errors#client_fetch_error fetch failed { Nov 28 02:48:45 ztnet node[146]: error: { Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed', Nov 28 02:48:45 ztnet node[146]: stack: 'TypeError: fetch failed\n' + Nov 28 02:48:45 ztnet node[146]: ' at node:internal/deps/undici/undici:12618:11\n' + Nov 28 02:48:45 ztnet node[146]: ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', Nov 28 02:48:45 ztnet node[146]: name: 'TypeError' Nov 28 02:48:45 ztnet node[146]: }, Nov 28 02:48:45 ztnet node[146]: url: 'http://localhost:3000/api/auth/session', Nov 28 02:48:45 ztnet node[146]: message: 'fetch failed' Nov 28 02:48:45 ztnet node[146]: }

v808comd commented 5 days ago

Change to NEXTAUTH_URL_INTERNAL=http://ztnet:3000 There was no error, the problem has been resolved.