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

Executing make start-rest won't start #24

Closed
carcuevas opened this issue Nov 9, 2022 · 4 comments
Closed

Executing make start-rest won't start #24

carcuevas opened this issue Nov 9, 2022 · 4 comments

Comments

@carcuevas
Copy link

Hi,

I am doing some tests with the converter, and I tried to build the application with make build and everything seems to be created properly, but after trying start-rest I will have one exception, and it won't start... here are the logs:


2022-11-09 13:28:34.054  INFO 1 --- [           main] o.j.s.rest.SpringBootRestApplication     : Starting SpringBootRestApplication using Java 17.0.5 on 746be76420ad with PID 1 (/opt/app/app.war started by jodconverter in /)
2022-11-09 13:28:34.079 DEBUG 1 --- [           main] o.j.s.rest.SpringBootRestApplication     : Running with Spring Boot v2.7.3, Spring v5.3.22
2022-11-09 13:28:34.081  INFO 1 --- [           main] o.j.s.rest.SpringBootRestApplication     : No active profile set, falling back to 1 default profile: "default"
2022-11-09 13:28:37.324  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-11-09 13:28:37.348  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-11-09 13:28:37.349  INFO 1 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.65]
2022-11-09 13:28:39.451  INFO 1 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-11-09 13:28:39.452  INFO 1 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5174 ms
2022-11-09 13:28:40.391 DEBUG 1 --- [           main] o.j.local.office.LocalOfficeUtils        : Default office home set to /usr/lib/libreoffice
2022-11-09 13:28:40.416 DEBUG 1 --- [           main] o.j.c.office.AbstractOfficeManagerPool   : Returning office manager to the pool...
2022-11-09 13:28:40.418  INFO 1 --- [er-offprocmng-0] o.j.local.office.OfficeDescriptor        : soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true
2022-11-09 13:28:40.427 DEBUG 1 --- [           main] o.j.c.office.AbstractOfficeManagerPool   : Returning office manager to the pool...
2022-11-09 13:28:40.427  INFO 1 --- [er-offprocmng-1] o.j.local.office.OfficeDescriptor        : soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true
2022-11-09 13:28:40.877 DEBUG 1 --- [er-offprocmng-0] o.j.local.office.OfficeDescriptor        : Building org.jodconverter.local.office.OfficeDescriptor from help output lines
2022-11-09 13:28:40.878  INFO 1 --- [er-offprocmng-0] o.j.local.office.OfficeDescriptor        : soffice info (from help output): Product: LibreOffice - Version: 7.0.4.2 - useLongOptionNameGnuStyle: true
2022-11-09 13:28:40.911 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.OfficeDescriptor        : Building org.jodconverter.local.office.OfficeDescriptor from help output lines
2022-11-09 13:28:40.911  INFO 1 --- [er-offprocmng-1] o.j.local.office.OfficeDescriptor        : soffice info (from help output): Product: LibreOffice - Version: 7.0.4.2 - useLongOptionNameGnuStyle: true
2022-11-09 13:28:40.915 DEBUG 1 --- [er-offprocmng-0] o.j.l.process.AbstractProcessManager     : No matching command line found! Returning pid: NOT_FOUND
2022-11-09 13:28:40.915 DEBUG 1 --- [er-offprocmng-0] o.j.l.office.LocalOfficeProcessManager   : Checking existing process done; no process running with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager'
2022-11-09 13:28:40.916 DEBUG 1 --- [er-offprocmng-0] o.j.l.office.LocalOfficeProcessManager   : ProcessBuilder command: /usr/lib/libreoffice/program/soffice.bin --accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager --headless --invisible --nocrashreport --nodefault --nofirststartwizard --nolockcheck --nologo --norestore -env:UserInstallation=file:///tmp/.jodconverter_socket_host-127.0.0.1_port-
2002_tcpNoDelay-1
2022-11-09 13:28:40.917 DEBUG 1 --- [er-offprocmng-0] o.j.l.office.LocalOfficeProcessManager   : OFFICE HOME: /usr/lib/libreoffice
2022-11-09 13:28:40.918  INFO 1 --- [er-offprocmng-0] o.j.l.office.LocalOfficeProcessManager   : Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1'
2022-11-09 13:28:40.920 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #1
2022-11-09 13:28:40.946 DEBUG 1 --- [er-offprocmng-1] o.j.l.process.AbstractProcessManager     : No matching command line found! Returning pid: NOT_FOUND
2022-11-09 13:28:40.946 DEBUG 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : Checking existing process done; no process running with --accept 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp;StarOffice.ServiceManager'
2022-11-09 13:28:40.946 DEBUG 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : ProcessBuilder command: /usr/lib/libreoffice/program/soffice.bin --accept=socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp;StarOffice.ServiceManager --headless --invisible --nocrashreport --nodefault --nofirststartwizard --nolockcheck --nologo --norestore -env:UserInstallation=file:///tmp/.jodconverter_socket_host-127.0.0.1_port-
2003_tcpNoDelay-1
2022-11-09 13:28:40.946 DEBUG 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : OFFICE HOME: /usr/lib/libreoffice
2022-11-09 13:28:40.946  INFO 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : Starting process with --accept 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir '/tmp/.jodconverter_socket_host-127.0.0.1_port-2003_tcpNoDelay-1'
2022-11-09 13:28:40.947 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #1
2022-11-09 13:28:40.952 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Trying to find pid, attempt #1
2022-11-09 13:28:40.968 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Trying to find pid, attempt #1
2022-11-09 13:28:40.998 DEBUG 1 --- [er-offprocmng-0] o.j.l.process.AbstractProcessManager     : Command line matches! Returning pid: 58
2022-11-09 13:28:40.998 DEBUG 1 --- [er-offprocmng-0] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2022-11-09 13:28:41.019 DEBUG 1 --- [er-offprocmng-1] o.j.l.process.AbstractProcessManager     : Command line matches! Returning pid: 61
2022-11-09 13:28:41.019 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1'
2022-11-09 13:28:41.115 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #1 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.123 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #1 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.366 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #2
2022-11-09 13:28:41.367 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1'
2022-11-09 13:28:41.369 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #2 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.374 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #2
2022-11-09 13:28:41.374 DEBUG 1 --- [er-offprocmng-0] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2022-11-09 13:28:41.376 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #2 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.619 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #3
2022-11-09 13:28:41.620 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1'
2022-11-09 13:28:41.626 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #3
2022-11-09 13:28:41.627 DEBUG 1 --- [er-offprocmng-0] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2022-11-09 13:28:41.628 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #3 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.626 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #3 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.879 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #4
2022-11-09 13:28:41.879 DEBUG 1 --- [er-offprocmng-0] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2022-11-09 13:28:41.882  WARN 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Office process died with exit code 81; restarting it
2022-11-09 13:28:41.882 DEBUG 1 --- [er-offprocmng-0] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #4 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.883 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #4
2022-11-09 13:28:41.883 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.OfficeConnection        : Connecting with connectString 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1'
2022-11-09 13:28:41.884  WARN 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Office process died with exit code 81; restarting it
2022-11-09 13:28:41.885 DEBUG 1 --- [er-offprocmng-1] o.j.l.o.StartProcessAndConnectRetryable  : Execution attempt #4 failed, retrying after sleep of 250 ms
2022-11-09 13:28:41.977  INFO 1 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-11-09 13:28:41.986  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestConditi
on.getPatterns()" because "this.condition" is null
2022-11-09 13:28:41.988  INFO 1 --- [           main] o.j.c.office.AbstractOfficeManagerPool   : Stopping the office manager pool...
2022-11-09 13:28:41.988 DEBUG 1 --- [           main] o.j.l.office.LocalOfficeProcessManager   : Submitting stop task...
2022-11-09 13:28:41.990 DEBUG 1 --- [           main] o.j.l.office.LocalOfficeProcessManager   : Waiting for stop task to complete (121000 millisecs)...

