Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailscale not installing and stuck in "deploying" status #1874

Open
sync-by-unito bot opened this issue Dec 13, 2023 · 42 comments
Open

Tailscale not installing and stuck in "deploying" status #1874

sync-by-unito bot opened this issue Dec 13, 2023 · 42 comments
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Dec 13, 2023

tailscale is stuck in the deploying status and seems to be failing to launch (see history below):

2023-12-04 18:16:06
Back-off restarting failed container tailscale in pod tailscale-6bdbbf4876-bgwrp_ix-tailscale(31c45dfc-6b4d-4738-96ba-f19a5c9664bf)
2023-12-04 18:11:09
Startup probe failed: command "tailscale status" timed out
2023-12-04 18:10:54
Created container tailscale
2023-12-04 18:10:54
Started container tailscale
2023-12-04 18:10:52
Created pod: tailscale-6bdbbf4876-bgwrp
2023-12-04 18:10:52
Successfully assigned ix-tailscale/tailscale-6bdbbf4876-bgwrp to ix-truenas
2023-12-04 18:10:52
Add eth0 [172.16.0.8/16] from ix-net
2023-12-04 18:10:52
Container image "tailscale/tailscale:v1.54.0" already present on machine
2023-12-04 18:10:51
Scaled up replica set tailscale-6bdbbf4876 to 1

Copy link
Author

sync-by-unito bot commented Dec 13, 2023

➤ Bug Clerk commented:

Thank you for submitting this TrueNAS Bug Report! So that we can quickly investigate your issue, please attach a Debug file and any other information related to this issue through our secure and private upload service below. Debug files can be generated in the UI by navigating to System > Advanced > Save Debug.

https://ixsystems.atlassian.net/servicedesk/customer/portal/15/group/37/create/153

Copy link
Author

sync-by-unito bot commented Dec 13, 2023

➤ Tyler Jiles commented:

i have uploaded the debug file

Copy link
Author

sync-by-unito bot commented Dec 13, 2023

➤ Bonnie Follweiler commented:

Good Morning Tyler Jiles.

I have moved this ticket into our queue to review.

An engineering representative will update with any further questions or details in the near future.

@stavros-k
Copy link
Contributor

Hello, can you please share the output of the following commands (run them on the host)

sudo k3s kubectl get secret -n ix-tailscale
sudo k3s kubectl get sa -n ix-tailscale
sudo k3s kubectl get deploy -n ix-tailscale tailscale -o jsonpath={'.spec.template.spec.automountServiceAccountToken'} | jq
sudo k3s kubectl get rolebinding -n ix-tailscale -o jsonpath={'.items'} | jq
sudo k3s kubectl get role -n ix-tailscale -o jsonpath={'.items'} | jq

Thanks

@fitzgeraldtech
Copy link

Hello, I'm having the same issue with it being stuck in "deploying" forever. I ran the command and here's the output:

