Closed Syone closed 1 year ago
What is in your lokinet.ini now, in particular where you set these options? It sounds like something wasn't added as expected.
Just set public-ip and public-port in the [router] section
I've got this error in the Lokinet client due to insufficient permissions to read the file for the user we're trying to run lokinet as. Could this be the reason why, as it appears to be that the configuration is trying to be read without switching to the correct user group (_lokinet:_loki IIRC)?
Edit: There's an open issue for this https://github.com/oxen-io/lokinet/issues/1970
Lokinet runs from the beginning as the _lokinet
user; what is the owner and permission of the config file?
Those are the normal permissions, so doesn't look like a permissions issue.
I'm thinking then that there must be something else wrong in the config file; run this, which should show any uncommented lines, and see if there's anything that looks strange in it:
sudo grep -Ev '^#|^$' /etc/loki/lokinet-router.ini
It should look something like this:
[router]
public-ip=1.2.3.4
public-port=5678
[network]
[dns]
bind=127.3.2.1:53
[bind]
[api]
[lokid]
rpc=ipc:///var/lib/oxen/oxend.sock
[bootstrap]
[logging]
[router]
public-ip=X.X.X.X
public-port=1090
[network]
[dns]
[bind]
[api]
[lokid]
enabled=1
rpc=ipc:///var/lib/oxen/oxend.sock
[bootstrap]
[logging]
Those are the normal permissions, so doesn't look like a permissions issue.
I'm thinking then that there must be something else wrong in the config file; run this, which should show any uncommented lines, and see if there's anything that looks strange in it:
sudo grep -Ev '^#|^$' /etc/loki/lokinet-router.ini
It should look something like this:
[router] public-ip=1.2.3.4 public-port=5678 [network] [dns] bind=127.3.2.1:53 [bind] [api] [lokid] rpc=ipc:///var/lib/oxen/oxend.sock [bootstrap] [logging]
But the user seems to be attempting to run lokinet as the default non-root (Linux) user, from what I can see in the image posted in the beginning.
@Chief36 you are right, in fact the lokinet-router service failed to start and I tried to run manually the command with my non-root user.
If I try to run it as root, I have this error:
You should not run lokinet as root; it has its own user (_loki
) under which it runs. Running it as root like that may well have changed permissions such that the proper lokinet run can't read/write files.
To try to get yourself back to some sane state, try:
sudo chown -R _lokinet:_loki /var/lib/lokinet
sudo systemctl start lokinet-router
sudo journalctl -u lokinet-router -af
# to check the output logsudo chown -R _loki:_lokinet /var/lib/lokinet
You mean _lokinet:_loki
I think
sudo chown -R _loki:_lokinet /var/lib/lokinet
You mean
_lokinet:_loki
I think
Whoops, yup. Edited.
Same error message:
What are the permissions on the /var/lib/lokinet directory itself? (ls -ld /var/lib/lokinet
)
it seems good:
ubuntu@instance-1:~$ ls -ld /var/lib/lokinet
drwxr-xr-x 5 _lokinet _loki 4096 Feb 7 13:53 /var/lib/lokinet
Oh, I'm dumb! I've been paying so much attention to the first error (which isn't actually a terminal error and should really be a warning) that I didn't read the second one, which is the problem. It's been a long week.
Okay.
To configure inbound links add this config into the [bind]
section of lokinet.ini:
inbound=10.2.3.4
this IP address should be the one where traffic coming into your configured public-ip gets forwarded. E.g. if your public IP/port is 1.2.3.4/5678 and traffic sent there goes to local interface address 10.2.3.4:5678 then you'd use 10.2.3.4:5678
here. (If you leave the port off, it uses the default port (1090), which is probably what you want).
Yes! It works!!! Thank you so much @jagerman I spent several days reading the explanations in the ini file but I haven't understand this I suggest to add a "Troubleshooting" section in the documention
I'm trying to install a service node on an ubuntu instance on OCI.
During the installation I had this message :
I have updated the ini file and set the public ip address as explained
But the lokinet-router service failed to start and when I try to run manually lokinet router, I have a failed to parse configuration error :Edit: But the lokinet-router service failed to start and when I try to run manually lokinet router as root, I have this error :