cvondrick / vatic

Efficiently Scaling Up Video Annotation with Crowdsourced Marketplaces. IJCV 2012
http://mit.edu/vondrick/vatic/
MIT License
607 stars 255 forks source link

'XML malformed' from mechanical turk? #12

Closed forresti closed 10 years ago

forresti commented 10 years ago

I'm having trouble with Mechanical Turk access keys, and I'm not quite sure how to debug this. Take a look at the "XML malformed" error below:

$ cd path/to/vatic
$ turkic status --verify
Testing access to Amazon Mechanical Turk... ERROR! XML malformed
Testing access to database server... OK
Testing access to web server... OK

My vatic/config.py looks like this:

signature = <my AWS secret access key>
accesskey = <my AWS access key ID>
sandbox=True
localhost=<my server>
...and everything else is unmodified from the defaults.

If I set signature and/or accesskey to empty strings, we get this:

turkic status --verify
Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing

I got my access key from the Amazon IAM console.

forresti commented 10 years ago

Aha, I figured it out. I needed to use an "AWS root key" instead of an "AWS IAM key."

aharris02 commented 8 years ago

Forresti's approach is the wrong solution, and it leaves your entire AWS environment open to attack if your Vatic server is compromised. IAM access keys work just fine; recommend using them instead.

For me this error meant that my Secret Key & ID Key were reversed. Switch those in your config.py and see if it helps.

livonneibarra commented 7 years ago

For me it meant the sandbox option should have been set to False. After changing that, vatic could access AWS.

redzhepdx commented 7 years ago
Configuration:
  Sandbox:     False
  Database:    mysql://root@localhost/vatic
  Localhost:   http://localhost/

Testing access to Amazon Mechanical Turk... ERROR! XML malformed
Testing access to database server... OK
Testing access to web server... ERROR! HTTP Error 403: Forbidden

One or more tests FAILED!

Hello, I applied every solution in here but couldn't fix the problem yet.

my config file :

signature   = "my_aws_secret_key" # AWS secret access ke
accesskey   = "my_aws_key_id" # AWS access key ID
sandbox     = False # if true, put on workersandbox.mturk.com
localhost   = "http://localhost/" # your local host
database    = "mysql://root@localhost/vatic" # server://user:pass@localhost/dbname
geolocation = "geolocation_api_key" # api key for ipinfodb.com
maxobjects = 25;

# probably no need to mess below this line

import multiprocessing
processes = multiprocessing.cpu_count()

import os.path
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

Apache 000-default.conf file :

WSGIDaemonProcess www-data
WSGIProcessGroup www-data

<VirtualHost *:80>
        ServerName localhost
        ServerAdmin webmaster@localhost
        DocumentRoot /home/ubuntu/vatic/public

        WSGIScriptAlias /server /home/ubuntu/vatic/server.py
        CustomLog /var/log/apache2/access.log combined

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

What should I change or update? (I have already tried to exchanged signiture&accesskey values and All necessary libraries installed)

dell341 commented 6 years ago

Has anyone found a different solution to this problem? I've tried the above suggestions, but I'm still getting the following error:

I solved my own problem. My Mechanical Turk account was not properly linked to my AWS account.

Configuration:
  Sandbox:     True
  Database:    mysql://root:[pass]@localhost/vatic
  Localhost:   http://localhost/

Testing access to Amazon Mechanical Turk... ERROR! XML malformed
Testing access to database server... OK
Testing access to web server... OK

This is my config.py file. I've left the geolocation option blank.

signature   = "[AWS secret key]" # AWS secret access key
accesskey   = "[AWS access key]" #AWS access key ID
sandbox     = True # if true, put on workersandbox.mturk.com
localhost   = "http://localhost/" # your local host
database    = "mysql://root:[pass]@localhost/vatic" # server://user:pass@localhost/dbname
geolocation = "" # api key for ipinfodb.com
maxobjects = 25;

# probably no need to mess below this line

import multiprocessing
processes = multiprocessing.cpu_count()

import os.path
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

And my Apache config file:

WSGIDaemonProcess www-data python-eggs=/tmp/.python-eggs
WSGIProcessGroup www-data
<VirtualHost *:80>
        ServerName localhost
        DocumentRoot /home/natlouis/Documents/vatic_test/vatic/public

        WSGIScriptAlias /server /home/natlouis/Documents/vatic_test/vatic/server.py
        CustomLog /var/log/apache2/access.log combined

        <Directory /home/natlouis/Documents/vatic_test/vatic/public>
                Options Indexes FollowSymLinks MultiViews Includes ExecCGI
                AllowOverride all
                Require all granted
                Satisfy Any
        </Directory>

        <Directory />
                Options Indexes FollowSymLinks Includes
                AllowOverride None
        </Directory>

        <Directory /home/natlouis/Documents/vatic_test/vatic>
        <Files server.py>
                Require all granted
        </Files>
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Are there any other suggestions?

QAQzhoujun commented 6 years ago

it means that I must sign in the Amazon Mechanical Turk account and the AWS acount? I dont konw how to figure the problem, are there anyone give me some suggetions?

its my config.py

`signature = "Amazon Mechanical Turk AWS signature" # AWS secret access key accesskey = " Amazon Mechanical Turk AWS access key" # AWS access key ID sandbox = False # if true, put on workersandbox.mturk.com localhost = "http://localhost/" # your local host database = "mysql://root@localhost/vatic" # server://user:pass@localhost/dbname geolocation = "API key from ipinfodb.com for geolocation services" # api key for ipinfodb.com

maxobjects = 25;

import multiprocessing processes = multiprocessing.cpu_count()

import os.path import sys sys.path.append(os.path.dirname(os.path.abspath(file))) `