Problems after running the --media-dir command

Hello, running Ubuntu 20.04

After running the --media-dir /new/path I am getting some error.

The --media-dir command does not change the location of the task output. I am able to run webodm and the task complete but I guess to the default location.
I have tried ./webodm.sh rebuild and then start up again but this error keeps coming.

What could be the problem?

worker | [2021-01-13 14:18:37,291: ERROR/ForkPoolWorker-1] worker.tasks.process_task[0319b8ee-d7ff-4e6c-a621-4d6060769f4e]: Uncaught error! This is potentially bad. Please report it to http://github.com/OpenDroneMap/WebODM/issues: [Errno 2] No such file or directory: ‘/webodm/app/media/project/9/task/e744a8d8-3686-45ac-a800-32168d3c544e/’ Traceback (most recent call last):
worker | File “/webodm/worker/tasks.py”, line 109, in process_task
worker | task.process()
worker | File “/webodm/app/models/task.py”, line 440, in process
worker | resized_images = self.resize_images()
worker | File “/webodm/app/models/task.py”, line 871, in resize_images
worker | images_path = self.find_all_files_matching(r’.*.(jpe?g|tiff?)$')
worker | File “/webodm/app/models/task.py”, line 851, in find_all_files_matching
worker | return [os.path.join(directory, f) for f in os.listdir(directory) if
worker | FileNotFoundError: [Errno 2] No such file or directory: ‘/webodm/app/media/project/9/task/e744a8d8-3686-45ac-a800-32168d3c544e/’

Regards M

1 Like

Did you try ./webodm.sh down first?

Yes I did…

I did run the command again…

./webodm.sh down
./wedodm.sh rebuild
./webodm. start

and got this now instead

Attaching to webodm_node-odm_1, broker, db, worker, webapp
db |
db | PostgreSQL Database directory appears to contain a database; Skipping initialization
db |
db | LOG: database system was shut down at 2021-01-14 08:41:59 UTC
broker | 1:C 14 Jan 2021 08:42:32.416 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
broker | 1:C 14 Jan 2021 08:42:32.417 # Redis version=6.0.10, bits=64, commit=00000000, modified=0, pid=1, just started
broker | 1:C 14 Jan 2021 08:42:32.417 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
db | LOG: MultiXact member wraparound protections are now enabled
broker | 1:M 14 Jan 2021 08:42:32.418 * Running mode=standalone, port=6379.
broker | 1:M 14 Jan 2021 08:42:32.418 # Server initialized
broker | 1:M 14 Jan 2021 08:42:32.418 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
node-odm_1 | info: Authentication using NoTokenRequired
db | LOG: database system is ready to accept connections
worker | Password for user postgres:
db | LOG: autovacuum launcher started
broker | 1:M 14 Jan 2021 08:42:32.419 * Ready to accept connections
node-odm_1 | info: Listening on 0.0.0.0:6367 UDP for progress updates
worker | psql: fe_sendauth: no password supplied
node-odm_1 | info: No tasks dump found
worker | Postgres is unavailable - sleeping
node-odm_1 | info: Checking for orphaned directories to be removed…
node-odm_1 | info: Server has started on port 3000
webapp | Password for user postgres:
webapp | psql: fe_sendauth: no password supplied
webapp | Postgres is unavailable - sleeping
worker | Password for user postgres:
worker | psql: fe_sendauth: no password supplied
worker | Postgres is unavailable - sleeping
webapp | Password for user postgres:
webapp | psql: fe_sendauth: no password supplied
webapp | Postgres is unavailable - sleeping
worker | Password for user postgres:
worker | psql: fe_sendauth: no password supplied
worker | Postgres is unavailable - sleeping
webapp | Password for user postgres:
webapp | psql: fe_sendauth: no password supplied
webapp | Postgres is unavailable - sleeping
worker | Password for user postgres:
worker | psql: fe_sendauth: no password supplied

I did reinstall docker and now everything works again incl. the --media-dir command.

Sorry for the basic questions - but I am learning as I go and do not have alot of experience.

What is the permanent solution for this? --media-dir command and --port command returns to default values after reboot.

I need to increase the storage space on webodm and redirect the file output location.

So reading from my diagnostic page:

Note! These values might be relative to the virtualization environment in which the application is running, not necessarily the values of the your machine. See instructions for Windows and MacOS for changing these values in a Docker setup.

So to change the storage space I need to change the docker-compose.yml file?

Today:
webapp:
image: opendronemap/webodm_webapp
container_name: webapp
entrypoint: /bin/bash -c “chmod +x /webodm/.sh && /bin/bash -c "/webodm/wait-for-postgres.sh db /webodm/wait-for-it.sh -t 0 broker:6379 – /webodm/start.sh""
volumes:
- ${WO_MEDIA_DIR}:/webodm/app/media:z
ports:
- “${WO_PORT}:8000”
To:
webapp:
image: opendronemap/webodm_webapp
container_name: webapp
entrypoint: /bin/bash -c "chmod +x /webodm/
.sh && /bin/bash -c "/webodm/wait-for-postgres.sh db /webodm/wait-for-it.sh -t 0 broker:6379 – /webodm/start.sh"”
volumes:
- ${WO_MEDIA_DIR}:/media/webodm/LaCie2/webodm:z
ports:
- “${WO_PORT}:8000”

Is this correct - and also would I need to do this under worker

worker:
image: opendronemap/webodm_webapp
container_name: worker
entrypoint: /bin/bash -c “/webodm/wait-for-postgres.sh db /webodm/wait-for-it.sh -t 0 broker:6379 – /webodm/wait-for-it.sh -t 0 webapp:8000 – /webodm/worker.sh start”
volumes:
- ${WO_MEDIA_DIR}:/webodm/app/media:z

So would my new output WO_MEDIA_DIR increase the storage space and locate my task files on /media/webodm/LaCie2/webodm ?

Hope you understand what I am trying to do :slight_smile:

Regards

1 Like

The diagram from the diagnostic panel will show you the free disk space available on the container (not the app/media directory). I wouldn’t rely on it if you’re mounting volumes :slight_smile:

Theoretically you shouldn’t need to modify the docker-compose files, that’s what the --media-dir option does (it sets the WO_MEDIA_DIR variable).

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.