lnet
                                
                                 lnet copied to clipboard
                                
                                    lnet copied to clipboard
                            
                            
                            
                        OtherError: [Errno 2] No such file or directory: 'lightningd': 'lightningd'
I'm trying to set up a testing Lightning network on regtest. I have bitcoind running on regtest and lightningd compiled. I'm using the client-server topology copied from the readme. I run lnet-cli from the lightning directory and get the following error:
$ lnet-cli start ../lnet/topologies/readme-client-server.dotfile 
 * Serving Flask app "lnet.web" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [14/May/2019 15:31:52] "GET / HTTP/1.1" 200 -
Starting ../lnet/topologies/readme-client-server.dotfile
Starting
Starting client
127.0.0.1 - - [14/May/2019 15:31:52] "POST /api HTTP/1.1" 200 -
INFO:werkzeug:127.0.0.1 - - [14/May/2019 15:31:52] "POST /api HTTP/1.1" 200 -
{'error': {'code': 500, 'data': None, 'message': "OtherError: [Errno 2] No such file or directory: 'lightningd': 'lightningd'", 'name': 'OtherError'}, 'id': '22b94923-9279-4f93-960c-030cf9a3dfc8', 'jsonrpc': '2.0'}
Is it looking for the lightningd directory, where is it supposed to be?
I wasn't able to reproduce that error (although I found so many other errors I believe this is an unfinished project), but maybe you could install lightningd globally? That's what I did. Run ./configure then make then sudo make install in your c-lightning directory.
After installing lightningd globally, lnet-cli start returns
127.0.0.1 - - [15/May/2019 17:29:27] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [15/May/2019 17:29:27] "POST /api HTTP/1.1" 200 -
{'id': '8b8aa15b-03e9-4ba6-830c-bdd2e332f549', 'jsonrpc': '2.0', 'result': 'Already started'}
but lnet-cli shutdown returns
127.0.0.1 - - [15/May/2019 17:29:32] "GET / HTTP/1.1" 200 -
Stopping nodes
127.0.0.1 - - [15/May/2019 17:29:32] "POST /api HTTP/1.1" 200 -
{'error': {'code': 500, 'data': None, 'message': "OtherError: 'Flask' object has no attribute 'node_factory'", 'name': 'OtherError'}, 'id': '011c050f-0942-4fab-8e63-e595276a8ce7', 'jsonrpc': '2.0'}
Well, now this thing neither starts nor shuts down properly :)
Well it started properly, but actually it didn't start any nodes in my experience. And as stuff this project is probably unfinished or needing some love, but I didn't look close enough. I was hoping you would work a little on it to get it going :P
Yes, will keep trying, help from @cdecker would also be appreciated :) This seems to be the only project to launch a testing network of real Lightning implementations, not merely a simulation... Might be really helpful in investigating the behavior of the real LN.
Yeah, I have a patch that actually looks into whether daemons are running or not and decides based on that if it is started or not. That'll fix the stuck-on-started issue.
@cdecker so when may I expect this patch to be published?