Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tailscale Won't start with Custom Kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Renkin42
n00b
n00b


Joined: 11 Jan 2024
Posts: 12
Location: McKinleyville, CA

PostPosted: Mon Mar 04, 2024 7:47 am    Post subject: Tailscale Won't start with Custom Kernel Reply with quote

I'm trying to set up tailscale on my system. It works if I use the distribution kernel, but that's actually causing video issues on my laptop. Using my modified config in /etc/kernel/config.d/ however Tailscale won't start. Running sudo tailscale login i get
Code:

Failed to connect to local Tailscale daemon for /localapi/v0/profiles/; not running? Error: dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory

and running rc-status default shows
Code:

 tailscale                                                               [ failed ]


I'm running kernel 6.6.16 and I've enabled wireguard, both built in and as a module, as well as all the older requitements listed in https://wiki.gentoo.org/wiki/WireGuard, but no dice. Any thoughts on what I might be missing?
Here is my custom config as it presently stands: https://gist.github.com/Renkin42/7eec44bb6a140e9c69f51d31e01c5bc3
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5036
Location: Bavaria

PostPosted: Mon Mar 04, 2024 2:53 pm    Post subject: Re: Tailscale Won't start with Custom Kernel Reply with quote

Renkin42 wrote:
Here is my custom config as it presently stands: https://gist.github.com/Renkin42/7eec44bb6a140e9c69f51d31e01c5bc3

I have never seen such a crappy kernel config file. If it was build with our Gentoo tools something went very wrong. If you have edited the .config then please read:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Never_edit_.config
In every case: Throw it away and do a new one.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Renkin42
n00b
n00b


Joined: 11 Jan 2024
Posts: 12
Location: McKinleyville, CA

PostPosted: Mon Mar 04, 2024 3:24 pm    Post subject: Re: Tailscale Won't start with Custom Kernel Reply with quote

pietinger wrote:
Renkin42 wrote:
Here is my custom config as it presently stands: https://gist.github.com/Renkin42/7eec44bb6a140e9c69f51d31e01c5bc3

I have never seen such a crappy kernel config file. If it was build with our Gentoo tools something went very wrong. If you have edited the .config then please read:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Never_edit_.config
In every case: Throw it away and do a new one.

Ah, apologies. I suppose I wasn’t clear on this point. That isn’t a complete config, but rather a diff against the distribution kernel as explained here: https://wiki.gentoo.org/wiki/Project:Distribution_Kernel#Using_.2Fetc.2Fkernel.2Fconfig.d
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5036
Location: Bavaria

PostPosted: Mon Mar 04, 2024 4:25 pm    Post subject: Re: Tailscale Won't start with Custom Kernel Reply with quote

Renkin42 wrote:
[...] That isn’t a complete config, but rather a diff against the distribution kernel [...]

Aah ... :lol: ... okay ...

Okay, first of all: Are you sure it is a problem related to the kernel configuration ? (Because we dont know your error messages from tailscale.)

Let me say it is hard to check the configuration if it is only a part (because we do not know the configuration of the dist-kernel by heart).

Usually we want a complete .config and also the output of "dmesg" ( https://wiki.gentoo.org/wiki/User:Pietinger/Overview_of_System_Information ).

What I can say is: This is bad (but probably not the cause of the problem):
Code:
# CONFIG_X86_X2APIC is not set
# CONFIG_X86_CPU_RESCTRL is not set
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set

CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y

CONFIG_DEFAULT_MMAP_MIN_ADDR=4096

# CONFIG_LRU_GEN is not set

(see more in: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.6 )

You could use this configuration as a guide:
https://gitlab.com/vitaly-zdanevich-configs/linux-kernel-thinkpad-t430/-/blob/e0190d62ab1c0f798e6e98b742578c2ffec9899e/.config

OR ... what I would suggest (because I did the same when configuring for my firewall):

Enable almost everything in Networking support ---> Networking options ---> Network packet filtering framework (Netfilter) ---> as <M>odule; then start tailscale; then check with "lsmod" what you really need ... later ... you can disable everything not needed ... ;-)

As an example: Maybe you miss "# CONFIG_IP6_NF_RAW is not set" ... maybe more ...
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Renkin42
n00b
n00b


Joined: 11 Jan 2024
Posts: 12
Location: McKinleyville, CA

PostPosted: Mon Mar 04, 2024 7:20 pm    Post subject: Reply with quote

Thank you for that guide, I’ll definitely be giving it a good look-over! I’m fairly confident it’s kernel-related since disabling my custom configuration and re-emerging gentoo-kernel did seemingly fix the issue (but introduced other unrelated ones while making the compile over 5x longer). When I get home I’ll try deleting those lines you pointed out, and then try your netfilter module suggestion. Failing that I’ll see if I can grab a complete config and go from there.
Back to top
View user's profile Send private message
Renkin42
n00b
n00b


Joined: 11 Jan 2024
Posts: 12
Location: McKinleyville, CA

PostPosted: Tue Mar 05, 2024 12:55 am    Post subject: Reply with quote

All right, sadly no luck with the lines you pointed out or enabling everything in netfilter.
Here is my .config in full now: https://gist.github.com/Renkin42/5b46490a832cd8bbdfda0dc283793b57
And here is the output of grep "tailscale" /var/log/* : https://gist.github.com/Renkin42/de66ccf039154caec15a77b640690bb3
Not seeing much of interest, just the service exiting with code 1 and being respawned over and over until it gives up. Not finding any info on other logs, their docs just say to check journalctl, ie systemd which I don't have
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5036
Location: Bavaria

PostPosted: Tue Mar 05, 2024 1:16 am    Post subject: Reply with quote

It is stopping here:
Code:
/var/log/syslog:Mar  3 21:39:05 tonberry dhcpcd[1974]: tailscale0: soliciting an IPv6 router
/var/log/syslog:Mar  3 22:05:01 tonberry supervise-daemon[3046]: stopping /usr/sbin/tailscaled, pid 3047

So I guess there is a problem with IPv6 options ... unfortunately, the example configuration we have is IPv4 only ... so I would try to enable every IPv6 option. You have:
Code:
CONFIG_IPV6=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
# CONFIG_INET6_ESP_OFFLOAD is not set
# CONFIG_INET6_ESPINTCP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_IPV6_ILA is not set
CONFIG_INET6_TUNNEL=y
# CONFIG_IPV6_VTI is not set
CONFIG_IPV6_SIT=y
# CONFIG_IPV6_SIT_6RD is not set
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_FOU=y
CONFIG_IPV6_FOU_TUNNEL=y
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_IPV6_MROUTE is not set
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IPV6_IOAM6_LWTUNNEL is not set

Try to enable everything for IPv6 ... then go back step by step ... maybe it is only a missing CONFIG_IPV6_MULTIPLE_TABLES (and/or CONFIG_IPV6_MROUTE).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum