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

lthnvpnd "mgmt" process not responding to commands #145

Open
bodane opened this issue Apr 11, 2022 · 1 comment
Open

lthnvpnd "mgmt" process not responding to commands #145

bodane opened this issue Apr 11, 2022 · 1 comment

Comments

@bodane
Copy link
Contributor

bodane commented Apr 11, 2022

lthnvpnd is running along with the dependant processes such as rpc wallet.
lthnvpnd process is running at 100% presently, a separate issue to look at.

MiB Mem :  24015.2 total,    405.1 free,   1214.4 used,  22395.7 buff/cache
MiB Swap:   8192.0 total,   8187.0 free,      5.0 used.  22399.9 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
    147 lthn      20   0   34656  28960   9556 R  99.7   0.1  26:49.11 lthnvpnd
      1 lthn      20   0    5852   3308   3068 S   0.0   0.0   0:00.04 entrypoint-leth
      7 lthn      20   0    5984   3860   3316 S   0.0   0.0   0:00.00 bash
    127 root      20   0   63236  10920   5836 S   0.0   0.0   0:00.00 squid
    134 proxy     20   0  105736  32220  13440 S   0.0   0.1   0:00.18 squid
    135 proxy     20   0    5744   1748   1592 S   0.0   0.0   0:00.04 pinger
    138 lthn      20   0    6008   3104   2376 S   0.0   0.0   0:00.01 screen
    139 lthn      20   0    2412    600    524 S   0.0   0.0   0:00.01 sh
    151 lthn      20   0  460812  50236   9736 S   0.0   0.2   0:01.38 lethean-wallet-
    203 lthn      20   0 1129068   4448   1768 S   0.0   0.0   0:01.06 haproxy
    219 lthn      20   0       0      0      0 Z   0.0   0.0   0:00.11 lthnvpnd
    380 lthn      20   0    8916   3748   3192 R   0.0   0.0   0:00.01 top

$ echo "help" | socat stdio /opt/lthn/var/run/mgmt
$

No output returned upon execution of the command. Expect command options to output which is referenced here .

Steps to replicate issue

Have not tried outside of a docker container.

  1. After easy deploy, I've updated some of the minimum dispatcher.ini and sdp.json fields I believe should be updated below:
mkdir -p ~/Lethean/vpn/etc ~/Lethean/vpn/log 
cd ~/Lethean/vpn

docker run --rm \
--mount type=bind,source=$(pwd)/etc,target=/opt/lthn/etc \
--mount type=bind,source=$(pwd)/log,target=/dev/log \
lthn/vpn easy-deploy

docker run -ti \
   --name lthn-sh \
   -p 8080:8080 \
   --mount type=bind,source=$(pwd)/etc,target=/opt/lthn/etc \
   --mount type=bind,source=$(pwd)/log,target=/dev/log \
   lthn/vpn sh

dispatcher.ini

provider-name=REDACTED
provider-terms=REDACTED

[service-1A]
name=REDACTED

sdp.json

/opt/lthn/bin/lvmgmt --generate-sdp \
--wallet-address REDACTED \
--sdp-provider-name "REDACTED" \
--sdp-service-id 1a \
--sdp-service-name "REDACTED" \
--sdp-service-type proxy \
--sdp-service-endpoint REDACTED \
--sdp-service-port 8080 \
--sdp-service-dlspeed 10 \
--sdp-service-ulspeed 10 \
--sdp-service-cost 0.10 \
--sdp-service-prepaid-mins 60 \
--sdp-service-verifications 1

! Followed up with edits to sdp.json for fields that "--generate-sdp" did not update/add.

"nodeType": "residential", <- field updated manually, didn't come across in "--generate-sdp" process.
"terms": "REDACTED", <- field added manually, didn't come across in "--generate-sdp" process.

"proxy": [
            {
               "endpoints": [ "REDACTED" ], <- field added manually, didn't come across in "--generate-sdp" process.
               "port": "8080/TCP"
            }
         ],
         "terms": "REDACTED", <- field added manually, didn't come across in "--generate-sdp" process.

An upload to the sdp would be the next step however wanting to test out locally before this stage and while the sdp is not yet up.

  1. Installed additional apps - socat (as per repo instructions for use of "mgmt") and screen (for dispatcher)
! Installed socat and screen
sudo apt-get install -y socat screen

! Put across the lethean base squid config just incase not used, default config file didn't match.
sudo cp /opt/lthn/etc/squid.conf /etc/squid/squid.conf

! Squid service wasn't up at this point, and does appear to come up during step4 where the script should start it.
sudo /etc/init.d/squid start
  1. Then ran dispatcher run script and tried using the management interface.
screen -S dispatcher
cd /
./entrypoint-lethean-vpn.sh run
Ctrl+a+d

echo "help" | socat stdio /opt/lthn/var/run/mgmt
(no output returned)
@Snider
Copy link
Contributor

Snider commented Apr 12, 2022

ty, will let you know when i have time to look at this.

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

No branches or pull requests

2 participants