Browser shows Invalid request

39 views
Skip to first unread message

Sujay HG

unread,
Oct 20, 2016, 2:36:55 AM10/20/16
to weblabdeusto

Hi,

I just started to use this API and after successfully deploying a VM experiment, I am trying to develop a Managed Laboratory. But now I am unable to access my server from the browser. It displays a white page with a text "invalid request". I tried reinstalling weblab. Still doesn't work. 

Pablo Orduña

unread,
Oct 20, 2016, 3:01:25 AM10/20/16
to weblab...@googlegroups.com
Hi Sujay,

Welcome! Could you elaborate slightly more on how this happened? In particular:

a) Is it an new, empty deployment (before editing configurations, etc.)? just weblab-admin create something --http-server-port=8000 I guess?
b) What does the terminal show? I see you have it open in the screenshot, but can't see what's the error the server is reporting.
c) What do the logs say? If you create the directory from scratch (weblab-admin create something), and go to localhost:8000, in the "logs" directory there will be some files.

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+unsubscribe@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 Orduña ( http://morelab.deusto.es/p/pablo-orduna/ )
MORElab - Envisioning Future Internet (http://morelab.deusto.es)
WebLab-Deusto - (http://weblab.deusto.es)

Sujay HG

unread,
Oct 20, 2016, 3:54:52 AM10/20/16
to weblabdeusto
Hi Pablo,

Thank you for the response.

 Yeah, it is a empty deployment. I had created a experiment and changed the config files. But I got this error. So, I went back to basic step and created an instance 
"weblab-admin create example --http-server-port=8000". The instance was created successfully but I got the same problem after starting it. So, the error is in empty deployment too.

The terminal doesn't report any error. I have added the screenshot to 7z file, along with the logs directory. 

Thank you
weblab.7z

Pablo Orduña

unread,
Oct 20, 2016, 4:09:51 AM10/20/16
to weblab...@googlegroups.com
Hi,

Yeah, the terminal only reports that there is indeed an HTTP 400 bad request error. And most of the logs are empty, including those that shouldn't (as admin_log.txt).

Could you try to:

 a) Run weblab-admin with other name (e.g., weblab-admin.py create example2 --http-server-port=8000 )
 b) Do the same thing (weblab-admin start example2, open web browser)
 c) Stop weblab-admin (to make sure that logs are written into disk)
 d) Send the example2/logs folder?

Thank you!

--
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+unsubscribe@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.

Sujay HG

unread,
Oct 20, 2016, 4:28:46 AM10/20/16
to weblabdeusto
Hi,

I did it and here are the logs and terminal screenshots.


Thank you
On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:
logs.7z
2016-10-20 (6).png

Luis Rodriguez

unread,
Oct 20, 2016, 5:30:58 AM10/20/16
to weblabdeusto
Hi Sujay,

I don't really know what could be causing such an error; maybe Pablo will think of something. Meanwhile, if you want, could you try accessing the local WebLab server through a different browser, or through an incognito window? (CTRL+SHIFT+N in chrome).

It's likely that the same thing happens, but, worth a try.

Best regards!

  Luis

--
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.

Sujay HG

unread,
Oct 20, 2016, 5:39:03 AM10/20/16
to weblabdeusto
Hi,

I tried it in different browsers(Chrome, Firefox and Edge). No luck.

Thank you

On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:

Pablo Orduña

unread,
Oct 20, 2016, 10:06:05 AM10/20/16
to weblab...@googlegroups.com

Hi,

The 400 error happens when the client is sending a message that the server can't accept. This should not be the case in a GET call to /weblab/. Furthermore, I verified that this particular error message is not in the code of WebLab-Deusto.

Given that WebLab-Deusto has worked for you previously as you stated in private (and you could add users, etc) and that the problem is not related to a web browser plugin or similar, I can only think of an installation problem with the libraries we use. I noticed that you don't use a virtualenv, which is fine, but it means that if you had installed other software which relies on other libraries, there could be a conflict.

Could you run "pip freeze > libraries.txt" and send the "libraries.txt" file? Since the last time you successfully used WebLab-Deusto in that computer, did you use or install any Python software?

Best,
Pablo


