Crystal session fail to Bonito bonito/run.cgi//session?

61 views
Skip to first unread message

Valdis S Coding

unread,
Jan 18, 2021, 9:21:13 AM1/18/21
to NoSketch Engine
What is the least painful way to install/configure Crystal to connect to Bonito?

I appear to have some sort of session problem connecting Crystal to Bonito.

Request Method: GET
Status Code: 400 Bad Request
Remote Address: 10.5.0.99:80
Referrer Policy: strict-origin-when-cross-origin


I have just set up Manatee with Bonito on fresh Ubuntu 18.04 with sample corpora Susanne.

I used deb files from Downloads links in https://nlp.fi.muni.cz/trac/noske/wiki/Downloads

nosketch.example.com/bonito works - I can search concordances etc.

For Crystal I could not find deb files. 
 I downloaded 2.14 from source at: https://nlp.fi.muni.cz/trac/noske

make
sudo make install VERSION=2.14

Added 
        Alias /crystal /var/www/crystal Alias /bonito /var/www/bonito <Directory /var/www/bonito> AllowOverride All Options +ExecCGI AddHandler cgi-script .cgi </Directory> 
 to /etc/apache2/sites-available/000-default.conf (not sure if this is best place)

example.com/crystal - starts loading and NoSketch logo is shown briefly
then fails when call to   /bonito/run.cgi//session? is made

Changed config.js in crystal

(this is intranet installation, could add SSL if that is crucial)

Going with browser to 

Gives
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/bonito/run.cgi in <module>()
     83         print "</pre>"
     84     else:
=>   85         BonitoCGI(user=username).run_unprotected (selectorname='corpname')
     86 
     87 # vim: ts=4 sw=4 sta et sts=4 si tw=80:
BonitoCGI = <class __main__.BonitoCGI>, user undefined, username = None, ).run_unprotected undefined, selectorname undefined
 /usr/lib/python2.7/dist-packages/bonito/CGIPublisher.py in run_unprotected(self=<__main__.BonitoCGI instance>, path=['session'], selectorname='corpname', outf=<open file '<stdout>', mode 'w'>)
    241         if self._has_access or path[0] == 'feedback':
    242             methodname, tmpl, result = self.process_method (path[0], path,
=>  243                                                                     named_args)
    244         else: # redirect to login or raise error
    245             methodname = path[0]
named_args = {}
 /usr/lib/python2.7/dist-packages/bonito/CGIPublisher.py in process_method(self=<__main__.BonitoCGI instance>, methodname='session', pos_args=['session'], named_args={})
    280                 self._headers['Status'] = '400 Bad Request'
    281                 self.output_headers()
=>  282                 raise Exception('unknown method: "%s"' % methodname)
    283         method = getattr (self, methodname)
    284         if self.debug:
builtin Exception = <type 'exceptions.Exception'>, methodname = 'session'



Perhaps there is problem with Bonito install?



Sketch Engine Support

unread,
Jan 19, 2021, 3:01:52 AM1/19/21
to NoSketch Engine
-- do not edit --

Dear Valdis,

It could not work for you because you used the old deb package for Bonito and a new one for Crystal.

Please use only files available at https://nlp.fi.muni.cz/trac/noske/ The Download section was obsolete, we have already removed it.

Best regards,

Michal Cukr




Michal Cukr

Sketch Engine Team
www.sketchengine.eu

Don't miss our Boot Camp, a 2-day intensive course in using Sketch Engine https://www.sketchengine.eu/bootcamp/
Sketch Engine Team

Valdis S Coding

unread,
Jan 27, 2021, 8:31:56 AM1/27/21
to NoSketch Engine, support
Dear Michael,

 Thank you for the quick response!


I attempted to build from source using files at:   https://nlp.fi.muni.cz/trac/noske/ 

However, I am hitting many roadblocks with missing packages when compiling Manatee.
I am making progress but slowly. Using vanilla Ubuntu 18.04

Is it possible to use .deb files found at https://corpora.fi.muni.cz/noske/deb/1804/ or is there another location for latest .deb files?

Which particular .deb files are needed?

Manatee


Which one of these? - I'd prefer Python3



Bonito
Which one?


python-signalfd  

Suzanne Sample corpora

Crystal



Sincerely,
   Valdis Saulespurens
Researcher
National Library of Latvia

Sketch Engine Support

unread,
Jan 28, 2021, 4:07:18 AM1/28/21
to Valdis S Coding, NoSketch Engine, support
Dear Valdis,

if you want to use crystal, you have to install manatee version (>=) 2.167.10 and bonito-open version (>=) 4.24.6 and gdex version (>=) 3.12.
 
For manatee version (>=) 2.167.10, bonito-open version (>=) 4.24.6, gdex version (>=) 3.12 we do not provide deb packages (and there is no plan to do so in the future). The only version is to install No Sketch Engine (crystal, bonito, manatee, gdex) from source (or RPM packages).

The deb packages you found are obsolete even if they can be downloaded.

Best regards,

Jan Busta

Sketch Engine Development Team
https://www.sketchengine.eu


st 27. 1. 2021 v 14:31 odesílatel Valdis S Coding <valdis....@gmail.com> napsal:
--
You received this message because you are subscribed to the Google Groups "NoSketch Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noske+un...@sketchengine.co.uk.
To view this discussion on the web visit https://groups.google.com/a/sketchengine.co.uk/d/msgid/noske/b737bbb6-9e68-4a65-8ea6-6d703c528801n%40sketchengine.co.uk.

Miloš Jakubíček

unread,
Jan 29, 2021, 8:47:57 AM1/29/21
to Valdis S Coding, NoSketch Engine, support
Hi Valdis,

On Wed, 27 Jan 2021 at 14:31, Valdis S Coding <valdis....@gmail.com> wrote:


However, I am hitting many roadblocks with missing packages when compiling Manatee.

If you look into misc/rpm/manatee-open.spec, you can start from there:

BuildRequires: pcre-devel > 8.10
BuildRequires: gcc-c++
BuildRequires: python2-devel
BuildRequires: swig
BuildRequires: libtool-ltdl-devel
BuildRequires: autoconf-archive

Of course, package names will be different on Ubuntu, but it should not be so difficult to find out.
 

Which particular .deb files are needed?

Just to stress what my colleague Jan said: the deb packages have been discontinued and none of the versions ever released is compatible with Crystal.


Manatee


Which one of these? - I'd prefer Python3

Currently the Bonito version that is released is Python2, the Python3 version is already what you find at our beta installation (beta.sketchengine.eu),
and will soon (a few weeks) be released. But for the moment you still have to stick with Python2.

Best
Milos
Reply all
Reply to author
Forward
0 new messages