Following the tutorials for deploying the psiturk example project on Heroku found here: https://psiturk.readthedocs.io/en/latest/heroku.html and https://psiturk.readthedocs.io/en/latest/amazon_ec2.html
I’ve been having issues getting the psiturk example to work successfully.
For Heroku the project is built successfully but I get an application error when loading the url where the application is deployed. More specifically using the heroku logs --tail command I get the following message on my console:
2018-11-09T00:18:14.438588+00:00 heroku[web.1]: State changed from crashed to starting
2018-11-09T00:18:18.049459+00:00 heroku[web.1]: Starting process with command `python herokuapp.py`
2018-11-09T00:18:20.519460+00:00 heroku[web.1]: Process exited with status 0
2018-11-09T00:18:20.545041+00:00 heroku[web.1]: State changed from starting to crashed
2018-11-09T00:18:20.451511+00:00 app[web.1]: No '.psiturkconfig' file found in your home directory.
2018-11-09T00:18:20.451558+00:00 app[web.1]: Creating default ~/.psiturkconfig file.
2018-11-09T00:18:20.457465+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T00:18:20.459310+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T00:18:20.461495+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T00:18:20.464276+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T00:18:20.465978+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T00:18:20.467778+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:35.992683+00:00 heroku[web.1]: State changed from crashed to starting
2018-11-09T01:45:38.790469+00:00 heroku[web.1]: Starting process with command `python herokuapp.py`
2018-11-09T01:45:40.982700+00:00 app[web.1]: No '.psiturkconfig' file found in your home directory.
2018-11-09T01:45:40.982746+00:00 app[web.1]: Creating default ~/.psiturkconfig file.
2018-11-09T01:45:40.986780+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:40.989457+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:40.991241+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:40.992779+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:40.994492+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:40.996493+00:00 app[web.1]: /bin/sh: 1: heroku: not found
2018-11-09T01:45:41.058245+00:00 heroku[web.1]: Process exited with status 0
2018-11-09T01:45:41.078016+00:00 heroku[web.1]: State changed from starting to crashed
2018-11-09T02:01:31.351054+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path= "/?mode= sandbox&assignmentId= debugEY3JLA&hitId= debugDN7A8H&workerId=debug48G7FB" host=obscure-sea-39608.herokuapp.com request_id=94963616-9fe1-4965-99a0-290c0b918b9b fwd="129.10.110.12" dyno= connect= service= status=503 bytes= protocol=https
2018-11-09T02:01:31.853845+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-sea-39608.herokuapp.com request_id=eeb2c424-4ac8-474d-a914-9819de40e4e7 fwd="129.10.110.12" dyno= connect= service= status=503 bytes= protocol=https
2018-11-09T02:01:51.260360+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path= "/?mode= sandbox&assignmentId= debugEY3JLA&hitId= debugDN7A8H&workerId=debug48G7FB" host=obscure-sea-39608.herokuapp.com request_id=69f79ced-846f-424e-b5d9-f7d244db406f fwd="129.10.110.12" dyno= connect= service= status=503 bytes= protocol=https
2018-11-09T02:01:51.813152+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-sea-39608.herokuapp.com request_id=a84a1d47-d158-4351-a275-5a6e1fcad9f6 fwd="129.10.110.12" dyno= connect= service= status=503 bytes= protocol=https
As seen I get app crashed error (H10) and somehow .psiturkconfig was not found.
My config.txt file for my heroku version is:
[HIT Configuration]
title = Stroop task
description = Judge the color of a series of words.
amt_keywords = Perception, Psychology
lifetime = 24
us_only = true
approve_requirement = 95
contact_email_on_error = youremail@gmail.com
ad_group = Default psiTurk Stroop Example
psiturk_keywords = stroop
organization_name = New Great University
browser_exclude_rule = MSIE, mobile, tablet
allow_repeats = false
[Database Parameters]
database_url = postgres://ugpbpkkqaukwiu:64b3bef4f2e078eeecceb16cbf0aa51054e4de5b297fd2932bbf7c64c347fbc2@ec2-23-23-153-145.compute-1.amazonaws.com:5432/d361o8f7iq7ene
table_name = turkdemo
[Server Parameters]
host = 0.0.0.0
port = 22362
cutoff_time = 30
logfile = server.log
loglevel = 2
debug = true
login_username = examplename
login_pw = examplepassword
threads = 1
secret_key = 'this is my secret key which is hard to guess, i should change this'
#certfile = <path_to.crt>
#keyfile = <path_to.key>
#adserver_revproxy_host = www.location.of.your.revproxy.sans.protocol.com
#adserver_revproxy_port = 80 # defaults to 80
[Task Parameters]
experiment_code_version = 1.0
num_conds = 1
num_counters = 1
[Shell Parameters]
launch_in_sandbox_mode = true
# If you are not using the psiturk ad server, set `use_psiturk_ad_server` to `false` and point `ad_location` to your proxy server <host> and <port>. Format the ad_location like this:
#
# https://<host>:<port>/ad
use_psiturk_ad_server = false
ad_location = https://obscure-sea-39608.herokuapp.com/
When deploying to EC2 I am able to run server on for psiturk in the EC2 machine. When running the hit study and clicking on the url in the console, the begin experiment shows up but after clicking it and the new window that pops-out where the user is supposed to take the study is failing with an Internal Server Error. The specific url was: http://54.209.240.131:22362/exp?hitId=debugP8DTMF&assignmentId=debug3BKBC6&workerId=None&mode=sandbox
In fact even without deployment on EC2 or Heroku, just running hit create and clicking on the URL provided in the console (The one that starts with ) nothing loads up in the browser. Doing a simple network inspection from the browser shows that status of the connection is pending and never loads up. When loading the mturk url after doing hit create and searching for the psiturk example hit it also fails to load the experiment as it is also connecting to the sandbox.ad.psiturk.org/view/…
Is the reason why I can’t run the psiturk example anywhere but locally because sandbox.ad.psiturk server is currently offline?
What about the deployment in Heroku and EC2 why are they also not able to ran the psiturk example?
Thanks!