majestrate / lokinet-aware-demos

example applications of lokinet "aware" demo applications
Do What The F*ck You Want To Public License
1 stars 1 forks source link

telnet: could not resolve qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki/9009: Name or service not known #1

Closed raphael10-collab closed 3 years ago

raphael10-collab commented 3 years ago

In Ubuntu 20.04 Desktop I'm trying to run lokinet-aware-demos node.js version :

I first installed lokinet via deb repo:

(base) raphy@pc:~$ sudo curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg
[sudo] password for raphy:
(base) raphy@pc:~$ echo "deb https://deb.oxen.io $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/oxen.list
deb https://deb.oxen.io focal main
(base) raphy@pc:~$ sudo apt update
(base) raphy@pc:~$ sudo apt update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu focal InRelease
Hit:3 http://it.archive.ubuntu.com/ubuntu focal InRelease
Get:4 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:7 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1.075 kB]
Get:8 https://deb.oxen.io focal InRelease [4.686 B]
Get:9 https://deb.oxen.io focal/main i386 Packages [3.824 B]
Get:10 http://it.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [498 kB]
Get:11 https://deb.oxen.io focal/main amd64 Packages [14,5 kB]
Get:12 http://it.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [237 kB]
Get:13 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [282 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [739 kB]
Get:15 http://it.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [314 kB]
Get:16 http://it.archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [45,7 kB]
Get:17 http://it.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [825 kB]
Get:18 http://it.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [616 kB]
Get:19 http://it.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [329 kB]
Get:20 http://it.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Get:21 http://it.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.780 B]
Get:22 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [253 kB]
Get:23 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [146 kB]
Get:24 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24,5 kB]
Get:25 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58,1 kB]
Get:26 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Fetched 5.803 kB in 1s (4.284 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
(base) raphy@pc:~$ sudo apt list --upgradable
(base) raphy@pc:~$ sudo apt list --upgradable
Listing... Done
fprintd/focal-updates 1.90.9-1~ubuntu20.04.1 amd64 [upgradable from: 1.90.1-1ubuntu1]
gnome-shell-common/focal-updates,focal-updates 3.36.9-0ubuntu0.20.04.2 all [upgradable from: 3.36.9-0ubuntu0.20.04.1]
gnome-shell-extension-prefs/focal-updates 3.36.9-0ubuntu0.20.04.2 amd64 [upgradable from: 3.36.9-0ubuntu0.20.04.1]
gnome-shell/focal-updates 3.36.9-0ubuntu0.20.04.2 amd64 [upgradable from: 3.36.9-0ubuntu0.20.04.1]
initramfs-tools-bin/focal-updates 0.136ubuntu6.6 amd64 [upgradable from: 0.136ubuntu6.5]
initramfs-tools-core/focal-updates,focal-updates 0.136ubuntu6.6 all [upgradable from: 0.136ubuntu6.5]
initramfs-tools/focal-updates,focal-updates 0.136ubuntu6.6 all [upgradable from: 0.136ubuntu6.5]
libpam-fprintd/focal-updates 1.90.9-1~ubuntu20.04.1 amd64 [upgradable from: 1.90.1-1ubuntu1]
libpulse-mainloop-glib0/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]
libpulse0/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]
libpulsedsp/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]
pulseaudio-module-bluetooth/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]
pulseaudio-utils/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]
pulseaudio/focal-updates 1:13.99.1-1ubuntu3.11 amd64 [upgradable from: 1:13.99.1-1ubuntu3.10]

(base) raphy@pc:~$ sudo apt install lokinet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-image-5.8.0-53-generic linux-modules-5.8.0-53-generic linux-modules-extra-5.8.0-53-generic linux-objects-nvidia-460-5.8.0-53-generic
  linux-signatures-nvidia-5.8.0-53-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  liboxenmq1.2.5 lokinet-bin resolvconf
The following NEW packages will be installed:
  liboxenmq1.2.5 lokinet lokinet-bin resolvconf
0 upgraded, 4 newly installed, 0 to remove and 14 not upgraded.
Need to get 1.449 kB of archives.
After this operation, 4.581 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://it.archive.ubuntu.com/ubuntu focal/universe amd64 resolvconf all 1.82 [54,7 kB]
Get:2 https://deb.oxen.io focal/main amd64 liboxenmq1.2.5 amd64 1.2.5-1~ubuntu2004 [172 kB]
Get:3 https://deb.oxen.io focal/main amd64 lokinet-bin amd64 0.9.3-1~ubuntu2004 [1.182 kB]
Get:4 https://deb.oxen.io focal/main amd64 lokinet all 0.9.3-1~ubuntu2004 [41,0 kB]
Fetched 1.449 kB in 1s (1.056 kB/s)
Preconfiguring packages ...
Selecting previously unselected package liboxenmq1.2.5.
dpkg: warning: files list file for package 'droidcam' missing; assuming package has no files currently installed
(Reading database ... 267902 files and directories currently installed.)
Preparing to unpack .../liboxenmq1.2.5_1.2.5-1~ubuntu2004_amd64.deb ...
Unpacking liboxenmq1.2.5 (1.2.5-1~ubuntu2004) ...
Selecting previously unselected package lokinet-bin.
Preparing to unpack .../lokinet-bin_0.9.3-1~ubuntu2004_amd64.deb ...
Unpacking lokinet-bin (0.9.3-1~ubuntu2004) ...
Selecting previously unselected package lokinet.
Preparing to unpack .../lokinet_0.9.3-1~ubuntu2004_all.deb ...
Unpacking lokinet (0.9.3-1~ubuntu2004) ...
Selecting previously unselected package resolvconf.
Preparing to unpack .../resolvconf_1.82_all.deb ...
Unpacking resolvconf (1.82) ...
Setting up resolvconf (1.82) ...
Created symlink /etc/systemd/system/sysinit.target.wants/resolvconf.service → /lib/systemd/system/resolvconf.service.
Created symlink /etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.path → /lib/systemd/system/resolvconf-pull-resolved.path.
resolvconf-pull-resolved.service is a disabled or a static unit, not starting it.
Setting up liboxenmq1.2.5 (1.2.5-1~ubuntu2004) ...
Setting up lokinet-bin (0.9.3-1~ubuntu2004) ...
adduser: Warning: The home directory `/var/lib/lokinet' does not belong to the user you are currently creating.
Setting up lokinet (0.9.3-1~ubuntu2004) ...
[NFO] [lokinet](760) 2021-06-24 16:08:40.562 GMT [+0.000s] llarp/config/config.cpp:1292 Attempting to create config file for client at "/tmp/lokinet.5D
AVZZwEhE/lokinet.ini"
[NFO] [lokinet](760) 2021-06-24 16:08:40.562 GMT [+0.000s] llarp/config/config.cpp:1313 Generated new config "/tmp/lokinet.5DAVZZwEhE/lokinet.ini"

Creating config file /etc/loki/lokinet.ini with new version
[NFO] [lokinet](557) 2021-06-24 16:08:40.779 GMT [+0.000s] llarp/config/config.cpp:1292 Attempting to create config file for client at "/tmp/lokinet.TS
EFsyeyu1/lokinet.ini"
[NFO] [lokinet](557) 2021-06-24 16:08:40.779 GMT [+0.000s] llarp/config/config.cpp:1313 Generated new config "/tmp/lokinet.TSEFsyeyu1/lokinet.ini"

Creating config file /etc/loki/lokinet-testnet.ini with new version
Created symlink /etc/systemd/system/multi-user.target.wants/lokinet.service → /lib/systemd/system/lokinet.service.
Processing triggers for systemd (245.4-4ubuntu3.7) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for resolvconf (1.82) ...
(base) raphy@pc:~$

(base) raphy@pc:~$

(base) raphy@pc:~/Documents/RaphyMatters/lokinetinstallConfig$ sudo systemctl status lokinet
● lokinet.service - LokiNET: Anonymous Network layer thingydoo, client
     Loaded: loaded (/lib/systemd/system/lokinet.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-06-24 18:08:41 CEST; 1min 56s ago
   Main PID: 32703 (lokinet)
     Status: "v0.9.3 client | known/connected: 137/5 | path success:  [default 50%]"
      Tasks: 12 (limit: 38400)
     Memory: 5.3M
     CGroup: /system.slice/lokinet.service
             └─32703 /usr/bin/lokinet /var/lib/lokinet/lokinet.ini

giu 24 18:08:55 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:08:55.144 GMT [+13.506s] llarp/path/pathbuilder.cpp:346        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki has no first hop candidate
giu 24 18:08:55 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:08:55.395 GMT [+13.757s] llarp/path/pathbuilder.cpp:346        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki has no first hop candidate
giu 24 18:08:55 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:08:55.645 GMT [+14.007s] llarp/path/pathbuilder.cpp:346        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki has no first hop candidate
giu 24 18:08:56 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:08:56.144 GMT [+14.506s] llarp/path/pathbuilder.cpp:346        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki has no first hop candidate
giu 24 18:09:01 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:01.898 GMT [+20.260s] llarp/path/path.cpp:446        TX=2de3d5c3cc5cab843b810a7a5d3e8451 RX=e3d5c09cf3c7c25fb1a421efe5201144 waited for 10.005s and no path was built
giu 24 18:09:01 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:01.898 GMT [+20.260s] llarp/path/pathset.cpp:309        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki path build [path wf9ubxiz-9] timed out
giu 24 18:09:01 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:01.898 GMT [+20.260s] llarp/path/pathbuilder.cpp:473        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki build interval is now 0.200s
giu 24 18:09:04 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:04.899 GMT [+23.261s] llarp/path/path.cpp:446        TX=2a7aae580c524080779136c21221744b RX=89309ec99213d6b938b3a1af0ba1e646 waited for 10.005s and no path was built
giu 24 18:09:04 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:04.899 GMT [+23.261s] llarp/path/pathset.cpp:309        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki path build [path wf9ubxiz-12] timed out
giu 24 18:09:04 pc lokinet[32703]: [WRN] [](584) 2021-06-24 16:09:04.899 GMT [+23.261s] llarp/path/pathbuilder.cpp:473        endpoint:qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki build interval is now 0.300s

I then git cloned lokinet-aware-demos :

(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters$ git clone https://github.com/majestrate/lokinet-aware-demos.git
Cloning into 'lokinet-aware-demos'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 22 (delta 2), reused 15 (delta 1), pack-reused 0
Unpacking objects: 100% (22/22), 16.50 KiB | 1.65 MiB/s, done.
(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters$ cd lokinet-aware-demos/
(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters/lokinet-aware-demos$ ls -lah
total 36K
drwxrwxr-x 6 raphy raphy 4,0K giu 24 18:12 .
drwxrwxr-x 3 raphy raphy 4,0K giu 24 18:12 ..
drwxrwxr-x 8 raphy raphy 4,0K giu 24 18:12 .git
-rw-rw-r-- 1 raphy raphy    2 giu 24 18:12 .gitignore
drwxrwxr-x 2 raphy raphy 4,0K giu 24 18:12 go
-rw-rw-r-- 1 raphy raphy  483 giu 24 18:12 LICENSE
drwxrwxr-x 2 raphy raphy 4,0K giu 24 18:12 node-js
drwxrwxr-x 2 raphy raphy 4,0K giu 24 18:12 python
-rw-rw-r-- 1 raphy raphy  397 giu 24 18:12 readme.md
(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters/lokinet-aware-demos$ cd node-js/
(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters/lokinet-aware-demos/node-js$ ls -ah
.  ..  example.js  readme.md

And tried to run the demo:

(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters/lokinet-aware-demos/node-js$ node example.js 
listening on qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki:9009
from a lokinet enabled machine use "telnet qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki 9009" to run the 

demo

But I get:

(base) raphy@pc:~$ telnet qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki 9009
telnet: could not resolve qp8yyb1a5nneyg4rjaihouca6o7gmn1cb9cwyd3z1gcoys8sb5oy.loki/9009: Name or service not known

How to solve the problem?

majestrate commented 3 years ago

right now the network has a regression. we have a relay and client upgrade to push out to mainnet.

raphael10-collab commented 3 years ago

Thank you for your prompt reply. I'm going to wait for the upcoming upgrade, then

raphael10-collab commented 3 years ago

Following this guide: https://docs.loki.network/Lokinet/Guides/lokinet-linux-guide/ I manually entered the nameserver manually :

(base) raphy@pc:~$ sudo nano /etc/resolvconf/resolv.conf.d/head 

(base) raphy@pc:~$ sudo cat /etc/resolvconf/resolv.conf.d/head 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.3.2.1

(base) raphy@pc:~$ 

(base) raphy@pc:~$ sudo resolvconf -u
(base) raphy@pc:~$ sudo resolvconf -u
(base) raphy@pc:~$ sudo systemctl restart lokinet
(base) raphy@pc:~$ sudo systemctl status lokinet

and then updated lokinet :

(base) raphy@pc:~$ sudo apt update && sudo apt install lokinet && sudo lokinet-bootstrap && sudo systemctl restart lokinet
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu focal InRelease                                                                                                                             
Hit:3 http://it.archive.ubuntu.com/ubuntu focal InRelease                                                                                                                                                
Get:4 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                              
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                            
Get:6 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]                        
Get:7 http://it.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [499 kB]                            
Hit:8 https://deb.oxen.io focal InRelease                                               
Get:9 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1.077 kB]  
Get:10 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24,5 kB]
Get:11 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [282 kB]
Get:12 http://it.archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [13,6 kB]
Get:13 http://it.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [825 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58,1 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2.468 B]           
Get:16 http://it.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [330 kB]             
Get:17 http://it.archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [17,8 kB]
Get:18 http://it.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Get:19 http://it.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.780 B]
Fetched 3.461 kB in 1s (3.128 kB/s)                                    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lokinet is already the newest version (0.9.3-1~ubuntu2004).
The following packages were automatically installed and are no longer required:
  linux-image-5.8.0-53-generic linux-modules-5.8.0-53-generic linux-modules-extra-5.8.0-53-generic linux-objects-nvidia-460-5.8.0-53-generic linux-signatures-nvidia-5.8.0-53-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.

(base) raphy@pc:~/Documents/RaphyMatters/lokinet-matters/lokinet-aware-demos/node-js$ node example.js 
listening on iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki:9009
from a lokinet enabled machine use "telnet iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki 9009" to run the demo

(base) raphy@pc:~$ telnet iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki 9009
Trying 172.16.0.1...
Connected to iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki.
Escape character is '^]'.
init: iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki
recip: iwy8tocmt71zqxuarsshekrme3ft34gyteeog6fcajn4ek3dyxby.loki
Connection closed by foreign host.

So, now it seems working fine