SafeExamBrowser / seb-server

The Safe Exam Browser Server web application simplifies and centralizes the configuration of SEB clients for exams. It interacts with a learning management or exam system for setting up and conducting e-assessments with Safe Exam Browser. It also improves security by allowing to monitor connected SEB clients in real time during e-assessments.
Mozilla Public License 2.0
46 stars 38 forks source link

seb-server-setup logs error & nginx Bad Gateways (502 status code). #38

Closed leuk7 closed 3 years ago

leuk7 commented 3 years ago

Description: Hy. I am trying to setup the 'testing' envrionnement of SEB Server. But I think there is something wrong somewhere.

To Reproduce

  1. Run the command 'docker-compose up -d', in '/sebserver/seb-server-setup/docker/testing/basic' folder
  2. Watch the 'seb-server-setup' logs files. In my case I use a Docker GUI App (DockStation)
  3. See error

Screenshots

Another screenshoot of 'seb-server' container log image

Setup :

leuk7 commented 3 years ago

I found a solution to my problem:

  1. I needed to provide the server name as sugest in seb-server logs. The property is 'sebserver.webservice.http.external.servername' located in 'sebserver/seb-server-setup/docker/testing/basic/config/spring/application-prod.properties'
  2. Also I notice in 'setup.Dockerfile', there was a 'sudo' command which we do not really need. It was the one that caused the second error (/bin/sh: sudo nof found). I think we do not need it based on some discussions : https://stackoverflow.com/questions/56249601/bin-sh-1-sudo-not-found-when-running-dockerfile/56249679

Thanks guys!😉

anhefti commented 3 years ago

Hi, glad you've found a solution.

The seb-sever-setup service is just used to put a password file for the other services into the internal docker volumes. If this is not working, the seb-server service will not startup correctly. As described within the installation guide, you only need to give this password once within the setup process and then you can start and stop your services without heaving to provide the file again until you delete ore prune the involved docker volumes. Please make also sure that you always give the same password if you have to setup SEB Server again with existing database data.

We added the "sudo" command in the setup.Dockerfile because in some setups it was needed to have access to the password file within the docker service.

The configuration for the SEB Server service is located in the '/config/spring/application-prod.properties' and here: https://seb-server-setup.readthedocs.io/en/latest/configuration.html you can find the descriptions for the different properties.