and after more about the exception is shown:

2022-11-09 13:28:42.859 DEBUG 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : Stopping the office process with deleteInstanceProfileDir set to true...
2022-11-09 13:28:42.862 DEBUG 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : The office process will be terminated shortly. A request has been sent to terminate the desktop.
2022-11-09 13:28:42.862 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.ExitCodeRetryable       : Execution attempt #1
2022-11-09 13:28:42.862 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.ExitCodeRetryable       : Execution attempt #1 failed, retrying after sleep of 250 ms
2022-11-09 13:28:42.910  INFO 1 --- [ssageDispatcher] o.j.local.office.OfficeConnection        : Disconnected from 'socket,host=127.0.0.1,port=2003,tcpNoDelay=1'
2022-11-09 13:28:43.112 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.ExitCodeRetryable       : Execution attempt #2
2022-11-09 13:28:43.112 DEBUG 1 --- [er-offprocmng-1] o.j.local.office.ExitCodeRetryable       : Execution succeeded on attempt #2
2022-11-09 13:28:43.113  INFO 1 --- [er-offprocmng-1] o.j.l.office.LocalOfficeProcessManager   : Process exited with code 0
2022-11-09 13:28:43.114 DEBUG 1 --- [er-offprocmng-1] o.jodconverter.core.office.OfficeUtils   : Deleting '/tmp/.jodconverter_socket_host-127.0.0.1_port-2003_tcpNoDelay-1'
2022-11-09 13:28:43.114 DEBUG 1 --- [er-offprocmng-1] o.j.c.o.OfficeUtils$DeleteFileRetryable  : Execution attempt #1
2022-11-09 13:28:43.138 DEBUG 1 --- [er-offprocmng-1] o.j.c.o.OfficeUtils$DeleteFileRetryable  : Execution succeeded on attempt #1
2022-11-09 13:28:43.138 DEBUG 1 --- [           main] o.j.l.office.LocalOfficeProcessManager   : Stop task executed successfully.
2022-11-09 13:28:43.138 DEBUG 1 --- [           main] o.jodconverter.core.office.OfficeUtils   : Deleting '/tmp/.jodconverter_2a24db8e-9633-4e59-a198-025ecc58b292'
2022-11-09 13:28:43.139 DEBUG 1 --- [           main] o.j.c.o.OfficeUtils$DeleteFileRetryable  : Execution attempt #1
2022-11-09 13:28:43.140 DEBUG 1 --- [           main] o.j.c.o.OfficeUtils$DeleteFileRetryable  : Execution succeeded on attempt #1
2022-11-09 13:28:43.158  INFO 1 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2022-11-09 13:28:43.187  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-11-09 13:28:43.228 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.22.jar!/:5.3.22]
        at java.base/java.lang.Iterable.forEach(Unknown Source) ~[na:na]
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.22.jar!/:5.3.22]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar!/:2.7.3]
        at org.jodconverter.sample.rest.SpringBootRestApplication.main(SpringBootRestApplication.java:46) ~[classes!/:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[app.war:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[app.war:na]
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) ~[app.war:na]
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:58) ~[app.war:na]
Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null
        at springfox.documentation.spring.web.WebMvcPatternsRequestConditionWrapper.getPatterns(WebMvcPatternsRequestConditionWrapper.java:56) ~[springfox-spring-webmvc-3.0.0.jar!/:3.0.0]
        at springfox.documentation.RequestHandler.sortedPaths(RequestHandler.java:113) ~[springfox-core-3.0.0.jar!/:3.0.0]
        at springfox.documentation.spi.service.contexts.Orderings.lambda$byPatternsCondition$3(Orderings.java:89) ~[springfox-spi-3.0.0.jar!/:3.0.0]

The interesting is that the gui is working without any problems...

@EugenMayer
Copy link
Member

While if fixed the wrong image selection in #26 , the actual addition issue is jodconverter/jodconverter#317 - i created a PR to fix that and will need to rebuild the images for that purpose

@EugenMayer EugenMayer reopened this Dec 3, 2022
@carcuevas
Copy link
Author

Hi, yes I checked it also not using docker, using directly https://github.com/sbraconnier/jodconverter standalone and I have the same problem, also I opened there some issue: jodconverter/jodconverter#315

@EugenMayer
Copy link
Member

should have been resolved with 4.4.5-2

@carcuevas
Copy link
Author

yes it's fixed :) thanks very much

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