NAME TYPE DATA AGE
tailscale-tailscale-secret Opaque 1 17m
sh.helm.release.v1.taisudo k3s kubectl get secret -n ix-tailscale
sudo k3s kubectl get sa -n ix-tailscaleget secret -n ix-tailscale
sudo k3s kubectl get deploy -n ix-tailscale tailscale -o jsonpath={'.spec.template.spec.automountServiceAccountToken'} | jq
sudo k3s kubectl get rolebinding -n ix-tailscale -o jsonpath={'.items'} | jqmplate.spec.automountServiceAccountToken'} | jq
sudo k3s kubectl get role -n ix-tailscale -o jsonpath={'.items'} | jq'} | jq
NAME TYPE DATA AGE| jq
tailscale-tailscale-secret Opaque 1 18m
sh.helm.release.v1.tailscale.v1 helm.sh/release.v1 1 18m
NAME SECRETS AGE
default 0 18m
tailscale 0 18m
true
[
{
"apiVersion": "rbac.authorization.k8s.io/v1",
"kind": "RoleBinding",
"metadata": {
"annotations": {
"meta.helm.sh/release-name": "tailscale",
"meta.helm.sh/release-namespace": "ix-tailscale"
},
"creationTimestamp": "2023-12-24T21:09:46Z",
"labels": {
"app": "tailscale-1.0.27",
"app.kubernetes.io/instance": "tailscale",
"app.kubernetes.io/managed-by": "Helm",
"app.kubernetes.io/name": "tailscale",
"app.kubernetes.io/version": "1.56.1",
"helm-revision": "1",
"helm.sh/chart": "tailscale-1.0.27",
"release": "tailscale"
},
"managedFields": [
{
"apiVersion": "rbac.authorization.k8s.io/v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:meta.helm.sh/release-name": {},
"f:meta.helm.sh/release-namespace": {}
},
"f:labels": {
".": {},
"f:app": {},
"f:app.kubernetes.io/instance": {},
"f:app.kubernetes.io/managed-by": {},
"f:app.kubernetes.io/name": {},
"f:app.kubernetes.io/version": {},
"f:helm-revision": {},
"f:helm.sh/chart": {},
"f:release": {}
}
},
"f:roleRef": {},
"f:subjects": {}
},
"manager": "helm",
"operation": "Update",
"time": "2023-12-24T21:09:46Z"
}
],
"name": "tailscale",
"namespace": "ix-tailscale",
"resourceVersion": "3995976",
"uid": "aa666ad2-f11b-4e51-ac8f-96345c173b62"
},
"roleRef": {
"apiGroup": "rbac.authorization.k8s.io",
"kind": "Role",
"name": "tailscale"
},
"subjects": [
{
"kind": "ServiceAccount",
"name": "tailscale",
"namespace": "ix-tailscale"
}
]
}
]
[
{
"apiVersion": "rbac.authorization.k8s.io/v1",
"kind": "Role",
"metadata": {
"annotations": {
"meta.helm.sh/release-name": "tailscale",
"meta.helm.sh/release-namespace": "ix-tailscale"
},
"creationTimestamp": "2023-12-24T21:09:46Z",
"labels": {
"app": "tailscale-1.0.27",
"app.kubernetes.io/instance": "tailscale",
"app.kubernetes.io/managed-by": "Helm",
"app.kubernetes.io/name": "tailscale",
"app.kubernetes.io/version": "1.56.1",
"helm-revision": "1",
"helm.sh/chart": "tailscale-1.0.27",
"release": "tailscale"
},
"managedFields": [
{
"apiVersion": "rbac.authorization.k8s.io/v1",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:meta.helm.sh/release-name": {},
"f:meta.helm.sh/release-namespace": {}
},
"f:labels": {
".": {},
"f:app": {},
"f:app.kubernetes.io/instance": {},
"f:app.kubernetes.io/managed-by": {},
"f:app.kubernetes.io/name": {},
"f:app.kubernetes.io/version": {},
"f:helm-revision": {},
"f:helm.sh/chart": {},
"f:release": {}
}
},
"f:rules": {}
},
"manager": "helm",
"operation": "Update",
"time": "2023-12-24T21:09:46Z"
}
],
"name": "tailscale",
"namespace": "ix-tailscale",
"resourceVersion": "3995975",
"uid": "f67d7a05-d84d-49b0-97fa-2907a23d9c63"
},
"rules": [
{
"apiGroups": [
""
],
"resources": [
"secrets"
],
"verbs": [
"create"
]
},
{
"apiGroups": [
""
],
"resources": [
"secrets"
],
"verbs": [
"get",
"update",
"patch"
]
}
]
}
]

@stavros-k
Copy link
Contributor

Hello, I'm having the same issue with it being stuck in "deploying" forever. I ran the command and here's the output:

What does your log say?
I just deployed one successfully, only change I made on the default config was to add the auth key.

@jimeh
Copy link

jimeh commented Jan 1, 2024

I believe this might the same issue as I've had for months every time I've tried any Tailscale chart for TrueNAS SCALE.

The container logs always die with:

boot: 2024/01/01 20:08:15 error checking get permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": remote error: tls: internal error
boot: 2024/01/01 20:08:16 error checking update permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": remote error: tls: internal error
boot: 2024/01/01 20:08:16 error checking patch permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": remote error: tls: internal error
boot: 2024/01/01 20:08:16 Getting authkey from kube secret: Get "https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": remote error: tls: internal error

This happens both with the iX chart, and also the Truecharts version of Tailscale.

@stavros-k
Copy link
Contributor

I believe this might the same issue as I've had for months every time I've tried any Tailscale chart for TrueNAS SCALE.
This happens both with the iX chart, and also the Truecharts version of Tailscale.

Hmm,
When installing TrueNAS did you choose admin or root setup?

@jimeh
Copy link

jimeh commented Jan 3, 2024

@stavros-k I actually don't remember. It was about 6 months I originally installed it. Is there a way to check after the fact?

I'm happy to try both options on fresh installs of TrueNAS SCALE on a couple of VMs.

I've had this issue since day one with both charts, and through all new versions until current v23.10.1. Tailscale was basically the first thing I tried to setup.

@stavros-k
Copy link
Contributor

@stavros-k I actually don't remember. It was about 6 months I originally installed it. Is there a way to check after the fact?

I'm happy to try both options on fresh installs of TrueNAS SCALE on a couple of VMs.

