Server setup

PennController for IBEX Forums Support Server setup

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7153
    nasimbhmn
    Participant

    Hi,

    I’m trying to set up a stand-alone server, but I keep receiving a strange error. I installed python 2 on my server and made a folder “PCIbex” inside which I copied the folder of my experiment. I downloaded the archive of my experiment from PCIbex and extracted the folder before moving it to the server.
    I navigated to the folder “www” and ran python server.py --genhtml ./. No message appeared (I don’t know if that’s normal or not). The original Ibex documentation says that this command should start the server on port 3000 by default. But I cannot reach http://myipaddress:3000/experiment.html. Does it mean that something is wrong?

    I continued with navigation to the root directory of the repo where all the experiment files are located and ran the following command:
    sh mkdist.sh 0.3-beta-1234

    This time I got the following error:

    *** Remember to run server.py with the --genhtml option if necessary. ***
    
    cp: invalid option -- 'X'
    Try 'cp --help' for more information.
    tar: ibex-0.3-beta-1234/LICENSE: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/README: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/mkdist.sh: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/example_lighttpd.conf: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/docs/manual.md: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/conf.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/jsDump.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/css_includes/*.css: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/js_includes/*.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/data_includes/*.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/json.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/server.py: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/server_conf.py: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/shuffle.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/jquery*.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/PluginDetect.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/experiment.html: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/overview.html: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/util.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/backcompatcruft.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/other_includes/main.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/chunk_includes/*.html: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/soundmanager2-jsmin.js: Cannot stat: No such file or directory
    tar: ibex-0.3-beta-1234/www/soundmanager2_debug.swf: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    

    I don’t understand why it says No such file or directory. I can see all the files are there.
    Could someone please help me understand what’s going on and how I can fix this?

    Very best, Nasim

    • This topic was modified 2 years, 8 months ago by nasimbhmn.
    #7155
    Jeremy
    Keymaster

    Hi Nasim,

    The documentation is a little confusing about this, but setting up an experiment on a webserver is actually simpler than that, assuming your server readily runs CGI Python scripts (most do).

    You should follow the step-by-step CGI instructions. The references to webspr are outdated, but in any case, if you don’t rename any file, the only thing you need to edit (if I remember correctly) is line 20 of server_conf.py to SERVER_MODE = "cgi" (so only bullet 5 from the documentation should be relevant). Then your experiment will be accessible at https://your.domain/path/experiment.html and automatically served on port 80/443 (depending on whether you’re on http or https)

    The “stand-alone” mode from the Ibex documentation refers to running the experiment locally, that is, not on a webserver. I sometimes use it when I develop experiments on my own computer, I open a terminal, navigate to the www folder of my project, type python server.py, then I open my browser and visit http://localhost:3000/experiment.html and there I can see my experiment running

    I have never needed to run sh mkdist.sh

    Let me know whether you were able to run your experiment

    Jeremy

    #7156
    nasimbhmn
    Participant

    Thanks, Jeremy! Yes, the Ibex documentation is really confusing.
    With your explanations, it’s more clear now. I will try again and let you know.

    Best, Nasim

    #7169
    nasimbhmn
    Participant

    Hi Jeremy,

    I still have a problem with running PCIbex on my server. Here is what I did:

    In order to add a domain to my server, first I need to add a user. So, my domain will be added to a www folder at this address: /home/users/myusername/www. I copied the whole folder of my experiment into this www folder. I edited the server_conf.py as you said. Then ran the server.py inside the www folder of the experiment (located at/home/users/myusername/www/pcibex_experiment/www), and I got the following error:

      File "server.py", line 1844, in <module>
        for l in control(env, start_response):
      File "server.py", line 1499, in control
        base = env['PATH_INFO']
    KeyError: 'PATH_INFO'
    

    Can you tell me what’s going wrong?

    Best, Nasim

    • This reply was modified 2 years, 8 months ago by nasimbhmn.
    #7171
    Jeremy
    Keymaster

    Hi Nasim,

    If you’re going with a CGI setup, you do not need to run any script yourself: your webserver will take care of doing it itself when you visit your experiment’s page in a browser

    Do you get an error when you visit your experiment’s page?

    Jeremy

    #7172
    nasimbhmn
    Participant

    Ahh, sorry for not reading your last reply carefully!
    I just visited the experiment page. There is no error, but only a blank page appears.

    #7173
    Jeremy
    Keymaster

    Maybe your webserver does not automatically execute CGI scripts then, would you mind sharing your experiment’s URL with me, here or at support@pcibex.net?

    Jeremy

    #7174
    nasimbhmn
    Participant

    Sure, I will send it right away.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.