GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.33k stars 379 forks source link

Application startup fails org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Is a directory #1769

Closed joewragg closed 2 days ago

joewragg commented 3 months ago

Is there an existing issue for this?

Problem description

App startup fails with errors

Proposed solution

Not sure as snakeyaml is apparently not used?

Additional context

No response

Forum Topic Link

No response

joewragg commented 3 months ago

#################
--
# Container ENV #
#################
✓ CONTAINER_LOG_LEVEL: INFO. Set CONTAINER_LOG_LEVEL=DEBUG for more details.
ⓘ Any config file settings can be overwritten by environment variables.
ⓘ Use 'CONTAINER_LOG_LEVEL=DEBUG' to see the full list of active environment variables for this container.
###########################
# Container sanity checks #
###########################
ⓘ Running container as user ors with id 1000 and group 1000
✓ ORS_HOME: /home/ors exists and is writable.
✓ Update the file /home/ors/config/example-ors-config.env with /example-ors-config.env
✓ Update the file /home/ors/config/example-ors-config.yml with /example-ors-config.yml
✓ Using the existing ors-config.yml from: /home/ors/config/ors-config.yml
ⓘ Default to graphs folder: /home/ors/graphs
ⓘ Any ENV variables will have precedence over configuration variables from config files.
✓ All checks passed. For details set CONTAINER_LOG_LEVEL=DEBUG.
#####################################
# Container file system preparation #
#####################################
chown: /home/ors/graphs: Operation not permitted
chown: /home/ors/graphs: Operation not permitted
chown: /home/ors/files: Operation not permitted
chown: /home/ors/files: Operation not permitted
chown: /home/ors/logs: Operation not permitted
chown: /home/ors/logs: Operation not permitted
chown: /home/ors/elevation_cache: Operation not permitted
chown: /home/ors/elevation_cache: Operation not permitted
✓ Update the file /home/ors/files/example-heidelberg.osm.gz with /heidelberg.osm.gz
✓ Container file system preparation complete. For details set CONTAINER_LOG_LEVEL=DEBUG.
#######################################
# Prepare CATALINA_OPTS and JAVA_OPTS #
#######################################
✓ CATALINA_OPTS and JAVA_OPTS ready. For details set CONTAINER_LOG_LEVEL=DEBUG.
ⓘ ##########################################
ⓘ # Config options and migration information #
ⓘ ##########################################
ⓘ >>> Migration information <<<
⚠ Configuring ors with a .json config is deprecated and will be removed in the future.
ⓘ You can use the ors-config-migration tool to migrate your .json config to .yml: https://github.com/GIScience/ors-config-migration#usage
ⓘ >>> Config options <<<
ⓘ You have the following options to configure ORS:
ⓘ Method 1 yml config:
ⓘ > docker cp ors-container-name:/home/ors/config/example-ors-config.yml ./ors-config.yml
ⓘ > docker run --name example-ors-instance-conf-file -e ORS_CONFIG_LOCATION=/home/ors/config/ors-config.yml -v $(pwd)/ors-config.yml:/home/ors/config/ors-config.yml openrouteservice/openrouteservice:latest
ⓘ Method 2 environment variables:
ⓘ > docker cp ors-container-name:/home/ors/config/example-ors-config.env ./ors-config.env
ⓘ > docker run --name example-ors-instance-env-file --env-file ors-config.env openrouteservice/openrouteservice:latest
ⓘ >>> End of migration information <<<
#####################
# ORS startup phase #
#####################
✓ 🙭 Ready to start the ORS application 🙭
09:33:14.337 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.yaml.snakeyaml.error.YAMLException: java.io.IOException: Is a directory
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:214) ~[snakeyaml-2.0.jar!/:?]
at org.yaml.snakeyaml.reader.StreamReader.ensureEnoughData(StreamReader.java:172) ~[snakeyaml-2.0.jar!/:?]
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:84) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.heigit.ors.api.ORSEnvironmentPostProcessor.postProcessEnvironment(ORSEnvironmentPostProcessor.java:57) ~[classes!/:8.0.0]
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:109) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:94) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:174) ~[spring-context-6.0.14.jar!/:6.0.14]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167) ~[spring-context-6.0.14.jar!/:6.0.14]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:145) ~[spring-context-6.0.14.jar!/:6.0.14]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:133) ~[spring-context-6.0.14.jar!/:6.0.14]
at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64) ~[spring-boot-3.1.6.jar!/:3.1.6]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63) ~[spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:360) [spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:311) [spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) [spring-boot-3.1.6.jar!/:3.1.6]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) [spring-boot-3.1.6.jar!/:3.1.6]
at org.heigit.ors.api.Application.main(Application.java:29) [classes!/:8.0.0]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [ors.jar:8.0.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:95) [ors.jar:8.0.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [ors.jar:8.0.0]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) [ors.jar:8.0.0]
Caused by: java.io.IOException: Is a directory
at sun.nio.ch.UnixFileDispatcherImpl.read0(Native Method) ~[?:?]
at sun.nio.ch.UnixFileDispatcherImpl.read(UnixFileDispatcherImpl.java:51) ~[?:?]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:340) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:306) ~[?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:283) ~[?:?]
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:234) ~[?:?]
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:74) ~[?:?]
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:103) ~[?:?]
at java.io.FilterInputStream.read(FilterInputStream.java:119) ~[?:?]
at java.io.PushbackInputStream.read(PushbackInputStream.java:197) ~[?:?]
at org.yaml.snakeyaml.reader.UnicodeReader.init(UnicodeReader.java:85) ~[snakeyaml-2.0.jar!/:?]
at org.yaml.snakeyaml.reader.UnicodeReader.read(UnicodeReader.java:117) ~[snakeyaml-2.0.jar!/:?]
at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:179) ~[snakeyaml-2.0.jar!/:?]
... 41 more
joewragg commented 2 days ago

This seems to have fixed since I moved my deployment to EKS and ORS v8.1.0 so not sure what the issue was