--
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+unsubscribe@googlegroups.com.

Sujay HG

unread,
Oct 20, 2016, 11:07:53 AM10/20/16
to weblabdeusto
Hi, 

I am attaching the libraries.txt. No I didnt install any python library since then.

Thank you

On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:
libraries.txt

Pablo Orduña

unread,
Oct 20, 2016, 12:25:58 PM10/20/16
to weblab...@googlegroups.com
HI,

OK, I noticed you have many more non-WebLab Python libraries installed (e.g., gevent, greenlet, scipy, etc.), and some versions mismatch (for instance I have Werkzeug==0.11.10 and you have Werkzeug==0.9.6). This could have happened not only by installing libraries but by installing any Python software that installs its own libraries.

Just in case, let's try to use a virtualenv to isolate potential problems. I see that you have virtualenv installed. So try the following:

PS C:\Users\Sujay> Set-ExecutionPolicy AllSigned
PS C:\Users\Sujay> virtualenv .\weblab_venv
[...]
PS C:\Users\Sujay> .\weblab_venv\scripts\activate (you'll have to use this every time you want to run weblab)
(weblab_venv) PS C:\Users\Sujay> cd .\weblab    (if you have it there)
(weblab_venv) PS C:\Users\Sujay\weblab> python setup.py install
[this will take a while]
(weblab_venv) PS C:\Users\Sujay\weblab> cd ..
(weblab_venv) PS C:\Users\Sujay> weblab-admin create example3 --http-server-port=8000

And let's see if it still happens. If it does happen, run "pip freeze" again while in the virtualenv to see if the libraries are updated.

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+unsubscribe@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.

Sujay HG

unread,
Oct 20, 2016, 12:53:57 PM10/20/16
to weblabdeusto
  • Hi Pablo,
I tried this, but had to make few changes. 
Apparently virtualenv script is not signed. So, I set the execution policy to Unrestricted and it worked. 

After running setup.py in virtual_env, I tried to create an instance. But I got this error
pkg_resources.DistributionNotFound: The 'celery==3.1.17' distribution was not found and is required by weblabdeusto

I tried pip install celery, but it installed a different version celery-3.1.24-py2.py3.
This version doesn't work.

Thank you

On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:

Pablo Orduña

unread,
Oct 20, 2016, 1:00:08 PM10/20/16
to weblab...@googlegroups.com
Hi,

That's really unique ( celery==3.1.17 does exist in the Python repository: https://pypi.python.org/pypi/celery/3.1.17 ). In any case, I have removed it as a dependency in git, so if you pull the latest version, it should not require celery. We used it in wcloud, a component not used nowadays.

When you say "This version doesn't work" you mean that you can't install weblab or that you have the same error?

--
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+unsubscribe@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.

Sujay HG

unread,
Oct 20, 2016, 1:14:02 PM10/20/16
to weblabdeusto
It gives pkg_resources.DistributionNotFound.

Also, i installed celery. But I still get pkg_resources.DistributionNotFound error. It says some other package is missing.
I just installed few of them myself, here is the list of packages that i have installed
celery
 six==1.9.0
 requests==2.5.1
 'PyYAML==3.11'
BabelEx==0.9.1
Babel==1.3
networkx==1.8.1



On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:

Sujay HG

unread,
Oct 20, 2016, 1:22:02 PM10/20/16
to weblabdeusto
Sorry, I just realized that weblab was not properly installed due to bad internet connection. The connection was timed out and so the installation did not complete. I will try it in sometime, please ignore the previous post.

Thanks


On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:

Sujay HG

unread,
Oct 25, 2016, 12:59:13 PM10/25/16
to weblabdeusto
Hi,

Big thanks for all the help. The issue is solved. It appears to be an issue with the dependencies.  Installing at system levels might be the reason it didnt work out for me. So, Its highly recommended to use it with virtualenv. I uninstalled python, weblab and removed all the files related to weblab (I used Everything.exe to search the files). I reinstalled python, and installed weblab within virtualenv.

Thank you

On Thursday, October 20, 2016 at 12:06:55 PM UTC+5:30, Sujay HG wrote:
Reply all
Reply to author
Forward
0 new messages