openmeetings / openmeetings-docker

Docker image for OM
Apache License 2.0
110 stars 57 forks source link

Cant start mini OM #37

Closed bob4inski closed 10 months ago

bob4inski commented 10 months ago

Hi, i have a kurento, turn server and my database is running. But i have this error:

05-Jan-2024 13:11:38.229 INFO [main] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
05-Jan-2024 13:11:38.583 INFO [main] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
05-Jan-2024 13:11:39.777 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Explicit persistence provider error(s) occurred for "openmeetings" after trying the following discovered implementations: org.apache.openjpa.persistence.PersistenceProviderImpl from provider: org.apache.openjpa.persistence.PersistenceProviderImpl; nested exception is <openjpa-3.2.2-re5933d6 nonfatal general error> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: file:/opt/openmeetings/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml [Location:Line: 24, C: 17]: org.xml.sax.SAXParseException; systemId: file:/opt/openmeetings/webapps/openmeetings/WEB-INF/classes/META-INF/persistence.xml; lineNumber: 24; columnNumber: 17; cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'persistence' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.
Can u fix it please?
solomax commented 10 months ago

Hello @bob4inski,

sorry for the long replay, we have public holidays :)\

Could you please provide some details: which DB are you using? (meanwhile I'll try to reproduce this issue with MySql :))

solomax commented 10 months ago

@bob4inski update: just have tested with MySql - everything works for me as expected :)

please provide more details regarding your config :)

bob4inski commented 10 months ago

Hi! @solomax Sorry for a long replay. The problem was because I didn't specify the variables to connect to the DB correctly. And so the persistence.xml file was incorrect

example:

Can u add some examples to variables for docker?

  1. Can you tweak the sed scripts that change passwords in the configuration? I tried with complex passwords with special characters, but sed didn't read them correctly and there was no connection to the database.

Example: when i used password with "&" password in config file was incorrect

  1. Pls add example for variables like a

    - OM_DB_HOST=10.10.10.10 
    - OM_DB_PORT=5432
    - OM_DB_TYPE=postgresql
    - OM_DB_USER=openmeetings
    - OM_DB_NAME=openmeetings
    - OM_DB_PASS=strongpassword
  2. I wanted to split your image into smaller pieces so that kurento would run as a separate container. But that didn't work out so well check this if u want

solomax commented 10 months ago

Hello @bob4inski,

strong password can be provided using "OM_DB_PASS=strongpassword" (NOTE double quotes should be placed outside)

even better I would use single quotes instead (so bash will not substitute ....)

I'll try to update README with examples

According to #3 I would definitely accept good PR, unfortunately I'm not Docker expert :(

I'll try to check docs or maybe you can describe how this docker-compose.yml can improve things? :)

UPD: README is updated, hopefully the examples are good enough :)

bob4inski commented 10 months ago

@solomax thanks a lot for a vars. Im working with #3, so i will write docs and if it works i will create a new issue

solomax commented 10 months ago

Im working with #3, so i will write docs and if it works i will create a new issue

Thanks!