SafeExamBrowser / seb-server-setup

Cotains resources and packages to setup and install SEB-Server. Currently only docker-based setup is supported
Mozilla Public License 2.0
7 stars 12 forks source link

DOCKERHUB INSTALLATION ISSUE #6

Closed erainterfacesindia closed 3 years ago

erainterfacesindia commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

Additional context Add any other context about the problem here.

seb-server exited with code 1 seb-server | 15:52:20.123 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. seb-server | 15:52:20.133 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. seb-server | Logging system failed to initialize using configuration from '/sebserver/config/spring/logback-prod.xml' seb-server | java.lang.IllegalStateException: Logback configuration error detected: seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration file? seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details. seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57) seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:310) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) seb-server | at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80) seb-server | at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) seb-server | at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) seb-server | at ch.ethz.seb.sebserver.SEBServer.main(SEBServer.java:48) seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/java.lang.reflect.Method.invoke(Unknown Source) seb-server | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) seb-server | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) seb-server | 15:52:21.256 ERROR [main]:[org.springframework.boot.SpringApplication] Application run failed seb-server | java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration file? seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details. seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:321) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) seb-server | at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80) seb-server | at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) seb-server | at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) seb-server | at ch.ethz.seb.sebserver.SEBServer.main(SEBServer.java:48) seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/java.lang.reflect.Method.invoke(Unknown Source) seb-server | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) seb-server | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) seb-server | Caused by: java.lang.IllegalStateException: Logback configuration error detected: seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration file? seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details. seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57) seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:310) seb-server | ... 22 common frames omitted seb-server | Exception in thread "main" java.lang.reflect.InvocationTargetException seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) seb-server | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) seb-server | at java.base/java.lang.reflect.Method.invoke(Unknown Source) seb-server | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) seb-server | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) seb-server | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) seb-server | Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration file? seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details. seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:321) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) seb-server | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) seb-server | at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:80) seb-server | at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) seb-server | at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) seb-server | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) seb-server | at ch.ethz.seb.sebserver.SEBServer.main(SEBServer.java:48) seb-server | ... 8 more seb-server | Caused by: java.lang.IllegalStateException: Logback configuration error detected: seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [FILE]. Did you define it below instead of above in the configuration file? seb-server | ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details. seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66) seb-server | at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57) seb-server | at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) seb-server | at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:310) seb-server | ... 22 more seb-server exited with code 1

getting this message in a loop while executing docker-compose up inside dockerhub foler.

erainterfacesindia commented 3 years ago

image

erainterfacesindia commented 3 years ago

image

Also this error is repeating

anhefti commented 3 years ago

Hi, Thanks for reporting. The first error is a bug within the new "dockerhub" installation. I've fixed this bug and made an update into the repository. You can either get the fixed version form github by checkout the tag "1.2-latest" or you can fix it locally by yourself. To fix it local within your checkout, go to the setup directory docker/prod/bundled/dockerhub/config/spring and open the file "logback-prod.xml". Then delete the line shown in the picture below and save the file.

image

This should solve the first problem. The second problem points to the fact, that the needed passwords for SEB Server setup are not available for the service. For the dockerhub setup, this must be available for each start/restart of the SEB Server container. Please refer for this to the installation guide at https://seb-server-setup.readthedocs.io/en/latest/install-production.html#productive-setup-with-dockerhub with focus on steps 3. and 5.. You have to define this passwords and give it as environment variables within the start of your docker-compose either by CLI or within a ".env" file as suggested by the guide.

erainterfacesindia commented 3 years ago

Can u please provide any template for sample .env file.

anhefti commented 3 years ago

I've added a sample file. Please put this in the root directory of your setup "docker/prod/bundled/dockerhub/" and add your individual passwords by editing the file before starting up SEB server for the first time. You can let the file within the directory and it will be used on every startup, so you don't have to care anymore. If this would be a security issue with you, you can delete the file and added again every time you startup the service.

Note: Sorry I cannot upload the ".env" file here within the forum since it doesn't allow to upload this types of files . So I renamed the file to "env.txt". If you downloaded the file you can rename it or just create a new ".env" file and paste your password settings there.

env.txt

erainterfacesindia commented 3 years ago

Thanks for the help. It's working now.