Experiment list not loading [SOLVED]


#1

I have successfully set up the NRP under ubuntu 16.04 running natively on an 8-core machine. I can connect to the server at http://<serveraddress>:9000/#/esv-web , but it is stuck forever loading the experiment list.

The installation guidelines only briefly mention two possible causes:

-> cors problems?
-> nginx: sudo killall and service restart

NGINX is working fine, so this leaves “cors problems”. I’m afraid I need a little guidance here - how could I start to debug this?

Best regards,

Michael


#2

It sounds like a backend proxy issue. The backend proxy is a nodeJS application we have which is querying the server availability and fetching the list of experiments.

Usually problems in the proxy are coming from a broken configuration. Can you try going in $NRP/user-scripts and executing the ./configure_nrp script ?

If you are not running on localhost then the has to be specified inside the nodeJS application itself. So in the $NRP/nprBackendProxy/config.json you would have to change all the references to localhost to your own serveraddress.


#3

I’m running backend and frontend on my workstation, but I’m trying to access it through the browser on my laptop. I thought this is a viable scenario since it works like that in the collab. I guess I was wrong…

When I access the NRP with a browser on the workstation (using vnc), the experiment list shows up and I can start experiments. However, I can’t see the experiment since vnc doesn’t support WebGL.

The thing is, I have no physical access to the workstation at the moment, and really need to access it through the browser.

I search-and-replaced all “localhost” with my workstation IP in config.json, but this didn’t solve the issue either, unfortunately.

Do I have to install the frontend on my laptop to get things working? Or can I somehow configure my workstation to properly serve the platform through the internet?

Thanks in advance for your help.


#4

Dear Michael,

It is indeed a viable scenario, I thought that you were trying to run the frontend services from another machine than the one that you are running the backend. So my answer about changing the config.json is not valid. Run configure_nrp on the remote host to bring everything back to its original status

If everything is running on a remote host, the problem is most likely a port issue. Apart from the port 9000 that has to be accessible on the remote host, could you also try to open the port 8000 (the nodeJS is running on this port)? Easiest way to open a port : https://stackoverflow.com/questions/30251889/how-to-open-some-ports-on-ubuntu

Another check that you can do is open your developer tools on chrome (ctrl+shift+i) and go to the network tab. You should see an http GET request to the remote host which looks like /experiments . This request should be failing with a status code (i.e 404). If it is indeed failing could you paste the status code as well as take a screenshot of the request? You can do that by clicking on the request, and then it should open a widget with the info of the request (headers, general info etc)

If you are still having trouble we can have a remote debugging session via skype.

I hope this helps.

Regards,
Manos


#5

Hi Manos,

I verified that ports are open, we can rule that out.

That indeed points to the potential issue:

GET http://localhost:8000/experiments           angular.js:11048 
net::ERR_CONNECTION_REFUSED

The system tells me that I can’t upload an image because I’m a new user, but when I unfold the request I get this traceback:

(anonymous) @ angular.js:11048
sendReq @ angular.js:10841
serverRequest @ angular.js:10551
processQueue @ angular.js:15122
(anonymous) @ angular.js:15138
$eval @ angular.js:16384
$digest @ angular.js:16200
$apply @ angular.js:16492
tick @ angular.js:11623
angular.js:11048 

Headers are:

Request URL:http://localhost:8000/experiments
Referrer Policy:no-referrer-when-downgrade

Request Headers
Provisional headers are shown
Accept:application/json, text/plain, */*
Origin:http://___my_workstation_ip___:9000
Referer:http://___my_workstation_ip___:9000/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

(note that I replaced my workstation’s IP with a string before pasting)

I assume this means that my browser still tries to connect to localhost for the experiment list, when it should be connecting to my workstation’s IP?


#6

Hi Michael.

Indeed this traces down the problem. Change in the $NRP/app/config.json the reference to the proxy
“proxy”: {
“url”: “http://localhost:8000
},

to

“proxy”: {
“url”: “http://remote host IP:8000”
},

Also change in the $NRP/nrpBackendProxy/config.json all the references to localhost to the IP of the remote host.

That should fix the issue.

Regards,
Manos


#7

Thanks, Manos, with this modification I can now see the experiment list and interact with it.

However, when I try to start an experiment, I get “ServerError -1” with the message:

No server can handle your simulation at the moment. Please try again later

and the following backtrace:

ClbError@http://___remote_ip___:9000/bower_components/angular-hbp-collaboratory/angular-hbp-collaboratory.js:2697:26
error@http://___remote_ip___:9000/bower_components/angular-hbp-collaboratory/angular-hbp-collaboratory.js:2738:26
controller@http://___remote_ip___:9000/bower_components/angular-hbp-collaboratory/angular-hbp-collaboratory.js:4434:34
http://___remote_ip___:9000/bower_components/angular/angular.js:9445:40
resolveSuccess@http://___remote_ip___:9000/bower_components/angular-bootstrap/ui-bootstrap-tpls.js:4154:49
processQueue@http://___remote_ip___:9000/bower_components/angular/angular.js:15122:30
http://___remote_ip___:9000/bower_components/angular/angular.js:15138:39
$digest@http://___remote_ip___:9000/bower_components/angular/angular.js:16200:36
$apply@http://___remote_ip___:9000/bower_components/angular/angular.js:16492:31
done@http://___remote_ip___:9000/bower_components/angular/angular.js:10872:53
completeRequest@http://___remote_ip___:9000/bower_components/angular/angular.js:11070:15
requestError@http://___remote_ip___:9000/bower_components/angular/angular.js:11021:24

Note that I replaced my workstation’s IP with ___remote_ip___.

Do you think this is a related issue, or should I raise a separate topic for this?


#8

Hi Michael,

I cannot really tell from this error what went wrong as it is too generic. The error could be true though, that indeed there is a simulation running on the server. Could you try to kill everything in the remote server and start again?

Else, we can have a look together.

Regards,
Manos


#9

Hi Manos,

I did a reboot and ran the cle-nginx, cle-start and cle-frontend scripts, but the problem still occurs. Any ideas wrt logfiles to watch, config options to try, other debug strategies to run?

Otherwise, I would be fine to arrange a remote debugging session via skype. If you send me your skype name (off-list at m…r@b…g.net if you prefer) and a preferred time, I will give you a call, if that’s alright.

Cheers,

Michael


#10

Hello Michael,

We can try to do the skype debugging. My skype id is ***

You can call me anytime today before 16:30, else we can do it tomorrow

Regards,
Manos


#11

Just for completeness, in case someone is running into a similar problem: we managed to solve it in an interactive session. To access an NRP instance with backend and frontend running on a remote server, two files need to be changed:

  • in $HBP/nrpBackendProxy/config.json, replace all occurrences of localhost with the workstation’s IP address.
  • in $HBP/ExDFrontend/app/config.json, under the proxy key, replace localhost with the workstation’s IP address.

Hope this is helpful for somebody.


#12

Hi Michael, could you please edit the post so as to make your e-mail invisible?