cvondrick / vatic

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

Server error when using links provided by turkic publish --offline #24

Open manisoftwartist opened 9 years ago

manisoftwartist commented 9 years ago

I am trying to use VATIC for offline annotation. I am unable to annotate the videos from the outputs provided by turkic publish --offline. In my case, this command displays http://localhost?id=1&hitId=offline http://localhost?id=2&hitId=offline But I recieve a Server Error when trying to open the above links in chrome. image

Trying to access localhost on the other hand displays image Am I missing something?

harkmug commented 9 years ago

Same here. Any help would be appreciated. Thanks.

asdfblarg commented 9 years ago

I am receiving the same sever error and not sure of how to fix this.

nikhildes commented 9 years ago

I am also receiving the same error. When I try turkic list, I can see the video I loaded. However, when I try turkic list --published, I do not see anything. Perhaps the issue is with turkic publish --offline not working properly? Any help would be greatly appreciated.

nishadhka commented 9 years ago

Same here, Is there any solution for this problem? I think mbakthav would have solved it now, requesting his kind help.

manisoftwartist commented 9 years ago

One other thing I observed is that out of the various links provided by turkic, several are inactive as pointed out in this issue. But the last 2 or 3 (depending on your number of frames) seem to hold the right sequence.

golmschenk commented 9 years ago

For us, the problem was that there was no write permissions to /var/www/.python-eggs. If that's the problem, you just need to add permissions there.

The attempted writing failure could be seen in the Apache logs. Check here to see if that's your error too.

nishadhka commented 9 years ago

Thank you mbakthav and golmschenk. As per golmschenk, the error in our case was mod_wsgi (pid=4810): Exception occurred processing WSGI. I was using virtual environment within python distribution of Anaconda. The error was solved based on http://stackoverflow.com/a/24216635 and as follows.

  1. The server.py file of vatic was added with lines
import site
#path for virtual env site packages 
site.addsitedir('/home/hoopoe/anaconda/envs/vaticenv2/lib/python2.7/site-packages') 
  1. Edited the file /etc/apache2/sites-enabled/000-default.conf as follows to have the python path for virtual env
WSGIDaemonProcess www-data
    WSGIProcessGroup www-data
 WSGIPythonPath /home/hoopoe/anaconda/envs/vaticenv2/lib/python2.7/site-packages
    <VirtualHost *:8083>
        ServerName vatic.domain.edu
        DocumentRoot /home/hoopoe/Documents/vatic_cv/vatic/public

        WSGIScriptAlias /server /home/hoopoe/Documents/vatic_cv/vatic/server.py
        CustomLog /var/log/apache2/access.log combined
    </VirtualHost>

By this the server error is faded away and here comes vatic! screenshot from 2015-07-06 18 46 26

manisoftwartist commented 9 years ago

Thanks for updating. I did not find time to resolve this issue. Do all the links provided by turkic publish --offline work?

d1ngn1gefe1 commented 8 years ago

Hi,

I have the same error. And I don't find any error message in Apache log file at "CustomLog /var/log/apache2/access.log combined". Where did you guys find the error message?

nishadhka commented 8 years ago

Hi, The log file we accessed was this /var/log/apache2/error.log, it might show off based on apache config, editing apcahe config file may solve to show the file. Regards

cwh1981 commented 8 years ago

Thanks. I also met python path problem. I set /usr/local/lib/python2.7/site-package in server.py & apache conf. You can check log in /var/log/apache2/error.log when you set "log level" to trace8 in apache conf.

ihormkl commented 8 years ago

Hi, in my case I've got three different errors:

  1. AH01630: client denied by server configuration for the /path/to/vatic/server.py, so I've added this directory to the vatic.domain.edu.conf:
    <Directory /path/to/vatic>
        <Files server.py>
            Require all granted
        </Files>
    </Directory>
  1. The problem with permission access to /var/www/.python-eggs occurred, so I've added writing access to that directory.
  2. Then the ImportError: cannot import name util error fired up. After some time of searching trough the web and reinstalling turkic, I've realized that the problem is with the python-eggs location, so I've used info from https://github.com/cvondrick/vatic/issues/11 and added python-eggs=/path/to/my/user/home/.python-eggs parameter to the WSGIDaemonProcess www-data line in the vatic.domain.edu.conf. Finally, I'm able to access vatic offline annotation tool.
