Error in connection to the lab and experiment server

15 views
Skip to first unread message

Alexander Veligorsky

unread,
Aug 30, 2022, 1:11:11 PM8/30/22
to weblabdeusto
Dear WebLabDeusto team,

I have faced with the problem in configuration of WebLabDeusto. I'd like to have an laboratory server and experiment server on singleboard PC (RPi-4-2GB), whereas the core server will be on dedicated server. My configuration files in the attachment, the same files on both devices. Raspberry and server has local IP addresses. My WebLabDeusto instances on server and Raspberry created with different names (DigitalUkraine_Remote_Lab and sample), I have also created the instance on Raspberry Pi with the same name as on core host - it works the same.  The problem is the next. When I run the exp_host with the weblab-admin start sample --host exp_host and than core_host with the weblab-admin start DigitalUkraine_Remote_Lab --host core_host , I see the error in the terminal of the core host in 5 -7 seconds after the starting of the server: 

InternalServerCommunicationError: Unknown server error contacting http://10.30.150.61:65432 with HTTP after 0.00259113311768 seconds: ConnectionError(MaxRetryError("HTTPConnectionPool(host='10.30.150.61', port=65432): Max retries exceeded with url: /check_experiments_resources (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9994ef5950>: Failed to establish a new connection: [Errno 111] Connection refused',))",),)

It is looks like it is still used loopback and can't see host: 10.30.150.61 in the configuration file. I have done some simple Python3 program that run the socket server on RPi and also client on another PC - it can establish the connection to the RPi.

When I run the telnet -an on RPi when WebLabDeusto is running, I can see in the active internet connections
tcp 0 0 local address 127.0.0.1:65432 foreign address 0.0.0.0:* state listen.

In the same time, when I run my socket server - it shows
tcp 0 0 local address 10.30.150.61:65432 foreign address 0.0.0.0:* state listen.


What should I do to change the host address in exp_host and connect it to core_host as laboratory and experimental server?
configuration.yml
lab1_config.py
lab2_config.py
core_host_config.py

Pablo Orduña

unread,
Aug 31, 2022, 10:45:42 AM8/31/22
to weblab...@googlegroups.com
Hi Alexander,

Thank you for raising this. I have just made a change in the repository. Please "git pull" and run the setup.py install again.

Then, in your configuration.yml, wherever you have a process that you want to be listening in one IP address, add the "bind" next to it:

            protocols:
              port: 65432
              bind: 10.30.150.61

What receives is a string that is provided as bind() to the flask server. If you leave it empty, it will be listening only in localhost. If you put 10.30.150.61, only in that interface, and you might optionally want to put "10.30.150.61 127.0.0.1" or whatever (I don't think you need it in your setup, however).

On the other hand, I see in your configuration.yml that you might be programming your own experiments using the managed approach. We highly recommend using weblablib:


In the future, we are going to replace WebLab-Deusto for something else that will also be open source, but easier to maintain and using a more modern approach (and Python 3, etc.). That future new version will not support managed laboratories, and will rely on weblablib or in your own unmanaged library if you prefer as long as it is compatible with the unmanaged protocol that you can find in the documentation.

In the meantime, WebLab-Deusto is compatible with weblablib, and you can use weblablib with Python 3, etc. In LabsLand, all our laboratories are using weblablib. 

Just in case it helps, in all our (LabsLand) real-time labs, where we internally use WebLab-Deusto, our configuration is basically a single host, with a set of core servers (e.g., 4), each in their own process, a single laboratory server (in its own process), and then as many experiments as needed using weblablib (which you can have in multiple RPi or wherever, and more than one). I can share an example if you want.

Best,

--
You received this message because you are subscribed to the Google Groups "weblabdeusto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblabdeusto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weblabdeusto/12ec6341-7818-4842-bbb9-fcce28c4d2d4n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages