opencast / opencast-docker

Dockerfiles for Opencast
https://quay.io/organization/opencast/
Educational Community License v2.0
41 stars 36 forks source link

Publishing issue #12

Closed BaddMann closed 8 years ago

BaddMann commented 8 years ago

I'm currently having issues publishing any videos that I process. The initial processing before hold has no issues. I'm using "Docker for Mac", could it be s factor? The logs i'm getting are next to useless. just complaining about a Eclipse missing.

mtneug commented 8 years ago

Can you describe your setup in more details:

Most probable PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL is set to an URL which cannot be reached within some of the containers. Especially when with multiple containers, this value cannot be using the localhost domain, as that is unique for every container.

BaddMann commented 8 years ago
  1. Allinone
  2. My host mac's ip address as seen from ifconfig
  3. i'm not sure I was using your compose command I only set export and eventually the Volume attribute for Data on the opencast container.

I've had file read and write issues with Docker 4 mac where the docker binary has lost connectivity with all the containers while a Nginx container was doing Caching to a host volume share. So I'm suspecting Docker more than your container at this point, but don't know about either...

I'll look into question 3

BaddMann commented 8 years ago

Just re-built my containers... caught this as it was building opencast_1: 2016-07-20 01:50:32,561 | WARN | (FeaturesServiceImpl:444) - Error when installing feature region: java.io.IOException: Error resolving artifact org.eclipse.equinox:region:jar:1.0.0.v20110506: Could not find artifact org.eclipse.equinox:region:jar:1.0.0.v20110506 in central (http://repo1.maven.org/maven2/)

This important?

BaddMann commented 8 years ago

ok how would I determine what PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL is set too? It's not an environment variable, best I can tell. I'm sure I'm missing something

mtneug commented 8 years ago

The warning seems to be normal. I get the same one and a couple of others right at the start. Opencast should still be working fine.

Since you use the allinone image the environment variable PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL is not relevant; its only necessary for multiple containers to find each other. This setting then depends on ORG_OPENCASTPROJECT_SERVER_URL. You can see the set value by running:

$ docker-compose -p opencast-allinone -f docker-compose/docker-compose.allinone.hsql.yml exec opencast sh -c 'echo $ORG_OPENCASTPROJECT_SERVER_URL'

Can you confirm that this address is set correctly? Also can you try to connect to it within the container, e.g. with wget:

$ docker-compose -p opencast-allinone -f docker-compose/docker-compose.allinone.hsql.yml exec opencast sh -c 'wget -s $ORG_OPENCASTPROJECT_SERVER_URL'

You should see something like

Connecting to <my-ip-from-HOSTIP>:8080 (<my-ip-from-HOSTIP>:8080)

I tested the provided docker-compose.allinone.hsql.yml file with Docker for Mac version 1.12.0-rc4-beta20 (build: 10404) 32ce3bdb164320603f1c2d1fb2ba32a43477ef3d which worked fine.

Could you also give the exception that is thrown on that operation. You can see it in the details of the event -> Workflows -> Details -> Errors & Warnings Details -> Details.

BaddMann commented 8 years ago

ok here is the error I get when I run your Command:

WARNING: The HOSTIP variable is not set. Defaulting to a blank string. Connecting to 10.1.0.33:8080 (10.1.0.33:8080) Connecting to 10.1.0.33:8080 (10.1.0.33:8080)

Here is the Error I get when I go to modify the one file that manages to upload correctly:

Exception in thread Thread-4: Traceback (most recent call last): File "threading.py", line 810, in __bootstrap_inner File "threading.py", line 763, in run File "compose/cli/log_printer.py", line 149, in tail_container_logs File "compose/cli/log_printer.py", line 179, in wait_on_exit File "compose/container.py", line 239, in wait File "site-packages/docker/utils/decorators.py", line 21, in wrapped File "site-packages/docker/api/container.py", line 441, in wait File "site-packages/docker/client.py", line 172, in _raise_for_status APIError: 500 Server Error: Internal Server Error ("dial unix /Users/alpha/Library/Containers/com.docker.docker/Data/_00000003.00000948: connect: connection refused") Exception in thread Thread-3: Traceback (most recent call last): File "threading.py", line 810, in __bootstrap_inner File "threading.py", line 763, in run File "compose/cli/log_printer.py", line 149, in tail_container_logs File "compose/cli/log_printer.py", line 179, in wait_on_exit File "compose/container.py", line 239, in wait File "site-packages/docker/utils/decorators.py", line 21, in wrapped File "site-packages/docker/api/container.py", line 441, in wait File "site-packages/docker/client.py", line 172, in _raise_for_status APIError: 500 Server Error: Internal Server Error ("dial unix /Users/alpha/Library/Containers/com.docker.docker/Data/_00000003.00000948: connect: connection refused")

Here is a common error I get when uploading:

opencast_1 | 2016-07-20 19:49:27,449 | INFO | (FFmpegEncoderEngine:189) - Error while decoding stream #1:1: Out of memory

Any of this help?

BaddMann commented 8 years ago

I'm having trouble finding the command to add to the Docker compose file to map the volume on creation. I'll take a parameter as much as a command in the file, just can't find definite resources on what to do...

BaddMann commented 8 years ago

Finally Got were all my Videos are Failing:

2016-07-20 23:22:50,119 | INFO | (VideoEditorWorkflowOperationHandler:444) - Create processing jobs for smil editor-cutting-information.

They kind of just pause indefinitely.

BaddMann commented 8 years ago

Ok. Turns out my main issue was RAM. I re-started on a bigger I-mac with 16GB of RAM and gave it 12 GB of it. Also bumped up the CPU cores in use from 2 to 4.

Now I'm having no problems processing files. Unless I try to edit! While Uploading Some test files i clicked on Edit for some previous event and the whole docker environment collapsed.

I'm guessing this is more of an issue with the Read/Writes for "Docker for Mac" and not a fault of yours though.

Thanks for putting up with me.

mtneug commented 8 years ago

OK I'm glad it is working now. Just as a note in Opencast 2.2 they changed the way jobs are handled. Now each job has a load value depending on how expensive it is to run. Also each system has a maximum load it can handle. By default this equals the number of CPU cores (the setting you set in Docker for Mac). Jobs that exceed that number can be run on that instance. The edit operation by default has a load of 4 meaning that by default it requires a system with 4 CPU cores. All of that can be adapted.