create namespace error : ephemeral_node_inactivity_timeout #90

Closed
opened 2025-12-29 01:22:39 +01:00 by adam · 16 comments
Owner

Originally created by @changchichung on GitHub (Dec 7, 2021).

download headscale binary from latest release and try to create my first namespace , but headscale return some error messages like

2021-12-07 09:58:25 [changch@hqdc034 Downloads]$ ./headscale_0.11.0_linux_amd64 namespaces create em
An updated version of Headscale has been found (0.12.0-beta1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases
2021/12/07 09:58:36 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s

any suggestions??

Originally created by @changchichung on GitHub (Dec 7, 2021). download headscale binary from latest release and try to create my first namespace , but headscale return some error messages like ``` 2021-12-07 09:58:25 [changch@hqdc034 Downloads]$ ./headscale_0.11.0_linux_amd64 namespaces create em An updated version of Headscale has been found (0.12.0-beta1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases 2021/12/07 09:58:36 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s ``` any suggestions??
adam closed this issue 2025-12-29 01:22:39 +01:00
Author
Owner

@EvilBlood commented on GitHub (Dec 10, 2021):

Hi i have the same issue with Docker (0.11.0)

docker run -v headscale:/etc/headscale/ -p 127.0.0.1:8080:8080 headscale/headscale:0.11.0 headscale namespaces create myfirstnamespace
2021/12/10 10:32:28 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s

@EvilBlood commented on GitHub (Dec 10, 2021): Hi i have the same issue with Docker (0.11.0) > docker run -v headscale:/etc/headscale/ -p 127.0.0.1:8080:8080 headscale/headscale:0.11.0 headscale namespaces create myfirstnamespace 2021/12/10 10:32:28 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s
Author
Owner

@restanrm commented on GitHub (Dec 10, 2021):

You should set ephemeral_node_inactivity_timeout to more than 65 seconds in your configuration file. This limit is set to allow small deconnexion of ephemeral nodes without losing the IP address.

@restanrm commented on GitHub (Dec 10, 2021): You should set `ephemeral_node_inactivity_timeout` to more than 65 seconds in your configuration file. This limit is set to allow small deconnexion of ephemeral nodes without losing the IP address.
Author
Owner

@EvilBlood commented on GitHub (Dec 10, 2021):

I used the example configuration with 30m for ephemeral_node_inactivity_timeout

@EvilBlood commented on GitHub (Dec 10, 2021): I used the example configuration with 30m for ephemeral_node_inactivity_timeout
Author
Owner

@restanrm commented on GitHub (Dec 10, 2021):

Sorry, I'm only a user. I hadn't any issue with setting this. You used the config-example.yaml from 0.11 git tag ?

@restanrm commented on GitHub (Dec 10, 2021): Sorry, I'm only a user. I hadn't any issue with setting this. You used the `config-example.yaml` from [0.11 git tag](https://github.com/juanfont/headscale/blob/v0.11.0/config-example.yaml) ?
Author
Owner

@EvilBlood commented on GitHub (Dec 10, 2021):

I tried the file from main Branch now with the version from tag 0.11 i got:

root@docker:~# docker run -v headscale:/etc/headscale/ -p 127.0.0.1:8080:8080 headscale/headscale:0.11.0 headscale namespaces create myfirstnamespace
2021/12/10 18:35:02 Error initializing: open /etc/headscale/private.key: no such file or directory

@EvilBlood commented on GitHub (Dec 10, 2021): I tried the file from main Branch now with the version from tag 0.11 i got: > root@docker:~# docker run -v headscale:/etc/headscale/ -p 127.0.0.1:8080:8080 headscale/headscale:0.11.0 headscale namespaces create myfirstnamespace 2021/12/10 18:35:02 Error initializing: open /etc/headscale/private.key: no such file or directory
Author
Owner

@restanrm commented on GitHub (Dec 10, 2021):

Have you created a private-key with wireguard ?

@restanrm commented on GitHub (Dec 10, 2021): Have you created a `private-key` with wireguard ?
Author
Owner

@EvilBlood commented on GitHub (Dec 10, 2021):

Have you created a private-key with wireguard ?

my fault! i used the docs from main not from tag 0.11.0

@EvilBlood commented on GitHub (Dec 10, 2021): > Have you created a `private-key` with wireguard ? my fault! i used the docs from main not from tag 0.11.0
Author
Owner

@extense-consulting commented on GitHub (Dec 22, 2021):

Hi, I have this issue as well and unfortunately I've not been able to find a solution in this thread or the issue tracker. I've installed v0.12.0-beta2 and v.0.11.00 and used the config-sample.yaml file to setup. It's still complaining about the ephemeral_node_inactivity_timeout parameter not set.

Error message:
Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s

config.yaml
ephemeral_node_inactivity_timeout: 30m (No double quotes added, just this line from the sample)

Error when starting the service:

sudo systemctl status headscale
● headscale.service - headscale
     Loaded: loaded (/etc/systemd/system/headscale.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2021-12-22 12:44:32 CET; 7min ago
    Process: 1899 ExecStart=/opt/headscale/bin/headscale serve (code=exited, status=1/FAILURE)
   Main PID: 1899 (code=exited, status=1/FAILURE)
        CPU: 191ms

Dec 22 12:44:32 b01 systemd[1]: Started headscale.
Dec 22 12:44:32 b01 headscale[1899]: 2021/12/22 12:44:32 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s
Dec 22 12:44:32 b01 systemd[1]: headscale.service: Main process exited, code=exited, status=1/FAILURE
Dec 22 12:44:32 b01 systemd[1]: headscale.service: Failed with result 'exit-code'.

When using the command:

headscale serve
2021/12/22 12:52:23 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s

I did however have an issue with creating the private.key. I had to perform:
sudo wg genkey
the key is displayed
sudo nano /opt/headscale/config/private.key
store the key in the file

Is it possible to help me with this?

@extense-consulting commented on GitHub (Dec 22, 2021): Hi, I have this issue as well and unfortunately I've not been able to find a solution in this thread or the issue tracker. I've installed v0.12.0-beta2 and v.0.11.00 and used the config-sample.yaml file to setup. It's still complaining about the `ephemeral_node_inactivity_timeout` parameter not set. Error message: `Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s` config.yaml `ephemeral_node_inactivity_timeout: 30m` (No double quotes added, just this line from the sample) Error when starting the service: ``` sudo systemctl status headscale ● headscale.service - headscale Loaded: loaded (/etc/systemd/system/headscale.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2021-12-22 12:44:32 CET; 7min ago Process: 1899 ExecStart=/opt/headscale/bin/headscale serve (code=exited, status=1/FAILURE) Main PID: 1899 (code=exited, status=1/FAILURE) CPU: 191ms Dec 22 12:44:32 b01 systemd[1]: Started headscale. Dec 22 12:44:32 b01 headscale[1899]: 2021/12/22 12:44:32 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s Dec 22 12:44:32 b01 systemd[1]: headscale.service: Main process exited, code=exited, status=1/FAILURE Dec 22 12:44:32 b01 systemd[1]: headscale.service: Failed with result 'exit-code'. ``` When using the command: ``` headscale serve 2021/12/22 12:52:23 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s ``` I did however have an issue with creating the private.key. I had to perform: `sudo wg genkey` the key is displayed `sudo nano /opt/headscale/config/private.key` store the key in the file Is it possible to help me with this?
Author
Owner

@cure commented on GitHub (Dec 23, 2021):

This error message

Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s

essentially means that Headscale could not find its configuration file. It should give you a better error message, that's a bug (I will fix that when I find some time).

I would suggest you stick to the v0.11 release for now, and follow the 0.11 release notes: https://github.com/juanfont/headscale/blob/v0.11.0/docs/Running.md

If you start from a clean slate with those instructions and v0.11 release binary, does that help?

@cure commented on GitHub (Dec 23, 2021): This error message ``` Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s ``` essentially means that Headscale could not find its configuration file. It should give you a better error message, that's a bug (I will fix that when I find some time). I would suggest you stick to the v0.11 release for now, and follow the 0.11 release notes: https://github.com/juanfont/headscale/blob/v0.11.0/docs/Running.md If you start from a clean slate with those instructions and v0.11 release binary, does that help?
Author
Owner

@changchichung commented on GitHub (Dec 28, 2021):

@cure

I found that even I download 0.11.0 binary from release , I still need to run the command in directory which cloned from github even I move the binary code to some other directory

take a look at this

chchang@headscale:~/git/headscale$ which headscale_0.11.0 
/usr/local/bin/headscale_0.11.0

so my headscale binary file is in /usr/local/bin which include in $PATH
but when I try to run the command out of the repository folder , that ephemeral_node_inactivity_timeout will happened.

chchang@headscale:~$ headscale_0.11.0 nodes list -n mc
An updated version of Headscale has been found (0.12.1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases
2021/12/28 08:18:10 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s
chchang@headscale:~$ 

let's go back the repository folder and try the same command.

chchang@headscale:~/git/headscale$ headscale_0.11.0 nodes list -n mc
An updated version of Headscale has been found (0.12.1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases
ID | Name                    | NodeKey | Namespace | IP address | Ephemeral | Last seen           | Online
1  | chchang-ThinkPad-T470   | [AJ5pV] | mc        | 100.64.0.1 | false     | 2021-12-28 00:18:19 | true  
32 | hqdc034.abc.com             | [/Bs4C]  | mc        | 100.64.0.2 | false     | 2021-12-28 00:18:44 | true  
chchang@headscale:~/git/headscale$ 

it works perfectly !

I will say this might be a bug in headscale ??

@changchichung commented on GitHub (Dec 28, 2021): @cure I found that even I download 0.11.0 binary from release , I still need to run the command in directory which cloned from github even I move the binary code to some other directory take a look at this ``` chchang@headscale:~/git/headscale$ which headscale_0.11.0 /usr/local/bin/headscale_0.11.0 ``` so my headscale binary file is in /usr/local/bin which include in $PATH but when I try to run the command out of the repository folder , that ephemeral_node_inactivity_timeout will happened. ``` chchang@headscale:~$ headscale_0.11.0 nodes list -n mc An updated version of Headscale has been found (0.12.1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases 2021/12/28 08:18:10 Error initializing: ephemeral_node_inactivity_timeout () is set too low, must be more than 1m5s chchang@headscale:~$ ``` let's go back the repository folder and try the same command. ``` chchang@headscale:~/git/headscale$ headscale_0.11.0 nodes list -n mc An updated version of Headscale has been found (0.12.1 vs. your current v0.11.0). Check it out https://github.com/juanfont/headscale/releases ID | Name | NodeKey | Namespace | IP address | Ephemeral | Last seen | Online 1 | chchang-ThinkPad-T470 | [AJ5pV] | mc | 100.64.0.1 | false | 2021-12-28 00:18:19 | true 32 | hqdc034.abc.com | [/Bs4C] | mc | 100.64.0.2 | false | 2021-12-28 00:18:44 | true chchang@headscale:~/git/headscale$ ``` it works perfectly ! I will say this might be a bug in headscale ??
Author
Owner

@cure commented on GitHub (Dec 28, 2021):

@changchichung headscale has a lookup order for its configuration file, please check https://github.com/juanfont/headscale/blob/v0.11.0/docs/Configuration.md:

Headscale will look for a configuration file named config.yaml (or config.json) in the following order:

* /etc/headscale
* ~/.headscale
* current working directory

It sounds like you have not moved your configuration file into either /etc/headscale or ~/.headscale.

@cure commented on GitHub (Dec 28, 2021): @changchichung headscale has a lookup order for its configuration file, please check https://github.com/juanfont/headscale/blob/v0.11.0/docs/Configuration.md: <pre> Headscale will look for a configuration file named config.yaml (or config.json) in the following order: * /etc/headscale * ~/.headscale * current working directory </pre> It sounds like you have not moved your configuration file into either `/etc/headscale` or `~/.headscale`.
Author
Owner

@extense-consulting commented on GitHub (Dec 29, 2021):

I checked with 0.11.0 and 0.12.1, I had the same issue as @changchichung . I tested @changchichung solution above, and I can verify that this is a workaround. I added headscale as a service with the workingdirectory attribute, this works as well:

sudo nano /etc/systemd/system/headscale.service

[Unit]
Description=headscale
After=network.target postgresql.service

[Service]
WorkingDirectory=/opt/headscale/config
ExecStart=headscale serve
Environment=GIN_MODE=release

[Install]
WantedBy=multi-user.target
@extense-consulting commented on GitHub (Dec 29, 2021): I checked with 0.11.0 and 0.12.1, I had the same issue as @changchichung . I tested @changchichung solution above, and I can verify that this is a workaround. I added headscale as a service with the `workingdirectory` attribute, this works as well: `sudo nano /etc/systemd/system/headscale.service` ``` [Unit] Description=headscale After=network.target postgresql.service [Service] WorkingDirectory=/opt/headscale/config ExecStart=headscale serve Environment=GIN_MODE=release [Install] WantedBy=multi-user.target ```
Author
Owner

@changchichung commented on GitHub (Dec 30, 2021):

thanks to @cure
after remove related files (config.yaml , private.key ) to /etc/headscale/
now I can use supervisor to manage headscale .

@changchichung commented on GitHub (Dec 30, 2021): thanks to @cure after remove related files (config.yaml , private.key ) to /etc/headscale/ now I can use supervisor to manage headscale .
Author
Owner

@gbnichol commented on GitHub (Jan 21, 2022):

I ran into the "ephemeral_node_inactivity_timeout () is set too low" issue running headscale in a container with podman (rather than Docker). The problem was that the headscale process was unable to read the config.yaml file. I am running on CentOS 8 with selinux enforcing. The solution was to append :z or :Z to the volume mount arguments.

@gbnichol commented on GitHub (Jan 21, 2022): I ran into the "ephemeral_node_inactivity_timeout () is set too low" issue running headscale in a container with podman (rather than Docker). The problem was that the headscale process was unable to read the config.yaml file. I am running on CentOS 8 with selinux enforcing. The solution was to append :z or :Z to the volume mount arguments.
Author
Owner

@wpeckr commented on GitHub (Mar 18, 2022):

You will also get this message if you have a parse error in your `config.yaml'.

@wpeckr commented on GitHub (Mar 18, 2022): You will also get this message if you have a parse error in your `config.yaml'.
Author
Owner

@kradalby commented on GitHub (Jun 3, 2022):

I'll reopen this as we need a better error message for "config file not found" and a better default for ephemeral node timeout.

@kradalby commented on GitHub (Jun 3, 2022): I'll reopen this as we need a better error message for "config file not found" and a better default for ephemeral node timeout.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#90