I've had this issue since day one with both charts, and through all new versions until current v23.10.1. Tailscale was basically the first thing I tried to setup.

What user do you use to login to TrueNAS webui?
root or admin?

@jimeh
Copy link

jimeh commented Jan 3, 2024

What user do you use to login to TrueNAS webui?
root or admin?

Ah, I have an admin user, and no root user. But I actually use a custom jimeh user which I've made an admin.

@stavros-k
Copy link
Contributor

Interesting, I'll spin a VM and make some tests to check if that might be the issue.

@stavros-k
Copy link
Contributor

What user do you use to login to TrueNAS webui?
root or admin?

Ah, I have an admin user, and no root user. But I actually use a custom jimeh user which I've made an admin.

Bummer, I just installed a VM with 23.10.1 with admin setup and it worked without issues.
But I DO have a root user. Can you double check that you don't have a root user in Credentials -> Local Users?

image

@jimeh
Copy link

jimeh commented Jan 3, 2024

@stavros-k I have a root user as well as an admin user, along with a couple of other users, including jimeh which is the user I've been using for all this setup.

Screenshot 2024-01-03 at 20 49 49

@jenesuispasbavard
Copy link

jenesuispasbavard commented Jan 4, 2024

@stavros-k I have the exact same issue as @jimeh in their comment - stuck on permission and getting authkey. Tried with/without the following options: host network, advertise routes, and accept DNS.

I log into the TrueNAS Scale web UI as root, fyi.

Edited: Actually, my logs end with context deadline exceeded, not remote error: tls: internal error:

2024-01-04 12:43:17.648596-06:00boot: 2024/01/04 18:43:17 error checking get permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
2024-01-04 12:43:17.648702-06:00boot: 2024/01/04 18:43:17 error checking update permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
2024-01-04 12:43:17.648732-06:00boot: 2024/01/04 18:43:17 error checking patch permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
2024-01-04 12:43:17.648760-06:00boot: 2024/01/04 18:43:17 Getting authkey from kube secret: Get "https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": context deadline exceeded

@stavros-k
Copy link
Contributor

I log into the TrueNAS Scale web UI as root, fyi.

Yea this was mostly, to make sure it isn't something very obvious, I wouldn't expect this to be the issue.
I'll try again to reproduce, and get back to you

@jimeh
Copy link

jimeh commented Jan 6, 2024

@stavros-k if it helps, initial install for me was v22.12.3.1 on 2023-07-01. First three things I did was create a ZFS pool, create a custom user, and then attempt run the Tailscale chart.

I haven't had time yet to properly poke around with things to check the CA certs in the container against those that the HTTPS API endpoints are signed with. I'll try and put aside for that next week.

@stavros-k
Copy link
Contributor

I haven't had time yet to properly poke around with things to check the CA certs in the container against those that the HTTPS API endpoints are signed with. I'll try and put aside for that next week.

That would be great, Thanks!
I've tried a few more systems and could not reproduce sadly, but I know that couple other people have seen this issue.

@aaronpoweruser
Copy link

aaronpoweruser commented Jan 24, 2024

Seeing the same issue. Set up as Admin user during setup and I do have a root user.
Fresh install of TrueNAS-SCALE-23.10.1.1

Output of requested commands:

admin@truenas[~]$ sudo k3s kubectl get secret -n ix-tailscale
[sudo] password for admin: 
NAME                              TYPE                 DATA   AGE
tailscale-tailscale-secret        Opaque               1      5h6m
sh.helm.release.v1.tailscale.v6   helm.sh/release.v1   1      10m
admin@truenas[~]$ sudo k3s kubectl get sa -n ix-tailscale
NAME        SECRETS   AGE
default     0         5h7m
tailscale   0         5h7m
admin@truenas[~]$ sudo k3s kubectl get deploy -n ix-tailscale tailscale -o jsonpath={'.spec.template.spec.automountServiceAccountToken'} | jq
true
admin@truenas[~]$ sudo k3s kubectl get rolebinding -n ix-tailscale -o jsonpath={'.items'} | jq
[
  {
    "apiVersion": "rbac.authorization.k8s.io/v1",
    "kind": "RoleBinding",
    "metadata": {
      "annotations": {
        "meta.helm.sh/release-name": "tailscale",
        "meta.helm.sh/release-namespace": "ix-tailscale"
      },
      "creationTimestamp": "2024-01-23T23:04:13Z",
      "labels": {
        "app": "tailscale-7.1.9",
        "app.kubernetes.io/instance": "tailscale",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "tailscale",
        "app.kubernetes.io/version": "1.56.1",
        "helm-revision": "6",
        "helm.sh/chart": "tailscale-7.1.9",
        "release": "tailscale"
      },
      "managedFields": [
        {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "fieldsType": "FieldsV1",
          "fieldsV1": {
            "f:metadata": {
              "f:annotations": {
                ".": {},
                "f:meta.helm.sh/release-name": {},
                "f:meta.helm.sh/release-namespace": {}
              },
              "f:labels": {
                ".": {},
                "f:app": {},
                "f:app.kubernetes.io/instance": {},
                "f:app.kubernetes.io/managed-by": {},
                "f:app.kubernetes.io/name": {},
                "f:app.kubernetes.io/version": {},
                "f:helm-revision": {},
                "f:helm.sh/chart": {},
                "f:release": {}
              }
            },
            "f:roleRef": {},
            "f:subjects": {}
          },
          "manager": "helm",
          "operation": "Update",
          "time": "2024-01-24T04:00:44Z"
        }
      ],
      "name": "tailscale",
      "namespace": "ix-tailscale",
      "resourceVersion": "80903",
      "uid": "37cf45b6-eacb-47bd-a442-d47a64d8d3cf"
    },
    "roleRef": {
      "apiGroup": "rbac.authorization.k8s.io",
      "kind": "Role",
      "name": "tailscale"
    },
    "subjects": [
      {
        "kind": "ServiceAccount",
        "name": "tailscale",
        "namespace": "ix-tailscale"
      }
    ]
  }
]
admin@truenas[~]$ sudo k3s kubectl get role -n ix-tailscale -o jsonpath={'.items'} | jq

[
  {
    "apiVersion": "rbac.authorization.k8s.io/v1",
    "kind": "Role",
    "metadata": {
      "annotations": {
        "meta.helm.sh/release-name": "tailscale",
        "meta.helm.sh/release-namespace": "ix-tailscale"
      },
      "creationTimestamp": "2024-01-23T23:04:13Z",
      "labels": {
        "app": "tailscale-7.1.9",
        "app.kubernetes.io/instance": "tailscale",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "tailscale",
        "app.kubernetes.io/version": "1.56.1",
        "helm-revision": "6",
        "helm.sh/chart": "tailscale-7.1.9",
        "release": "tailscale"
      },
      "managedFields": [
        {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "fieldsType": "FieldsV1",
          "fieldsV1": {
            "f:metadata": {
              "f:annotations": {
                ".": {},
                "f:meta.helm.sh/release-name": {},
                "f:meta.helm.sh/release-namespace": {}
              },
              "f:labels": {
                ".": {},
                "f:app": {},
                "f:app.kubernetes.io/instance": {},
                "f:app.kubernetes.io/managed-by": {},
                "f:app.kubernetes.io/name": {},
                "f:app.kubernetes.io/version": {},
                "f:helm-revision": {},
                "f:helm.sh/chart": {},
                "f:release": {}
              }
            },
            "f:rules": {}
          },
          "manager": "helm",
          "operation": "Update",
          "time": "2024-01-24T04:00:44Z"
        }
      ],
      "name": "tailscale",
      "namespace": "ix-tailscale",
      "resourceVersion": "80902",
      "uid": "b715f4e7-421d-46f5-9590-2110ce5448d8"
    },
    "rules": [
      {
        "apiGroups": [
          ""
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "create"
        ]
      },
      {
        "apiGroups": [
          ""
        ],
        "resourceNames": [
          "tailscale-tailscale-secret"
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "get",
          "update",
          "patch"
        ]
      }
    ]
  }
]

App logs

2024-01-23 23:16:05.231526-05:00boot: 2024/01/24 04:16:05 error checking get permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": EOF
2024-01-23 23:16:05.754572-05:00boot: 2024/01/24 04:16:05 error checking update permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": EOF
2024-01-23 23:16:07.182178-05:00boot: 2024/01/24 04:16:07 error checking patch permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": tls: failed to verify certificate: x509: certificate is valid for *.nextplaysearch.com, nextplaysearch.com, not kubernetes.default.svc
2024-01-23 23:16:07.798747-05:00boot: 2024/01/24 04:16:07 Getting authkey from kube secret: Get "https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": tls: failed to verify certificate: x509: certificate is valid for *.nextplaysearch.com, nextplaysearch.com, not kubernetes.default.svc

@maru801
Copy link

maru801 commented Jan 29, 2024

Just commenting here to say that I have the exact same issue when I try installing Tailscale (both iX and Truecharts versions) with Cobia. I've tried running Tailscale on each new Cobia release, but still nothing. I have to revert back to Bluefin to get Tailscale to deploy properly.

I'm currently still on the last release of Bluefin due to this.

@Cellobita
Copy link

Cellobita commented Jan 29, 2024

Ditto. Fresh 23.10.1.3 install, log with admin, stuck on Deploying whenever "Host Network" is checked. Tried all checkbox combinations, it is definitely related to the "Host Network" setting.

Edit: Removing completely the Tailscale app and reinstalling with "Host Network" checked did work, so it appears that changing the existing instance is actually the issue. Still no Tailscale interface visible in the GUI. Will keep experimenting.

Edit 2: Even though the interface does not show in the GUI, it is there, and working. I can ping, SSH and otherwise manage other Tailscale nodes via their IP's.

@maru801
Copy link

maru801 commented Jan 29, 2024

@Cellobita I wonder why that is for you. I've tried with "Host Network" both enabled and disabled. Doesn't change the issue and the container's logs still say the same few lines. When the next Cobia release drops, I'll try again to see if there's any change.

@Cellobita
Copy link

@maru801 I have no idea, this is my first Tailscale deployment - still learning the ropes.

Keep in mind that I had to delete the existing Tailscale instance and reinstall with "userspace" unchecked and "host network" checked. This did the trick, and afterwards I did the same procedure on a few more TN Scale servers, and they all worked without a hitch.

@jenesuispasbavard
Copy link

@maru801 no luck for me either with @Cellobita's instructions.

A bit off-topic, but while we wait for a fix:

For those looking for an alternative while this issue with Tailscale+Cobia is fixed, I've set up a Debian VM in TrueNAS's Virtualization tab, and installed Tailscale within that VM. Would still prefer to run it as a chart app though so I don't have to run an entire VM just for Tailscale.

Some things to keep in mind when setting this up:

@maru801
Copy link

maru801 commented Jan 30, 2024

@jenesuispasbavard Thanks for the tips.

I'm still on Bluefin as Tailscale still works with that for me. It's TN Scale Cobia that's giving me this issue.
If I ever need to upgrade to Cobia, I do have another non-Truenas server that I can install Tailscale on to get access to my network remotely anyway. Though hopefully this issue will be fixed by then.

@stavros-k
Copy link
Contributor

Does anyone having this issue use custom domain and/or additional domains?
(In TrueNAS > Network > Global Configuration)

@maru801
Copy link

maru801 commented Jan 30, 2024

@stavros-k I believe I just left that all at their defaults when I installed Truenas Scale. I just gave it a custom host name.

I only have "local" under the domain and no other additional domains.
Just in case, I also disabled my motherboard's built-in network card since I installed a 10gbps NIC. I also disabled DCHP and left the "autoconfigure IPv6" option disabled for it.

Sorry, I'm not going to be able to help test this as I'm waiting until the next Cobia release to update to it and try again with this issue.

@stavros-k
Copy link
Contributor

stavros-k commented Jan 30, 2024

"https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": tls: failed to verify certificate: x509: certificate is valid for *.nextplaysearch.com, nextplaysearch.com, not kubernetes.default.svc

Hello, @aaronpoweruser
Is this your domain? (nextplaysearch.com)?

@aaronpoweruser
Copy link

No, I have never heard of that domain, I am not behind a vpn or proxy.

@stavros-k
Copy link
Contributor

stavros-k commented Jan 31, 2024

No, I have never heard of that domain, I am not behind a vpn or proxy.

You might wanna check your DNS setup. something seems to high-jacking requests and redirecting somewhere else.
This seems to be the issue in your case.

@aaronpoweruser
Copy link

Updated DNS via router and true nas to new immediate affect (I did not flush dns cache so possible my changes did not take).

Tailscale is working after upgrading to
App Version:
1.58.2
Chart Version:
1.0.32

@maru801
Copy link

maru801 commented Feb 19, 2024

I decided to do a fresh install of the latest Truenas Scale release (v23.10.1.3) to see if I could get Tailscale to work with having all of my settings erased. Nothing.

After running Tailscale, when I try to check out the logs for it, it takes a good while of nothing showing up until I get the same 4 lines as @jenesuispasbavard states they're getting (all ending with the "context deadline exceeded" line).

I've looked around my router's settings to see if I could update the DNS like @aaronpoweruser did, but my router appears to not have anywhere I can do this myself.

I reverted back to Truenas Scale 22.12.4.2.

