JOBE Server install probs

JOBE Server install probs

by Thor Pfosten -
Number of replies: 10

Hi,

I've installed the JOBE server according to "https://github.com/trampgeek/jobe".

the install - routine ./install was correctly carried out.

If I run "python3 testsubmit.py" I get mistakes:

Testing a submission with an excessive cputime parameter


***************** HTTP ERROR ******************


 Response: 301 Moved Permanently <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>301 Moved Permanently</title>

</head><body>

<h1>Moved Permanently</h1>

<p>The document has moved <a href="https://ourdomain.de/jobe/index.php/restapi/runs/">here</a>.</p>

<hr>

<address>Apache/2.4.18 (Ubuntu) Server at ourdomain.de Port 80</address>

</body></html>


********** TEST FAILED **************

Return value from do_http was  (False, {})


in jobe logs I see :

<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>


ERROR - 2019-04-29 12:51:28 --> *jobe* runs_get: no such run or run result discarded

ERROR - 2019-04-29 16:59:08 --> *jobe* runs_get: no such run or run result discarded

~

Can you help get things running ? Is due to webserver config ?

Thanks beforehand for your help!


Best,

Thor









In reply to Thor Pfosten

Re: JOBE Server install probs

by Richard Lobb -

It looks like the server is configured to redirect all http requests to https. Jobe doesn't work over https. So you'll either have to change the server configuration or install Jobe on a different server.

In reply to Richard Lobb

Re: JOBE Server install probs

by Tim Hunt -

I think we should change it so you can run JOBE over HTTPS. The problem is that the setting for how to connect to JOBE is just the host name, and we the make the URL http://$jobe/jobe/index.php/restapi/$resource from it.

The alternative would be to make the setting store the base URL, say the http://$jobe/jobe/  bit.

In reply to Tim Hunt

Re: JOBE Server install probs

by Richard Lobb -

I've never been convinced that HTTPS for Jobe is worth the effort. It's a significant additional complication. You have to set up certificates on the Jobe server and the client (Moodle) has to jump through a lot more hoops to open the connection.

I totally accept the benefits of HTTPS over HTTP for web servers and services, but Jobe isn't a web server in the normal sense - it just uses the HTTP protocol for simplicity. If it used a different protocol, would you still feel the need for encryption?

There are no passwords, credit card numbers or private information transferred between Jobe and Moodle - only the program code to be run and the output from that run. I accept that if a student were able to monitor that traffic they could find and steal other students' submissions but I don't see how such eavesdropping could take place, as it's between the Moodle server and the (firewalled) Jobe server.

However, I'm perhaps just being naive about the security implications. Can you explain a scenario that would allow a student to eavesdrop on the Moodle/Jobe communication?

In reply to Richard Lobb

Re: JOBE Server install probs

by Thor Pfosten -

Hi,

...have thanks for your answers. I think https is more or less standard. So I go along with Tim. For the normal administrator it could be easier, but I don't know what it means for the inner setup of the

JOBE server.

Best,

Thor

In reply to Richard Lobb

Re: JOBE Server install probs

by Arpad Magosanyi -

There are a couple of points to consider here:

  1. https is a good practice. some corporate policies require every server to use https for good reasons, see below
  2. https allows you to use certificate authentication. this is more secure than api keys, adds an additional layer of security above packet filtering, and allows to separate management of application and system security
  3.  blind tcp attacks techniques are here with us since the nineties. so yes, there are ways to make the jobe server think that it is talking to the moodle server by a third party. there are mitigation techniques against this, some of them are even standard in most of the OS stacks now, but it does not mean it is impossible, just that it is much harder now than back when we were young
  4. making https an option is not such a big deal, and if it is done reasonably does not break existing installations and leaves the decision to use it to the administrator


In reply to Thor Pfosten

Re: JOBE Server install probs

by Arpad Magosanyi -

I hope reusing this thread for similar problems is okay. I was following the instructions in readme.md

Most of the tests in testsubmit.py runs okay, but there are one failing. I could not find how that configuration should look like, and ./install did not create it for me.

***************** FAILED TEST ******************

{'run_id': None, 'outcome': 15, 'cmpinfo': '', 'stdout': 'No config file found, using default configuration\n', 'stderr': ''}
Valid Python3/pylint program
Jobe result: Successful run

Output:
No config file found, using default configuration


Update: most of the original problems stem from the fact that I used / instead of /jobe in the server. Only the above problem remains. I have deleted the false alarms.


In reply to Arpad Magosanyi

Re: JOBE Server install probs

by Richard Lobb -

The config file should be generated by the steps documented in the section of the install instructions headed "Setting pylint3 options" (pasted in below). Can you confirm if you did this, please?

Setting pylint3 options (if you want pylint)

If you're going to use pylint, you also need to build the /etc/pylintrc file to set the default options with one of the following commands, which must be run as root (don't just try prefixing the command with sudo, as the output redirection will fail).

Firstly try the command:

pylint3 --reports=no --score=n --generate-rcfile > /etc/pylintrc

If that gives you an error "no such option: --score" (which happens with older versions of pylint3), try instead

pylint3 --reports=no --generate-rcfile > /etc/pylintrc

In reply to Richard Lobb

Re: JOBE Server install probs

by Arpad Magosanyi -

Thank you, that was missing.

It was not apparent for me that it refers to pylintrc, and I did not do that part as it seemed to be an optional task I do not need (which actually was, just having everything pass is a nice, dry feeling).

Now everything is green, thank you.


In reply to Thor Pfosten

Re: JOBE Server install probs

by Arpad Magosanyi -

The readme also does not mention how to set up apache, and ./install does not do it.

Here is my /etc/apache2/sites-enabled/jobe.conf anonymized for anyone interested.
    <VirtualHost jobe.example.com:80>
        ServerAdmin mag@example.com

        DocumentRoot /var/www/jobe

        Alias "/jobe" /var/www/jobe

    </VirtualHost>

As there are no other services on the jobe host (as recommended), I have solved the problem of the /jobe url apparently wired in to moodle with an alias.


In reply to Arpad Magosanyi

Re: JOBE Server install probs

by Richard Lobb -

On a clean new Ubuntu system, installing apache2 as per the section "Installing the necessary dependencies" should generally set up Apache in the correct state. However, if you're installing jobe on an existing server or perhaps on a different flavour of Linux, it may be necessary to do some manual configuring of Apache. So thanks for providing the above, Arpad.