Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run image as docker container - application.yaml malformed ffmpeg profile commands #16

Closed
rubenkr opened this issue Aug 21, 2020 · 4 comments

Comments

@rubenkr
Copy link

rubenkr commented Aug 21, 2020

Hi there,

first of all thank you very much for your great work. I can hardly express in words how much I appreciate the fact you share your knowledge and code here. I tried to run the instance as follow

docker run --name=proxylive -p 3080:8080 --restart=always -d -v /mnt/application.yml:/app/application.yml:ro segator/proxylive

I am using the application.yml from a previous issue.

Getting following docker logs errors:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
11:29:20.899 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath: [jar:file:/app/proxyLive.jar!/BOOT-INF/classes!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-web-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-autoconfigure-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-logging-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/logback-classic-1.2.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/logback-core-1.2.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/log4j-to-slf4j-2.11.2.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/log4j-api-2.11.2.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jul-to-slf4j-1.7.25.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/javax.annotation-api-1.3.2.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-core-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-jcl-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/snakeyaml-1.23.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-json-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-datatype-jdk8-2.9.8.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-datatype-jsr310-2.9.8.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-module-parameter-names-2.9.8.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-tomcat-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/tomcat-embed-core-9.0.16.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/tomcat-embed-el-9.0.16.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/tomcat-embed-websocket-9.0.16.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/hibernate-validator-6.0.14.Final.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/validation-api-2.0.1.Final.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jboss-logging-3.3.2.Final.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/classmate-1.4.0.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-web-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-beans-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-webmvc-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-aop-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-context-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-expression-5.1.5.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-starter-actuator-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-actuator-autoconfigure-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/spring-boot-actuator-2.1.3.RELEASE.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/micrometer-core-1.1.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/HdrHistogram-2.1.9.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/LatencyUtils-2.0.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/micrometer-registry-prometheus-1.1.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/simpleclient_common-0.5.0.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/simpleclient-0.5.0.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/geoip2-2.8.0.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/maxmind-db-1.2.1.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/httpclient-4.5.7.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/httpcore-4.4.11.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/commons-codec-1.11.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-databind-2.9.8.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-annotations-2.9.0.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jackson-core-2.9.8.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/commons-compress-1.19.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/commons-io-1.3.2.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/commons-lang3-3.4.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/commons-cli-1.2.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/json-simple-1.1.1.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/junit-4.12.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/hamcrest-core-1.3.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/org.eclipse.jgit-5.7.0.202003110725-r.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jsch-0.1.55.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/jzlib-1.1.1.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/JavaEWAH-1.1.7.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/slf4j-api-1.7.25.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/bcpg-jdk15on-1.64.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/bcprov-jdk15on-1.64.jar!/, jar:file:/app/proxyLive.jar!/BOOT-INF/lib/bcpkix-jdk15on-1.64.jar!/]
11:29:21.204 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL
11:29:21.215 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.
11:29:21.216 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.
11:29:21.216 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.
11:29:21.217 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.
11:29:21.217 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
11:29:22.243 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location 'file:./application.yml'
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:554)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:500)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:467)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$6(ConfigFileApplicationListener.java:448)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$7(ConfigFileApplicationListener.java:447)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:444)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:332)
        at org.springframework.boot.context.config.ConfigFileApplicationListener.addPropertySources(ConfigFileApplicationListener.java:207)
        at org.springframework.boot.context.config.ConfigFileApplicationListener.postProcessEnvironment(ConfigFileApplicationListener.java:190)
        at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:177)
        at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:163)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75)
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
        at com.github.segator.proxylive.Application.main(Application.java:38)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here
 in 'reader', line 6, column 16:
            refresh: 600 #10 minutes
                   ^

        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:870)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:358)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:214)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144)
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:236)
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:227)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:215)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144)
        at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:236)
        at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:227)
        at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:215)
        at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:144)
        at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:85)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:123)
        at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:547)
        at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:161)
        at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:134)
        at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:75)
        at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadDocuments(ConfigFileApplicationListener.java:572)
        at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:526)
        ... 31 common frames omitted
➜  iptv_proxylive

Any help is highly appreciated. Thank you in advance !

@segator
Copy link
Owner

segator commented Aug 21, 2020

Thanks for your kind words, i just want to share my work with rest of people :)

check this

Caused by: org.yaml.snakeyaml.scanner.ScannerException: mapping values are not allowed here
 in 'reader', line 6, column 16:
            refresh: 600 #10 minutes`

remove the content after # and included

@rubenkr
Copy link
Author

rubenkr commented Aug 24, 2020

segator, thank you very much. I will retry tonight. Have a great start in the week !

@rubenkr rubenkr closed this as completed Aug 24, 2020
@rubenkr
Copy link
Author

rubenkr commented Aug 24, 2020

Problem was related to other issues inexperience with yaml syntax. Tracked down the errors with yamllint to get a working applications.yaml (https://gist.github.com/rubenkr/d5b5c874d708516fa82b35ace2c2e09e). Config can be found in the link. Some braindump from my side to get this great code started:

    1. Deactivate geoip (= false)
    1. Use correct yaml syntax - correct with yamllint if required
    1. Leave tag channels empty or use type tvheadend
      -4. Use ffmpeg path for docker as with path: '/usr/local/bin/ffmpeg' instead of /usr/bin (local machines)

I am still getting errors regarding my shortened yaml lines of ffmpeg. Can you give me a hint how to solve?

2020-08-24 13:36:09,784 ERROR [Transcoding Error Reader Thread:c129738c8d81b2e9eda82cadad9c788e_1080p] com.github.segator.proxylive.tasks.DirectTranscodeTask$1: [c129738c8d81b2e9eda82cadad9c788e_1080p] Error on transcoding java.io.IOException: Process is not running at com.github.segator.proxylive.tasks.DirectTranscodeTask.isRunning(DirectTranscodeTask.java:228) at com.github.segator.proxylive.tasks.DirectTranscodeTask$1.run(DirectTranscodeTask.java:117) 2020-08-24 13:36:09,785 DEBUG [c129738c8d81b2e9eda82cadad9c788e_1080p] com.github.segator.proxylive.tasks.DirectTranscodeTask: [c129738c8d81b2e9eda82cadad9c788e_1080p] Start Transcode 2020-08-24 13:36:09,785 DEBUG [c129738c8d81b2e9eda82cadad9c788e_1080p] com.github.segator.proxylive.tasks.DirectTranscodeTask: [c129738c8d81b2e9eda82cadad9c788e_1080p] Transcoding Command: /usr/local/bin/ffmpeg -sn -c:a:0 aac -ac 2 -b:a 320k -c:v libx264 -tune zerolatency -g 300 -vprofile high -level 4.0 -movflags +faststart -bufsize 15000k -maxrate 5000k -preset faster -vf yadif=0 -threads 0 -f mpegts -mpegts_m2ts_mode 1 -mpegts_copyts 1 -mpegts_flags +resend_headers - 2020-08-24 13:36:09,813 ERROR [c129738c8d81b2e9eda82cadad9c788e_1080p] com.github.segator.proxylive.tasks.DirectTranscodeTask: Error on transcoding c129738c8d81b2e9eda82cadad9c788e_1080p

@rubenkr rubenkr reopened this Aug 24, 2020
@rubenkr rubenkr changed the title Unable to docker run given image Unable to run image as docker container - application.yaml malformed ffmpeg profile commands Aug 24, 2020
@rubenkr
Copy link
Author

rubenkr commented Aug 24, 2020

Simply add parameters: "-i {input} {channelParameters} to applications.yaml resolving the issues above.

@rubenkr rubenkr closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants