ztnet icon indicating copy to clipboard operation
ztnet copied to clipboard

[Bug]: Remote ZeroTier Controller + Planet not working

Open starlightcrafted opened this issue 1 year ago • 2 comments

🐛 Describe the Bug

When a remote zerotier controller is setup in ZT Controller -> Controller -> Local ZeroTier URL/Zerotier Secret, setting up a new planet results in the error message

identity.public file does NOT exist, cannot generate planet file.

🔍 Steps to Reproduce

  1. Run ZTNet without the /var/lib/zerotier folder mounted to local ZeroTier
  2. Setup a remote ZeroTier Controller in ZTNet
  3. Create a Planet

🌐 Browser

Chrome

🔧 Deployment Type

  • [X] Docker
  • [ ] Standalone

✨ Expected Behavior

ZTNet should use the existing entered identity to create the planet

📋 ZTNET Logs

An error occurred while reading the ZT_SECRET
Error: ENOENT: no such file or directory, open '/var/lib/zerotier-one/authtoken.secret'
    at Object.readFileSync (node:fs:448:20)
    at /app/.next/server/chunks/1875.js:1:6507
    at /app/.next/server/chunks/1875.js:1:6633 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/var/lib/zerotier-one/authtoken.secret'
}
An error occurred while reading the ZT_SECRET
Error: ENOENT: no such file or directory, open '/var/lib/zerotier-one/authtoken.secret'
    at Object.readFileSync (node:fs:448:20)
    at /app/.next/server/chunks/8108.js:1:2187
    at /app/.next/server/chunks/8108.js:1:2313
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/var/lib/zerotier-one/authtoken.secret'
}
Socket is initializing
2024/09/13 01:39:55 startup flag parsed:  true
2024/09/13 01:39:55 config file read.
2024/09/13 01:39:55 config file unmarshalled.
2024/09/13 01:39:55 read world signing key failed:  open previous.c25519: no such file or directory  ,  open current.c25519: no such file or directory
2024/09/13 01:39:55 preflight check error occurred, but still can proceed.
2024/09/13 01:39:55 new world signing key generated.
2024/09/13 01:39:55 preflight check successfully complete.
2024/09/13 01:39:55 generating pre-sign message.
2024/09/13 01:39:55 pre-sign world generated and serialized successfully.
2024/09/13 01:39:55 world has been signed.
2024/09/13 01:39:55 new signed world are packed.
2024/09/13 01:39:55 packed new signed world has been written to file.
2024/09/13 01:39:55
2024/09/13 01:39:55
2024/09/13 01:39:55 now c language output:

🖼 Screenshots

No response

starlightcrafted avatar Sep 13 '24 01:09 starlightcrafted

Workaround: This can be fixed by creating a identity.public with the controller's identity in /var/lib/zerotier-one or wherever you have mounted the folder.

starlightcrafted avatar Sep 13 '24 12:09 starlightcrafted

As you found out, using a remote controller makes it difficult to create roots as ztnet needs access to the zerotier-one folder. Your workarround would do, just remember if you change port others than 9993 you need to update the remote controller local.conf with the new port as well.

sinamics avatar Sep 14 '24 06:09 sinamics

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 15 '24 02:10 github-actions[bot]

This issue was closed because it has been inactive for 3 days since being marked as stale.

github-actions[bot] avatar Oct 19 '24 01:10 github-actions[bot]