To note, I was able to almost get it to work one time. I tried running Tailscale with userspaces unchecked and host network checked (as others said to try out in this thread), and it almost worked. The app actually accepted the ssh key I gave it (and I was able to give access on my Tailscale homepage. However, it didn't do anything else after that. It just froze doing nothing.

@Cellobita
Copy link

SCALE 23.10.2 should be available tomorrow, but its bug tracker did not show any fixed issues obviously related to this. I have been using Tailscale in 23.10.1.3 and it is working perfectly for me, on all five SCALE devices that I have under my management (they all updated flawlessly to 1.58.2 a few days ago).

I know this is infuriating for those that can't get it to work, but still worth mentioning.

@maru801
Copy link

maru801 commented Feb 23, 2024

Just in case, I've tried running Tailscale again with Scale v23.10.2 and nothing.

Reiterating other's previous logs, here is what the log says (after loading for a minute):

boot: 2024/02/23 00:23:14 error checking get permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
boot: 2024/02/23 00:23:14 error checking update permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
boot: 2024/02/23 00:23:14 error checking patch permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": context deadline exceeded
boot: 2024/02/23 00:23:14 Getting authkey from kube secret: Get "https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": context deadline exceeded

@kingp0dd
Copy link

kingp0dd commented Mar 22, 2024

I have the same error on v.23.10.2

2024-03-22 19:44:42.236638+08:00boot: 2024/03/22 11:44:42 error checking update permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": dial tcp: lookup kubernetes.default.svc on 172.17.0.10:53: write udp 192.168.0.199:60342->172.17.0.10:53: write: operation not permitted
2024-03-22 19:44:42.237226+08:00boot: 2024/03/22 11:44:42 error checking patch permission on secret tailscale-tailscale-secret: Post "https://kubernetes.default.svc/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": dial tcp: lookup kubernetes.default.svc on 172.17.0.10:53: write udp 192.168.0.199:36978->172.17.0.10:53: write: operation not permitted
2024-03-22 19:44:42.237650+08:00boot: 2024/03/22 11:44:42 Getting authkey from kube secret: Get "https://kubernetes.default.svc/api/v1/namespaces/ix-tailscale/secrets/tailscale-tailscale-secret": dial tcp: lookup kubernetes.default.svc on 172.17.0.10:53: write udp 192.168.0.199:46061->172.17.0.10:53: write: operation not permitted```

Host Networking - enabled
Userspace - unchecked

edit: upgraded from TN Core to Scale. Does that matter?

reading on the previous comments,


Does anyone having this issue use custom domain and/or additional domains?
(In TrueNAS > Network > Global Configuration)

--> No

edit 2:

I am using an admin user (non-root). I tried to install it using the root user in the GUI too though, but I get the same error.

I tried changing my nameserver to 1.1.1.1 in Global Configuration, but still same error

Output of the k3s command:

sudo k3s kubectl get role -n ix-tailscale -o jsonpath={'.items'} | jq
[
  {
    "apiVersion": "rbac.authorization.k8s.io/v1",
    "kind": "Role",
    "metadata": {
      "annotations": {
        "meta.helm.sh/release-name": "tailscale",
        "meta.helm.sh/release-namespace": "ix-tailscale"
      },
      "creationTimestamp": "2024-03-22T13:04:41Z",
      "labels": {
        "app": "tailscale-1.0.35",
        "app.kubernetes.io/instance": "tailscale",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "tailscale",
        "app.kubernetes.io/version": "1.62.0",
        "helm-revision": "1",
        "helm.sh/chart": "tailscale-1.0.35",
        "release": "tailscale"
      },
      "managedFields": [
        {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "fieldsType": "FieldsV1",
          "fieldsV1": {
            "f:metadata": {
              "f:annotations": {
                ".": {},
                "f:meta.helm.sh/release-name": {},
                "f:meta.helm.sh/release-namespace": {}
              },
              "f:labels": {
                ".": {},
                "f:app": {},
                "f:app.kubernetes.io/instance": {},
                "f:app.kubernetes.io/managed-by": {},
                "f:app.kubernetes.io/name": {},
                "f:app.kubernetes.io/version": {},
                "f:helm-revision": {},
                "f:helm.sh/chart": {},
                "f:release": {}
              }
            },
            "f:rules": {}
          },
          "manager": "helm",
          "operation": "Update",
          "time": "2024-03-22T13:04:41Z"
        }
      ],
      "name": "tailscale",
      "namespace": "ix-tailscale",
      "resourceVersion": "72198",
      "uid": "2fc726c1-ad1d-4bfa-8b5e-ddaefa53e53e"
    },
    "rules": [
      {
        "apiGroups": [
          ""
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "create"
        ]
      },
      {
        "apiGroups": [
          ""
        ],
        "resourceNames": [
          "tailscale-tailscale-secret"
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "get",
          "update",
          "patch"
        ]
      }
    ]
  }
]

@maru801
Copy link

maru801 commented Apr 24, 2024

I tried once again to fix this issue now that the first stable release of Dragonfish is out for Scale. I updated to v24.04.0.

So I managed to fix my issue. Turns out it was the nameserver I was using. I was using my default gateway as one of the three nameservers.

I switched to the following:

  • Nameserver 1: 1.1.1.1
  • Nameserver 2: 1.0.0.1

I think I only needed one of the two, but either way, Tailscale loaded up fine after the change.

To add more detail, I found if I include my default gateway address as one of the three nameservers, it results in Tailscale not being able to load and get stuck with the permissions issue. So as long as I don't include at all my default gateway and use other DNS addresses, this issue is fixed for me.

@stavros-k
Copy link
Contributor

@maru801 That's an interesting find. Is your default gw one of those that ISPs send? Or is it some other like pf/opn sense or other brand? Any notable settings in the DNS configuration in your default gw?

I'm still not able to reproduce tho, I have my default gw as my only nameserver, on 2 locations.
One with pfsense and the other with unifi express. And I can't get the issue reproduced.

@maru801
Copy link

maru801 commented Apr 25, 2024

@stavros-k I have been using the default nameserver that's auto-populated when you first install Truenas. And yes, it's the default gateway that my ISP sends (my network is still running with an old ISP-provided all-in-one router+modem). I'm not using anything like pf/opn sense.

In fact, the only things I ever changed in the Global Config section for network is the hostname (and now the two nameserver additions). Everything else is how it was auto-populated when I installed Truenas.

I'm thinking that this issue might be regional or ISP specific. Like maybe everyone that gets this issue shares something in common with their ISP that's just incompatible with Tailscale.

I was using my ISP's default DNS server just fine on Bluefin. Anything newer so far (Cobia, Dragonfish) results in Tailscale not being able to start with my ISP's DNS server. I have no idea what changed in the code after Cobia to cause this.

I don't know if this is related, but if it helps (since it's also a network issue), I also found that with Dragonfish, I'm not able to access another server on my local network by using its hostname. I was able to on Bluefin. Now, I need to specify the IP address instead of the hostname.

@EnderSyth
Copy link

@stavros-k I'm also suffering from this issue after upgrading to the stable Dragonfish release (was working when on RC). I will try to provide all the instructions you've asked for above. I installed as root on 23 before upgrading to 24 RC then finally to 24 release which broke.

Using TailScale from TrueNAS not TrueCharts, I've enabled Advertise Exit Nodes with my local network under advertised routes. Userspace and Accept DNS unchecked, Host Network is checked (for the advertised routes).

Networking is through a setup bridge (br0) with a static IP, Nameservers is only gw.

root@truenas[~]# sudo k3s kubectl get secret -n ix-tailscale
sudo k3s kubectl get sa -n ix-tailscale
sudo k3s kubectl get deploy -n ix-tailscale tailscale -o jsonpath={'.spec.template.spec.automountServiceAccountToken'} | jq
sudo k3s kubectl get rolebinding -n ix-tailscale -o jsonpath={'.items'} | jq
sudo k3s kubectl get role -n ix-tailscale -o jsonpath={'.items'} | jq
NAME                              TYPE                 DATA   AGE
tailscale-tailscale-secret        Opaque               1      142m
sh.helm.release.v1.tailscale.v2   helm.sh/release.v1   1      8m53s
NAME        SECRETS   AGE
default     0         142m
tailscale   0         142m
true
[
  {
    "apiVersion": "rbac.authorization.k8s.io/v1",
    "kind": "RoleBinding",
    "metadata": {
      "annotations": {
        "meta.helm.sh/release-name": "tailscale",
        "meta.helm.sh/release-namespace": "ix-tailscale"
      },
      "creationTimestamp": "2024-04-25T16:23:07Z",
      "labels": {
        "app": "tailscale-1.0.38",
        "app.kubernetes.io/instance": "tailscale",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "tailscale",
        "app.kubernetes.io/version": "1.64.2",
        "helm-revision": "2",
        "helm.sh/chart": "tailscale-1.0.38",
        "release": "tailscale"
      },
      "managedFields": [
        {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "fieldsType": "FieldsV1",
          "fieldsV1": {
            "f:metadata": {
              "f:annotations": {
                ".": {},
                "f:meta.helm.sh/release-name": {},
                "f:meta.helm.sh/release-namespace": {}
              },
              "f:labels": {
                ".": {},
                "f:app": {},
                "f:app.kubernetes.io/instance": {},
                "f:app.kubernetes.io/managed-by": {},
                "f:app.kubernetes.io/name": {},
                "f:app.kubernetes.io/version": {},
                "f:helm-revision": {},
                "f:helm.sh/chart": {},
                "f:release": {}
              }
            },
            "f:roleRef": {},
            "f:subjects": {}
          },
          "manager": "helm",
          "operation": "Update",
          "time": "2024-04-25T18:37:06Z"
        }
      ],
      "name": "tailscale",
      "namespace": "ix-tailscale",
      "resourceVersion": "2644086",
      "uid": "7babb8b6-f172-40a3-8c86-f2d46ba662e1"
    },
    "roleRef": {
      "apiGroup": "rbac.authorization.k8s.io",
      "kind": "Role",
      "name": "tailscale"
    },
    "subjects": [
      {
        "kind": "ServiceAccount",
        "name": "tailscale",
        "namespace": "ix-tailscale"
      }
    ]
  }
]
[
  {
    "apiVersion": "rbac.authorization.k8s.io/v1",
    "kind": "Role",
    "metadata": {
      "annotations": {
        "meta.helm.sh/release-name": "tailscale",
        "meta.helm.sh/release-namespace": "ix-tailscale"
      },
      "creationTimestamp": "2024-04-25T16:23:07Z",
      "labels": {
        "app": "tailscale-1.0.38",
        "app.kubernetes.io/instance": "tailscale",
        "app.kubernetes.io/managed-by": "Helm",
        "app.kubernetes.io/name": "tailscale",
        "app.kubernetes.io/version": "1.64.2",
        "helm-revision": "2",
        "helm.sh/chart": "tailscale-1.0.38",
        "release": "tailscale"
      },
      "managedFields": [
        {
          "apiVersion": "rbac.authorization.k8s.io/v1",
          "fieldsType": "FieldsV1",
          "fieldsV1": {
            "f:metadata": {
              "f:annotations": {
                ".": {},
                "f:meta.helm.sh/release-name": {},
                "f:meta.helm.sh/release-namespace": {}
              },
              "f:labels": {
                ".": {},
                "f:app": {},
                "f:app.kubernetes.io/instance": {},
                "f:app.kubernetes.io/managed-by": {},
                "f:app.kubernetes.io/name": {},
                "f:app.kubernetes.io/version": {},
                "f:helm-revision": {},
                "f:helm.sh/chart": {},
                "f:release": {}
              }
            },
            "f:rules": {}
          },
          "manager": "helm",
          "operation": "Update",
          "time": "2024-04-25T18:37:06Z"
        }
      ],
      "name": "tailscale",
      "namespace": "ix-tailscale",
      "resourceVersion": "2644085",
      "uid": "65fa5e42-5c4b-45b3-be63-1dc0c2e72089"
    },
    "rules": [
      {
        "apiGroups": [
          ""
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "create"
        ]
      },
      {
        "apiGroups": [
          ""
        ],
        "resourceNames": [
          "tailscale-tailscale-secret"
        ],
        "resources": [
          "secrets"
        ],
        "verbs": [
          "get",
          "update",
          "patch"
        ]
      }
    ]
  }
]

Any help would be greatly appreciated as I can't find any solutions in this thread that work for me.

@stavros-k
Copy link
Contributor

I'm thinking that this issue might be regional or ISP specific. Like maybe everyone that gets this issue shares something in common with their ISP that's just incompatible with Tailscale.

I don't think its Tailscale issue, because the error is that tailscale can't access the kubernetes secret store to get/set some details. But it indeed seems to be more related to DNS. (It's always DNS lol).
I'll see if I can dig more on that side now, and probably come back to ask for some outputs.
Thanks for the observation

@EnderSyth
Copy link

Okay I found a way to fix my issue, I'm going to post in hopes that this affects others.

I found at least two possible avenues of issues, but I'm honestly not sure which fixed it. I had setup a Bridge (br0) for my Home Assistant OS VM install on the TruenNAS and while everything seemed to work at first after the simple switch (Just setting up the br0 instance with the static IP of the old interface), I noticed that the issue in the logs were all about accessing the Kubernetes IP ranges (172.xxx.xxx.xxx).

So after digging around I found under | Apps > Settings > Advanced Settings | there is a section for specifying details about the route interface and it was empty. It seemed to not impact anything but I never checked this location before. I setup my router as the default gateway and my bridge here.
image

Then as @stavros-k mentioned its possibly DNS related I went to my Network page and put under Name Servers Quad9 and Cloudflair as Name Servers so that everything would be have some form of default (before it just had the Default Route with my router).
image

After this, for good measure, I rebooted the TrueNAS and when things came back up I was able to get TailScale to finally work again. (I did a full reinstall with a new key as part of my previous troubleshooting unsure if needed).

@Josh-Voyles
Copy link

Removing the app and reinstalling with userspace unchecked and host checked worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants