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

Is it possible to run NerlNet on single machine? #235

Open
dxv2k opened this issue Aug 19, 2023 · 1 comment
Open

Is it possible to run NerlNet on single machine? #235

dxv2k opened this issue Aug 19, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@dxv2k
Copy link

dxv2k commented Aug 19, 2023

Hi, I am new to this and wondering if there is any possible way we could run NerlNet on a single PC?

I've been attempting to set it up on my PC by following the example provided in the document with a changes to my local address and port only.

Steps to re-produce:

  • Successfully installed NerlNet via ./NerlNetInstall.sh
  • Setup Python environment via ./NerlnetJupyterEnvGenerator.sh -j ./examples/
  • Running example_run.ipynb to step api_server_instance.selectJsons() with following choices:
Architecture: 
0.	arch_1PCSIM6WorkerMNist.json

Connection Map Files
0.	conn_1Router1Client1S.json

Experiments Flow Files
1.	exp_1Worker1SourceHealth.json

I did change in arch_*.json by these changes only:

  "devices": [
    {
      "host": "0.0.0.0",
      "entities": "mainServer,c1,c2,c3,c4,c5,c6,s1,r1,r2,r3,r4,r5,r6,apiServer"
    }
  ],
  "apiServer": 
    {
      "host": "0.0.0.0",
      "port": "8080",
      "args": ""
    }
  ,
  "nerlGUI": 
    {
      "host": "0.0.0.0",
      "port": "8096",
      "args": ""
    }
  ,
  "mainServer": 
    {
      "host": "0.0.0.0",
      "port": "8484",
      "args": ""
    }
  • Successfully api_server_instance.sendJsonsToDevices() and received this log from apiServer
Sending JSON paths to devices...
Init JSONs sent to devices

But received this from NerlNet console

2023-08-19T19:36:32.616293+07:00 info: nerlNetServer_app/start@92: This device IP: "192.168.1.10"
2023-08-19T19:37:04.155398+07:00 info: nerlNetServer_app/start@98: ArchitectureAdderess: <<"arch.json">>, CommunicationMapAdderess : <<"conn.json">>
2023-08-19T19:37:04.177674+07:00 notice: Host IP="192.168.1.10"
2023-08-19T19:37:04.177983+07:00 error: crasher: initial call: application_master:init/4, pid: <0.186.0>, registered_name: [], exit: {{bad_return,{{nerlNetServer_app,start,[normal,[]]},{'EXIT',{{badkey,<<"192.168.1.10">>},[{erlang,map_get,[<<"192.168.1.10">>,#{<<"0.0.0.0">> => [mainServer,c1,c2,c3,c4,c5,c6,s1,r1,r2,r3,r4,r5,r6,apiServer]}],[{error_info,#{module => erl_erts_errors}}]},{jsonParser,json_to_ets,2,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},{line,136}]},{jsonParser,getHostEntities,3,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},{line,165}]},{nerlNetServer_app,parseJsonAndStartNerlnet,1,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},{line,144}]},{nerlNetServer_app,start,2,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},{line,100}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,293}]}]}}}},[{application_master,init,4,[{file,"application_master.erl"},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}, ancestors: [<0.185.0>], message_queue_len: 1, messages: [{'EXIT',<0.187.0>,normal}], links: [<0.185.0>,<0.44.0>], dictionary: [], trap_exit: true, status: running, heap_size: 610, stack_size: 28, reductions: 216; neighbours:
2023-08-19T19:37:04.178554+07:00 notice: Application: nerlNetServer. Exited: {bad_return,{{nerlNetServer_app,start,[normal,[]]},{'EXIT',{{badkey,<<"192.168.1.10">>},[{erlang,map_get,[<<"192.168.1.10">>,#{<<"0.0.0.0">> => [mainServer,c1,c2,c3,c4,c5,c6,s1,r1,r2,r3,r4,r5,r6,apiServer]}],[{error_info,#{module => erl_erts_errors}}]},{jsonParser,json_to_ets,2,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},{line,136}]},{jsonParser,getHostEntities,3,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},{line,165}]},{nerlNetServer_app,parseJsonAndStartNerlnet,1,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},{line,144}]},{nerlNetServer_app,start,2,[{file,"/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},{line,100}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,293}]}]}}}}. Type: temporary.
2023-08-19T19:37:04.179228+07:00 notice: Application: cowboy. Exited: stopped. Type: temporary.
2023-08-19T19:37:05.161489+07:00 notice: Application: ranch. Exited: stopped. Type: temporary.
2023-08-19T19:37:05.161603+07:00 notice: Application: cowlib. Exited: stopped. Type: temporary.
===> Failed to boot nerlNetServer for reason {bad_return,
                                                         {{nerlNetServer_app,
                                                           start,
                                                           [normal,[]]},
                                                          {'EXIT',
                                                           {{badkey,
                                                             <<"192.168.1.10">>},
                                                            [{erlang,map_get,
                                                              [<<"192.168.1.10">>,
                                                               #{<<"0.0.0.0">> =>
                                                                  [mainServer,
                                                                   c1,c2,c3,
                                                                   c4,c5,c6,
                                                                   s1,r1,r2,
                                                                   r3,r4,r5,
                                                                   r6,
                                                                   apiServer]}],
                                                              [{error_info,
                                                                #{module =>
                                                                   erl_erts_errors}}]},
                                                             {jsonParser,
                                                              json_to_ets,2,
                                                              [{file,
                                                                "/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},
                                                               {line,136}]},
                                                             {jsonParser,
                                                              getHostEntities,
                                                              3,
                                                              [{file,
                                                                "/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/init/jsonParser.erl"},
                                                               {line,165}]},
                                                             {nerlNetServer_app,
                                                              parseJsonAndStartNerlnet,
                                                              1,
                                                              [{file,
                                                                "/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},
                                                               {line,144}]},
                                                             {nerlNetServer_app,
                                                              start,2,
                                                              [{file,
                                                                "/media/ubuntu_data/NErlNet/src_erl/Communication_Layer/http_Nerlserver/src/nerlNetServer_app.erl"},
                                                               {line,100}]},
                                                             {application_master,
                                                              start_it_old,4,
                                                              [{file,
                                                                "application_master.erl"},
                                                               {line,
                                                                293}]}]}}}}

I did check again in this dir /src_erl/Communication_Layer seem like it successful transfer the json but unable to parse.

Can you help me to get it up and running please?
Thanks a lot!

@leondavi
Copy link
Owner

leondavi commented Sep 1, 2023

Thank you for trying Nerlnet.
It seems that an important step was omitted from our Readme.

You should build Nerlnet using the following script (after calling NerlnetInstall.sh):
./NerlnetBuild.sh

You can run Nerlnet on a single machine.
I think that IP address should be self-loop 127.0.0.1 or valid LAN interface address (not 0.0.0.0).
In your case Nerlnet found that your device IP is 192.168.1.10 but you wrote in json 0.0.0.0
Try to change the IP in Json (host field) to 192.168.1.10

You can add/change subnets.nerlconfig a subnet to fit your LAN.

You can contact me by an email to schedule an online meeting for further discussion.
leondavi@post.bgu.ac.il

@leondavi leondavi added the help wanted Extra attention is needed label Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants