Git Product home page Git Product logo

Comments (16)

hver avatar hver commented on July 26, 2024

You have to create a folder db in the volume /opt/tplink/EAPController/data
For some reason it is not happening using host volumes

from docker-omada-controller.

mbiebl avatar mbiebl commented on July 26, 2024

I can reproduce this and this still seems to happen with 3.2.6.
I made sure data is properly owned by uid 508, but the controller software fails to create the db subdirectory.
We should at least document this issue in the README, I think.
An alternative would be to have a start script which properly creates those directories

@mbentley wdyt?

from docker-omada-controller.

mbentley avatar mbentley commented on July 26, 2024

Yeah I would lean toward a note in the readme. I would add an entrypoint to change ownership or at least make it an option, if the container was starting as root. Iā€™d rather set the USER parameter in the Dockerfile and drop any root access in the resulting image.

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

Facing this too, although I don't see any specific error message:

INFO: Time zone set to 'Etc/UTC'
INFO: Starting Omada Controller as user omada
SLF4J: com.tp_link.eap.configuration.b
SLF4J: The following set of substitute loggers may have been accessed
SLF4J: during the initialization phase. Logging calls during this
SLF4J: phase were not honored. However, subsequent logging calls to these
SLF4J: loggers will work as normally expected.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: com.tp_link.eap.util.o
startup...
Mar 09, 2020 4:19:17 PM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 4.3.1.Final
Failed to start omada controller, going to exit

I have manually created /opt/tplink/EAPController/data,work,logs and /data/db and chown 508:508 to all of these.

from docker-omada-controller.

mbentley avatar mbentley commented on July 26, 2024

Iā€™m thinking maybe I should see if I can do some pre-flight checks to make sure the user can write to all of the necessary folders and see if I can proactively bring these issues up in the logs and refuse to start.

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

Actually I just solved this, thanks! I found in the comments of another docker image (forked from yours) that you need 4GB of free space to start the Omada controller, as it builds a db this large on first run. Didn't expect that (or would expect at the very least for omada to output some useful info about this!). Cheers for the docker image btw :)

from docker-omada-controller.

mbiebl avatar mbiebl commented on July 26, 2024

mongodb will create 3 journal files, each 1GB in size (plus the actual database).
You can use the --smallfiles option, this will use journal files that are 128MB in size.
See my comments at #9 (comment)

I think for the amount of data that is written by the omada controller software, 128MB of journal should be plenty.

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

Not sure (due to it all being dockerised) - where does one apply the --smallfiles option? Many thanks!

from docker-omada-controller.

mbiebl avatar mbiebl commented on July 26, 2024

Inside the docker container in /opt/tplink/EAPController/properties/mongodb.properties append it to eap.mongod.args=

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

I don't have a properties directory, or a mongodb.properties. I have data, logs and work directories, as per the container instructions.

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

Ah..its within the running container. I ssh'ed in but the container doesn't have vim, vi, nano or pico available to edit the file. My unix foo is not good enough.

Also won't this change get blown away every time the docker container gets updated?

@mbentley would it be possible to expose this property file as part of the persistent volumes? Or make it an environmental parameter?

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

Okay, had to get creative here, but for anyone else looking for a solution I think the following should work inside the container

sed -i 's/nohttpinterface/nohttpinterface --smallfiles/g' /opt/tplink/EAPController/properties/mongodb.properties

from docker-omada-controller.

mbentley avatar mbentley commented on July 26, 2024

Yes, it would be possible to do something. The easiest would be to copy the file out of the container using docker cp, make the updates, and make it a persistent bind mount in addition to the other persistent directories. I was looking at doing something allow a flag to add that setting using a similar method but I have not had a chance to do so.

from docker-omada-controller.

timdonovanuk avatar timdonovanuk commented on July 26, 2024

I can confirm my command works. I actually ran into this problem again where the omada-controller wouldn't start as there was under 3.4GB left on the system. Smallfiles fixed it! Thanks.

from docker-omada-controller.

mbiebl avatar mbiebl commented on July 26, 2024

Also won't this change get blown away every time the docker container gets updated?

It will. You can use the approach though as suggested by @mbentley to bind-mount the properties file into the container. This will survive container updates.

from docker-omada-controller.

mbentley avatar mbentley commented on July 26, 2024

@timdonovanuk - I have a more permanent fix for you that I added in #26 Let me know if that works. Looks like it should.

from docker-omada-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.