The requested resource was not found on this server

274 views
Skip to first unread message

Paolo Togni

unread,
Mar 24, 2021, 10:15:24 AM3/24/21
to QATrack+
Hello,

I tried to following tutorial in the documentation:

Everything works fine, I can upload the data and I get results.
BTW, when I review the data I cannot visualize the picture which should be created.
Instead, I get the following message: 'Not Found The requested resource was not found on this server.' 

I checked the path where the image should be (http://10.10.9.140/media/uploads/testinstance/822/pf0-2021-03-17_2021-03-24_862f21.dcm) but  nothing is there, just the folder media.

Can anybody suggest how to solve the problem?

My qatrack+ was installed on Ubuntu system via docker, thus, nginx server is running.

Regards
Paolo

Randle Taylor

unread,
Mar 24, 2021, 10:51:42 AM3/24/21
to Paolo Togni, QATrack+
Hi Paolo,

I've never really used the Docker install so not sure exactly what the issue might be.  Are you saying when you look on disk at qatrackplus/qatrack/media/uploads/testinstance/822/ there is nothing there?  Or is it only when you try to access the file through a browser?

Randy

--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qatrack/b7f5781c-76a6-4b9e-bf93-2a39e5b49eadn%40googlegroups.com.

Paolo Togni

unread,
Mar 25, 2021, 3:40:52 AM3/25/21
to Randle Taylor, QATrack+

Hello,

following the info in your answers I find out that actually the data are the located in ~/qatrackplus/qatrack/media/uploads/testinstance/822/ but the browser is pointing to /media/upload/testinstance/822. That's why it does not work. Now, any suggestion to fix it?

About docker installation, I wanted to perform a normal installation on Ubuntu  following the installation instructions in the documentation: https://docs.qatrackplus.com/en/latest/install/linux.html#new-installation

Unfortunatelly, I got stuck with dependencies at the following step:

cd ~/web/qatrackplus
pip install -r requirements/mysql.txt

At the end, Docker was for me the only way to perform installation quickly

BR

Paolo

Bez virů. www.avast.com

Randle Taylor

unread,
Mar 25, 2021, 9:04:39 AM3/25/21
to Paolo Togni, QATrack+
HI Paolo,

I see now that there was a missing directive in the nginx.conf file in that version which has been fixed.  You should be able to modify your nginx.conf like shown at this link https://bitbucket.org/tohccmedphys/qatrackplus/src/0.3.1/deploy/docker/nginx.conf and then restart nginx and hopefully that should resolve the issue.

RT

Paolo Togni

unread,
Mar 26, 2021, 7:40:02 AM3/26/21
to Randle Taylor, QATrack+

Dear Randy,

I modify my nginx.conf as you suggested:

events {
    worker_connections 1024;
}

http {
    client_max_body_size 100M;
    include /etc/nginx/mime.types;
    server {
        listen 80;
        charset utf-8;

        location /static {
            alias /usr/src/qatrackplus/qatrack/static;
        }

        location /media {
            alias /usr/src/qatrackplus/qatrack/media;
        }

        location / {
            proxy_pass http://qatrack-django:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }



BTW the problem is not fixed yet.

When I review my test I got still the NOT found error in the browser :

404 Not Found


nginx/1.15.12



I checked on my server and the png file is contained at location : ~/qatrack/qatrackplus/qatrack/media/uploads/testinstance/832

Any suggestion?
Thanks
Paolo

Randle Taylor

unread,
Mar 26, 2021, 10:08:09 AM3/26/21
to Paolo Togni, QATrack+
Hi Paolo,

When you try to access


in your browser, nginx alias that to:

/usr/src/qatrackplus/qatrack/media/uploads/testinstance/832/pf-image_2021-03-26_a3fff8.png

but you are saying your file is actually at

/usr/src/qatrack/qatrackplus/qatrack/media/uploads/testinstance/832/pf-image_2021-03-26_a3fff8.png

so it looks like there is an extra /qatrack in there for some reason.  If you change your /media directive to:

     location /media {
            alias /usr/src/qatrack/qatrackplus/qatrack/media;
        }

and restart nginx does that resolve the issue?

Randy

Paolo Togni

unread,
Mar 29, 2021, 3:29:47 AM3/29/21
to Randle Taylor, QATrack+

Randy,

it is still not working :(

This is my nginx.conf now:

events {
    worker_connections 1024;
}

http {
    client_max_body_size 100M;
    include /etc/nginx/mime.types;
    server {
        listen 80;
        charset utf-8;

        location /static {
            alias /usr/src/qatrackplus/qatrack/static;
        }

        location /media {

            alias /usr/src/qatrack/qatrackplus/qatrack/media;


        }

        location / {
            proxy_pass http://qatrack-django:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }
}

404 Not Found


nginx/1.15.12


and this is the file location:

mdt@MDT:~/qatrack/qatrackplus/qatrack/media/uploads/testinstance/842$ ls -lF
total 3208
-rw------- 1 root root 2835002 bře 29 08:55 pf0-2021-03-17_2021-03-29_2f57e4.dcm
-rw-r--r-- 1 root root  444929 bře 29 08:55 pf-image_2021-03-29_6c9e23.png


BR

Paolo

Randle Taylor

unread,
Mar 29, 2021, 12:16:24 PM3/29/21
to Paolo Togni, QATrack+
Everything looks fine to me, but I'm not very familiar with Docker so I'm not sure what the issue is.  

I notice in the Docker-Compose file here: https://bitbucket.org/tohccmedphys/qatrackplus/src/0.3.1/deploy/docker/hub/0.3.0.dev/docker-compose.yml  that there is a directive for static but not media:

- ../../../../qatrack/static:/usr/src/qatrackplus/qatrack/static:ro

so maybe you need to add one for /media/ as well?

- ../../../../qatrack/media:/usr/src/qatrackplus/qatrack/media:ro

Paolo Togni

unread,
Mar 31, 2021, 2:49:29 AM3/31/21
to Randle Taylor, QATrack+

Randy,

problem FIXED!!!

I added the directive for media in docker-compose.yml and after restart it started to work correctly.

Thanks a lot

Paolo

Reply all
Reply to author
Forward
0 new messages