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

[Bug]: docker-compose up -d 报错 Error: An unexpected error occurred while trying to open file /app.jar,请问如何解决 #2280

Open
1 task done
yangpeng-space opened this issue Nov 21, 2024 · 1 comment

Comments

@yangpeng-space
Copy link

Installation Method

Docker

The Problem

docker-compose up -d 无法启动服务,logs为
Stirling-PDF | Copying original files without overwriting existing files
Stirling-PDF | Setting permissions and ownership for necessary directories...
Stirling-PDF | Picked up JAVA_TOOL_OPTIONS: -XX:MaxRAMPercentage=75
Stirling-PDF | Error: An unexpected error occurred while trying to open file /app.jar

Version of Stirling-PDF

0.26.1-fat

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

No response

Docker Configuration

No response

Relevant Log Output

No response

Additional Information

No response

Browsers Affected

No response

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
Copy link

dosubot bot commented Nov 21, 2024

Hey @yangpeng-space! I'm here to help you with any bugs, questions, or contributions you have. Let's squash those bugs together! Dosu

The error "An unexpected error occurred while trying to open file /app.jar" in the Stirling-PDF Docker setup could be due to several reasons. Here are some steps you can take to troubleshoot and potentially resolve the issue:

  1. Verify File Location: Ensure that the /app.jar file is correctly located in the build/libs/ directory before building the Docker image. The Dockerfile expects the JAR file to be copied from this location [1].

  2. Check File Permissions: Make sure that the file permissions for /app.jar allow it to be read by the application. You might need to adjust the permissions using chmod or ensure that the user running the Docker container has the necessary access rights.

  3. Inspect Docker Build Logs: Review the logs from the Docker build process to ensure that the JAR file was successfully copied into the image. Any errors during the build process could indicate why the file is not accessible.

  4. Environment Variables: Double-check any environment variables that might affect file access, such as JAVA_TOOL_OPTIONS, to ensure they are set correctly and not interfering with the application's ability to access the JAR file.

  5. Rebuild the Docker Image: If changes are made to the file location or permissions, rebuild the Docker image to ensure that the latest configuration is applied.

If these steps do not resolve the issue, further investigation into the Docker setup and configuration might be necessary.

To continue talking to Dosu, mention @dosu.

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

1 participant