vatic icon indicating copy to clipboard operation
vatic copied to clipboard

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

Open manisoftwartist opened this issue 10 years ago • 25 comments

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?

manisoftwartist avatar Apr 21 '15 15:04 manisoftwartist

Same here. Any help would be appreciated. Thanks.

harkmug avatar May 06 '15 12:05 harkmug

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

asdfblarg avatar Jun 12 '15 15:06 asdfblarg

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.

nikhildes avatar Jun 12 '15 21:06 nikhildes

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

nishadhka avatar Jun 17 '15 06:06 nishadhka

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.

manisoftwartist avatar Jun 17 '15 07:06 manisoftwartist

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.

golmschenk avatar Jun 24 '15 16:06 golmschenk

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

nishadhka avatar Jul 06 '15 13:07 nishadhka

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

manisoftwartist avatar Jul 06 '15 16:07 manisoftwartist

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?

d1ngn1gefe1 avatar Oct 03 '15 21:10 d1ngn1gefe1

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

nishadhka avatar Oct 06 '15 09:10 nishadhka

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.

cwh1981 avatar Dec 08 '15 02:12 cwh1981

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.

ihormkl avatar Feb 01 '16 01:02 ihormkl

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.

junjuew avatar Apr 13 '16 22:04 junjuew

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.

UrielSalomon avatar Apr 27 '16 20:04 UrielSalomon

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 avatar May 26 '16 12:05 arpan8514

Hi nishadhka, Could you please give me any resolution ?

arpan8514 avatar May 26 '16 12:05 arpan8514

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

```
```

pirlck avatar Jun 25 '16 13:06 pirlck

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

Nruano3 avatar Aug 26 '16 02:08 Nruano3

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.

aaman-ee avatar Sep 24 '16 09:09 aaman-ee

@UrielSalomon hey were you able to solve the error?

otkupjnoz avatar Nov 12 '16 23:11 otkupjnoz

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

UrielSalomon avatar Nov 13 '16 12:11 UrielSalomon

#24 <Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory>

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

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

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

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

ranju2015 avatar Nov 28 '16 12:11 ranju2015

@ranju2015 This doesn't seem to work for me

otkupjnoz avatar Dec 03 '16 17:12 otkupjnoz

@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...

otkupjnoz avatar Dec 05 '16 22:12 otkupjnoz

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.

1329844541 avatar Oct 28 '18 03:10 1329844541