404: Cannot locate document: /
On windows, I ran docker run -d -p 8080:8080 -e DOCKER_ENABLE_SECURITY=false -e INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false --name stirling-pdf frooodle/s-pdf:latest
Opening my browser to localhost:8080 gave this screen:
Anything in your docker logs?
Here they are
2024-04-03 17:01:37 Copying original files without overwriting existing files
2024-04-03 17:01:37 Running Stirling PDF with DOCKER_ENABLE_SECURITY=false and VERSION_TAG=0.22.7
2024-04-03 17:01:37 Setting permissions and ownership for necessary directories...
2024-04-03 17:01:38 00:01:38.277 [main] WARN s.software.SPDF.SPdfApplication - External configuration file 'configs/settings.yml' does not exist. Using default configuration and environment configuration instead.
2024-04-03 17:01:38 ____ _____ ___ ____ _ ___ _ _ ____ ____ ____ _____
2024-04-03 17:01:38 / ___|_ _|_ _| _ \| | |_ _| \ | |/ ___| | _ \| _ \| ___|
2024-04-03 17:01:38 \___ \ | | | || |_) | | | || \| | | _ _____| |_) | | | | |_
2024-04-03 17:01:38 ___) || | | || _ <| |___ | || |\ | |_| |_____| __/| |_| | _|
2024-04-03 17:01:38 |____/ |_| |___|_| \_\_____|___|_| \_|\____| |_| |____/|_|
2024-04-03 17:01:38 Powered by Spring Boot 3.2.4
2024-04-03 17:01:38 00:01:38.663 [main] INFO s.software.SPDF.SPdfApplication - Starting SPdfApplication v0.22.7 using Java 17.0.10 with PID 7 (/app.jar started by stirlingpdfuser in /)
2024-04-03 17:01:38 00:01:38.663 [main] INFO s.software.SPDF.SPdfApplication - No active profile set, falling back to 1 default profile: "default"
2024-04-03 17:01:39 00:01:39.843 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2024-04-03 17:01:39 00:01:39.857 [main] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
2024-04-03 17:01:39 00:01:39.859 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2024-04-03 17:01:39 00:01:39.860 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.19]
2024-04-03 17:01:39 00:01:39.891 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2024-04-03 17:01:39 00:01:39.892 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1156 ms
2024-04-03 17:01:40 00:01:40.039 [main] INFO s.software.SPDF.SPdfApplication - Running configs ApplicationProperties [security=Security [enableLogin=false, initialLogin=null, csrfDisabled=true], system=System [defaultLocale=en-US, googlevisibility=false, rootURIPath=null, customStaticFilePath=null, maxFileSize=null, enableAlphaFunctionality=false], ui=null, endpoints=Endpoints [toRemove=[], groupsToRemove=[]], metrics=Metrics [enabled=true], automaticallyGenerated=null, autoPipeline=null]
2024-04-03 17:01:40 00:01:40.048 [main] INFO s.s.S.config.EndpointConfiguration - Disabling pdf-to-book
2024-04-03 17:01:40 00:01:40.049 [main] INFO s.s.S.config.EndpointConfiguration - Disabling book-to-pdf
2024-04-03 17:01:40 00:01:40.897 [main] INFO o.s.b.a.e.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
2024-04-03 17:01:40 00:01:40.927 [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2024-04-03 17:01:40 00:01:40.955 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
2024-04-03 17:01:40 00:01:40.970 [main] INFO s.software.SPDF.SPdfApplication - Started SPdfApplication in 2.69 seconds (process running for 3.286)
2024-04-03 17:01:42 00:01:42.027 [main] INFO s.software.SPDF.SPdfApplication - Stirling-PDF Started.
2024-04-03 17:01:42 00:01:42.027 [main] INFO s.software.SPDF.SPdfApplication - Navigate to http://localhost:8080
2024-04-04 09:02:23 Copying original files without overwriting existing files
2024-04-04 09:02:23 Running Stirling PDF with DOCKER_ENABLE_SECURITY=false and VERSION_TAG=0.22.7
2024-04-04 09:02:23 Setting permissions and ownership for necessary directories...
2024-04-04 09:02:24 ____ _____ ___ ____ _ ___ _ _ ____ ____ ____ _____
2024-04-04 09:02:24 / ___|_ _|_ _| _ \| | |_ _| \ | |/ ___| | _ \| _ \| ___|
2024-04-04 09:02:24 \___ \ | | | || |_) | | | || \| | | _ _____| |_) | | | | |_
2024-04-04 09:02:24 ___) || | | || _ <| |___ | || |\ | |_| |_____| __/| |_| | _|
2024-04-04 09:02:24 |____/ |_| |___|_| \_\_____|___|_| \_|\____| |_| |____/|_|
2024-04-04 09:02:24 Powered by Spring Boot 3.2.4
2024-04-04 09:02:25 16:02:25.013 [main] INFO s.software.SPDF.SPdfApplication - Starting SPdfApplication v0.22.7 using Java 17.0.10 with PID 7 (/app.jar started by stirlingpdfuser in /)
2024-04-04 09:02:25 16:02:25.016 [main] INFO s.software.SPDF.SPdfApplication - No active profile set, falling back to 1 default profile: "default"
2024-04-04 09:02:26 16:02:26.128 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
2024-04-04 09:02:26 16:02:26.137 [main] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
2024-04-04 09:02:26 16:02:26.138 [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
2024-04-04 09:02:26 16:02:26.139 [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.19]
2024-04-04 09:02:26 16:02:26.172 [main] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2024-04-04 09:02:26 16:02:26.173 [main] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1061 ms
2024-04-04 09:02:26 16:02:26.323 [main] INFO s.software.SPDF.SPdfApplication - Running configs ApplicationProperties [security=Security [enableLogin=false, initialLogin=null, csrfDisabled=true], system=System [defaultLocale=en-US, googlevisibility=false, rootURIPath=null, customStaticFilePath=null, maxFileSize=null, enableAlphaFunctionality=false], ui=null, endpoints=Endpoints [toRemove=[], groupsToRemove=[]], metrics=Metrics [enabled=true], automaticallyGenerated=null, autoPipeline=null]
2024-04-04 09:02:26 16:02:26.329 [main] INFO s.s.S.config.EndpointConfiguration - Disabling pdf-to-book
2024-04-04 09:02:26 16:02:26.329 [main] INFO s.s.S.config.EndpointConfiguration - Disabling book-to-pdf
2024-04-04 09:02:27 16:02:27.006 [main] INFO o.s.b.a.e.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
2024-04-04 09:02:27 16:02:27.037 [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2024-04-04 09:02:27 16:02:27.057 [main] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
2024-04-04 09:02:27 16:02:27.071 [main] INFO s.software.SPDF.SPdfApplication - Started SPdfApplication in 2.514 seconds (process running for 3.165)
2024-04-04 09:02:28 16:02:28.107 [main] INFO s.software.SPDF.SPdfApplication - Stirling-PDF Started.
2024-04-04 09:02:28 16:02:28.107 [main] INFO s.software.SPDF.SPdfApplication - Navigate to http://localhost:8080
2024-04-03 17:01:37 Picked up JAVA_TOOL_OPTIONS: -XX:MaxRAMPercentage=75
2024-04-04 09:02:23 Picked up JAVA_TOOL_OPTIONS: -XX:MaxRAMPercentage=75
Seems nothing wrong on app side.. i can only assume it's some firewall or network issues your side
Is there a way to run on a different port?
You are using docker so you can change the 8080 port you specified
Changing the docker argument would just change which port gets exposed. Stirling pdf itself still runs on localhost:8080. I'm pretty sure I have something else on my computer listening on port 8080 but I'm not sure how to figure out what it is.
Figured it out, it was a National Instruments service. https://forums.ni.com/t5/UVLabVIEW/NI-Web-Application-Service-on-Port-8080/td-p/3646543
For anyone else having this issue, I figured out which process was running (windows) by using PowerShell command:
Get-Process -Id (Get-NetTCPConnection -LocalPort 8080).OwningProcess
I then stopped the service in services and set it to not automatically run anymore.