Weblab instance on an SSH server

49 views
Skip to first unread message

Alfred C

unread,
Jun 18, 2018, 8:35:46 AM6/18/18
to weblabdeusto
Hello,
I have created a Weblab Deusto instance on a dedicated server (that I access in SSH).
The problem is that when I try to access the Dummy experiment, after i click on the "Reserve" button, weblab returns the following message : "The experiment seems to be broken and no instances are available. Even though, you are first the queue.".
I don't have this problem when I create a weblab instance on my localhost.
Would you have any idea of what the problem might be ?

Thanks in advance,
Alfred

Pablo Orduña

unread,
Jun 20, 2018, 10:15:35 PM6/20/18
to weblab...@googlegroups.com
Dear Alfred,

Unfortunately, that message can happen due to a number of reasons: invalid configuration, the laboratory being available in a URL that does not match the URL of the experiment server, etc.

In the folder of the weblab deployment (e.g., if you run "weblab-admin create example --options...", it would be "example"), there is a folder called "logs", that includes a number of files. If this is the first time you run this WebLab-Deusto in that server, you can simply delete all the *.txt files in the logs folder, run it again, and see what particular error it appears on the logs. If the error is not very clear, please share it here or directly to us so we can help.

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 post to this group, send email to weblab...@googlegroups.com.
Visit this group at https://groups.google.com/group/weblabdeusto.
For more options, visit https://groups.google.com/d/optout.


--
Pablo
Message has been deleted

Alfred C

unread,
Jun 25, 2018, 10:21:12 AM6/25/18
to weblabdeusto
Hello Pablo,

First of all, thank you for your response.

The error I get in the logs is this one "InternalServerCommunicationError: Unknown server error contacting http://127.0.0.1:10001 with HTTP after 0.00784301757812 seconds: KeyError('<',)".
I think it has to do with the virtual machine's configuration, I will check this out and get back to you.

Best regards,
Alfred

Pablo Orduña

unread,
Jun 25, 2018, 12:45:02 PM6/25/18
to weblab...@googlegroups.com
Hi Alfred,

Just in case this helps, WebLab-Deusto is using several ports by default for the different components. You can see them in the "configuration.yml" file. In the default configuration, you'll have something like this:

hosts:
  core_host:
    runner: run.py
    config_file: core_host_config.py
    processes:
      core_process1:
        components:
          core:
            config:
              core_facade_port: 10000
              core_facade_server_route: route1
            type: core
      laboratory1:
        components:
          experiment1:
            class: experiments.dummy.DummyExperiment
            config:
              dummy_verbose: true
            type: experiment
          laboratory1:
            config_file: lab1_config.py
            protocols:
              port: 10001
            type: laboratory

Where there is a single host (core_host), with two processes (core_process1 and laboratory1); the former ("core") listening on 10000 and the latter has two components (the laboratory server "laboratory1" listening on port 10001 and the experiment server "experiment1"). Later, you'll have an Apache server or mapping <public-ip>:80/weblab/ to the port 10000, which is the ' core' server, who knows how to talk in the port 10001 with the laboratory server, who knows tha it can talk with the experiment server without a network since they're in the same process.


In you case, there seems to be an error with port 10001. If that port is a laboratory server, you should be able to open it like:


And in "index.html" you should see a file talking about "WebLab internal communications".

If you do not find any other log file, one trick that may help is installing 'tcpflow' in your Linux host (e.g., in Ubuntu it would be):

$ sudo apt-get install tcpflow

And then checking what's going on later:

$ sudo tcpflow -i lo -C port 10001

Which means: "read all the traffic in the localhost interface of whatever happens in port 10001". You may see an answer from other process (e.g., maybe your server is running other process and port 10001 was busy), or you see another error. If the server has another process, you can either change that process or change WebLab-Deusto ports by running:

$ weblab-admin create example --start-port=20000

Or manually changing configuration.yml AND debugging.py.

Best,



--
Pablo

Alfred C

unread,
Jun 26, 2018, 9:39:42 AM6/26/18
to weblabdeusto
Hello Pablo,

It seems the laboratory1 server is listening on the wrong host.

The result to "netstat -antp|grep 10001" is: 
tcp        0      0 0.0.0.0:10001           0.0.0.0:*               LISTEN      2163/python

Could you tell me where in the configuration files can I tell laboratory1 to listen on the localhost ?

Best regards,
Alfred

Pablo Orduña

unread,
Jun 27, 2018, 4:58:02 AM6/27/18
to weblab...@googlegroups.com
Hi,

I'm afraid right now there is no configuration variable to make it listen on localhost instead of in 0.0.0.0:10001. 0.0.0.0 means "anyone who can access me" (including myself). Typically, you or your institution already have a firewall (otherwise, use one), so 0.0.0.0 is typically just the network where your laboratory server is.

If you have a deployment where you have several machines involved, you will want each of the machines to listen to "everything" and not only to localhost, because otherwise the core server would not be able to access each laboratory or experiment server. This is very, very common (e.g., having multiple FPGAs, multiple robots, multiple devices in general). However, this does not prevent localhost to connect to the server (so if one server is not managing to contact the 10001, it should be due to other reason).

Hope it helps. 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 post to this group, send email to weblab...@googlegroups.com.
Visit this group at https://groups.google.com/group/weblabdeusto.
For more options, visit https://groups.google.com/d/optout.


--
Pablo
Reply all
Reply to author
Forward
0 new messages