webMUSHRA icon indicating copy to clipboard operation
webMUSHRA copied to clipboard

Results were not saved in 'results' folder after "send result" button

Open jyn282 opened this issue 3 years ago • 7 comments

Hi, thank you for this amazing repository. :)

I've set up webMUSHRA using Docker as written in README.md. After that, I tried complete.yaml. The test worked well, but when I pressed the "send result" button on the last page, an error occurred as follows.

"An error occured while sending your data to the server! Please contact the. experimenter."

Also, there was no new folder in the results folder.

Could you please check on this issue?

jyn282 avatar Feb 10 '22 16:02 jyn282

@jyn282 did you mount results and configs when launching the docker container?

faroit avatar Feb 10 '22 21:02 faroit

yes, I think so, I didn't change docker-compose.yml nor DockerFile. That means results and configs folers were mounted to /var/www/html/results and /var/www/html/config , is that right? I made two folders in the above paths and also checked file authority.

jyn282 avatar Feb 13 '22 08:02 jyn282

@jyn282 please show your docker command here

faroit avatar Feb 13 '22 14:02 faroit

Thank you for the quick reply.

I tried as follows.

Dockerfile

FROM php:7.0-apache
COPY ./ /var/www/html/

docker-compose.yml

version: '2'
services:
  webmushra:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - ./results:/var/www/html/results
      - ./configs:/var/www/html/configs
    ports:
      - "8000:80"

Then, I build and run docker container as follows.

docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up

I could change YAML file in configs folder on the fly but couldn't get result csv files.

jyn282 avatar Feb 13 '22 18:02 jyn282

@jyn282 sorry for the slow reply. Have you been able to address the issue?

faroit avatar Mar 04 '22 14:03 faroit

@faroit, I pushed this job for a while and recently get back to this work. To begin with the conclusion, I solved this problem. It turns out a permission problem. The host user doesn't have write permission (only read) so it couldn't send the result CSV files. Here's the website that I referred to.

https://ntsim.uk/posts/file-permissisions-when-developing-with-docker

Thanks for your help! :)

jyn282 avatar Apr 22 '22 06:04 jyn282

Great thread here. I hit the same problem when creating a docker container and cloning this repository. The root-cause of the problem came from cloning the repository as root, which doesn't allow docker/apache write access.

A chown as follows fixes the issue: chown www-data:www-data results

w4iei avatar May 10 '22 20:05 w4iei