junjuew commented 8 years ago

Another way is to change getpage function in class Job in vatic/models.py to: return "/index.html?id={0}".format(self.id)

By doing so, we're forcing index.html to be included in the url. This solution can be particularly helpful if you are only using a debug server, not a full apache server.

UrielSalomon commented 8 years ago

I can't seem to have vatic work in offline mode. I'm using localhost as the ServerName in /etc/apache2/sites-enabled/000-default, but (after restarting with sudo apache2ctl graceful) the web server test fails:

> turkic status --verify
Configuration:
  Sandbox:     False
  Database:    mysql://root@localhost/vatic
  Localhost:   http://localhost

Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing
Testing access to database server... OK
Testing access to web server... ERROR! HTTP Error 404: Not Found

This is my config.py:

signature   = "" # AWS secret access key
accesskey   = "" # 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 for ipinfodb.com
maxobjects = 25;

This is my 000-default:

WSGIDaemonProcess www-data
    WSGIProcessGroup www-data

    <VirtualHost *:80>
        ServerName localhost
        DocumentRoot /home/wberni/Downloads/vatic/public

        WSGIScriptAlias /server /home/wberni/Downloads/vatic/server.py
        CustomLog /var/log/apache2/access.log combined
    </VirtualHost>

Could someone with a functional workspace post his/hers configuration files?

When I continued to load and publish my video, it worked, but website is not available: when I go to localhost in the browser, I just get the Apache2 Ubuntu Default Page.

arpan8514 commented 8 years ago

I am not using Anaconda Distribution. So, what will be my WSGIPythonPath to write at the file. There is no "site-packages" directory there /usr/lib/python2.7 rather "dist-packages" directory is present there. I am using offline mode but getting Server Error while entering the url at browser generated by the command "turkic publish --offline". I wait for any suggestion. Thanks.

arpan8514 commented 8 years ago

Hi nishadhka, Could you please give me any resolution ?

pirlck commented 8 years ago

root@df9e52702106:~/vatic# turkic status --verify Configuration: Sandbox: True Database: mysql://root@localhost/vatic Localhost: http://localhost/

Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing Testing access to database server... OK Testing access to web server... OK

One or more tests FAILED!

I test vatic locally,but i cannot open vatic annotation page.


Unable to connect

```
```
Nruano3 commented 8 years ago

I was having the same server error show up when trying to access the website. My issues came from the apache2 000-default.conf file not being configured properly after following the instructions in post #37 I was able to gain access to the web tool. -Offline user running on Ubuntu 14.04

aaman-ee commented 7 years ago

The issue lies in the database structure. This happens when you had previously loaded videos and deleted them. The next uploaded video will not have in the url id=1 but the incremental number of the segments. For example, id=1 stands for the first segment of the first video you upload. since id is key for the table "jobs" you cannot reset it but goes incrementally. Try manually το change the id number. I found mine in id=51, and works. I will also try to find a better solution, since in the current structure it is too difficult to work with many videos in offline mode.

otkupjnoz commented 7 years ago

@UrielSalomon hey were you able to solve the error?

UrielSalomon commented 7 years ago

I was, but it was a long time ago, and I can't remember exactly what I changed to make it work.

ranju2015 commented 7 years ago

24

Options FollowSymLinks
AllowOverride None
Require all denied

<Directory /usr/share> AllowOverride None Require all granted

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted

<Directory /home/ranju/vatic> Options Indexes FollowSymLinks AllowOverride None Require all granted

Guys just have a look at the last directory tag which I added in /etc/apache2/apache2.conf file. It actually solved my problem.

otkupjnoz commented 7 years ago

@ranju2015 This doesn't seem to work for me

otkupjnoz commented 7 years ago

@ranju2015 thanks for the idea to work on the direction, turns out the devil was apache2 config file... however solutions provided in issue no. #37 worked for me...

1329844541 commented 5 years ago

For us, the problem was that there was no write permissions to /var/www/.python-eggs. If that's the problem, you just need to add permissions there.

The attempted writing failure could be seen in the Apache logs. Check here to see if that's your error too.

Hi,I think I have the same problem that '/var/www/.'did not have '.python-eggs',So what can I do? Please help me.I am green hand,and do not understand 'add permissions'.Thank you very much.