PennController for IBEX › Forums › Support › Server setup
Tagged: server, setup, stand_alone
- This topic has 7 replies, 2 voices, and was last updated 3 years, 3 months ago by nasimbhmn.
-
AuthorPosts
-
August 8, 2021 at 12:39 pm #7153nasimbhmnParticipant
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 ranpython 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 3 years, 4 months ago by nasimbhmn.
August 8, 2021 at 5:47 pm #7155JeremyKeymasterHi 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 toSERVER_MODE = "cgi"
(so only bullet 5 from the documentation should be relevant). Then your experiment will be accessible athttps://your.domain/path/experiment.html
and automatically served on port 80/443 (depending on whether you’re onhttp
orhttps
)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, typepython server.py
, then I open my browser and visithttp://localhost:3000/experiment.html
and there I can see my experiment runningI have never needed to run
sh mkdist.sh
Let me know whether you were able to run your experiment
Jeremy
August 9, 2021 at 5:00 am #7156nasimbhmnParticipantThanks, 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
August 16, 2021 at 1:11 pm #7169nasimbhmnParticipantHi 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 3 years, 3 months ago by nasimbhmn.
August 16, 2021 at 1:25 pm #7171JeremyKeymasterHi 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
August 16, 2021 at 1:33 pm #7172nasimbhmnParticipantAhh, sorry for not reading your last reply carefully!
I just visited the experiment page. There is no error, but only a blank page appears.August 16, 2021 at 1:44 pm #7173JeremyKeymasterMaybe 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
August 16, 2021 at 1:54 pm #7174nasimbhmnParticipantSure, I will send it right away.
-
AuthorPosts
- You must be logged in to reply to this topic.