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

Docker image does not come up when using a mounted volume #3878

Open
g051051 opened this issue May 1, 2024 · 8 comments
Open

Docker image does not come up when using a mounted volume #3878

g051051 opened this issue May 1, 2024 · 8 comments
Assignees

Comments

@g051051
Copy link
Contributor

g051051 commented May 1, 2024

Describe the bug
Running the dirigiblelabe/dirigible:10.4.0 image fails to fully start when using a mounted volume for the target directory.

To Reproduce
Steps to reproduce the behavior:

  1. Run the docker image as described in the https://www.dirigible.io/help/setup/docker/ "with Mounted Volume" section. Note that the instructions are incorrect and the -v option should be -v <your-local-directory>:/target -p 8080:8080 -p 8081:8081.
  2. Open localhost:8080 in a browser
  3. Log in as admin/admin
  4. You should see a "busy" page indefinitely and an error in the log

Expected behavior
The system runs normally with the mounted volume.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: 124.0.6367.119 (Official Build) (64-bit)

Additional context

2024-05-01 08:33:05 2024-05-01 12:33:05.768 [ERROR] [http-nio-8080-exec-4] [background] o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: java.nio.file.FileAlreadyExistsException: /target/dirigible/repository/root/registry/public/modules/dist/esm/http/rs] with root cause
2024-05-01 08:33:05 org.graalvm.polyglot.PolyglotException: java.nio.file.FileAlreadyExistsException: /target/dirigible/repository/root/registry/public/modules/dist/esm/http/rs
@ThuF ThuF self-assigned this May 10, 2024
@ThuF
Copy link
Contributor

ThuF commented May 10, 2024

Hi @g051051, I was able to run the Docker image with mounted volume without any issues.

I've run it with the following command, where dirigible-volume is a folder on my desktop:

docker run --name dirigible \
-v /Users/thuf/Desktop/dirigible-volume:/target \
--rm -p 8080:8080 -p 8081:8081 \
dirigiblelabs/dirigible:10.4.0

Also via the Docker Desktop app:

Screenshot 2024-05-10 at 17 36 30

I'm able to login and open the Web IDE and create a project that in the end is stored on the persistent volume:

Screenshot 2024-05-10 at 17 33 00

I guess the issue that you've encountered is related actually with the loading screen (http://localhost:8080/index-busy.html, not redirecting to http://localhost:8080/services/web/ide/). It seems that this happens sometimes, before the Dirigible is fully operational. If that's the case, could we close this issue and tackle the loading screen separately?

@g051051
Copy link
Contributor Author

g051051 commented May 10, 2024

It's not the loading screen issue. It might be the Git line ending thing. I'll test it again now that I've changed that setting and see if it makes a difference.

Actually, I was using the stock docker image, so it wouldn't have anything to do with the Git settings. Did you try it on Windows?

@ThuF
Copy link
Contributor

ThuF commented May 10, 2024

Not yet, we'll investigate it under Windows too. In the meantime could you try to run it via the Windows WSL?

@g051051
Copy link
Contributor Author

g051051 commented May 10, 2024

I don't know how to run docker stuff under WSL, sorry.

@g051051
Copy link
Contributor Author

g051051 commented May 10, 2024

Pull 10.4.0 from docker hub:

image

Run it:

image

Log file (this is after the system had been sitting for 10 minutes):
dirigible_docker_windows_mounted_volume.txt

Log file for running exact same image in docker but without a mounted volume:
dirigible_docker_windows_no_mounted_volume.txt

In the first case, after logging in the "busy screen would display indefinitely. In the second case, the UI comes up immediately. Comparing the logs, a lot of the initialization never executed in the first version.

@himchev
Copy link
Contributor

himchev commented May 14, 2024

Hi @g051051, we've managed to reproduce the issue on windows. There seems to be a problem with docker desktop using mounted volume that we have to sort out.
Meanwhile as a workaround you could run dirigible directly. To do so you need to download a latest version of the dirigible jar file form the maven central repository, e.g. dirigible-application-10.4.1-executable.jar and then to set the following environment variables (given your target folder resides here D:\Dev\dirigible\target):

DIRIGIBLE_CMS_INTERNAL_ROOT_FOLDER=D:\Dev\dirigible\target\dirigible\cms
DIRIGIBLE_CMS_INTERNAL_ROOT_FOLDER_IS_ABSOLUTE=true
DIRIGIBLE_OPERATIONS_LOGS_ROOT_FOLDER_DEFAULT=D:\Dev\dirigible\logs
DIRIGIBLE_REPOSITORY_LOCAL_ROOT_FOLDER=D:\Dev\dirigible\target
DIRIGIBLE_REPOSITORY_LOCAL_ROOT_FOLDER_IS_ABSOLUTE=true
DIRIGIBLE_REPOSITORY_SEARCH_ROOT_FOLDER=D:\Dev\dirigible\target
DIRIGIBLE_REPOSITORY_SEARCH_ROOT_FOLDER_IS_ABSOLUTE=true

Finally run dirigible (as administrator) with the following command:

java -jar dirigible-application-10.4.1-executable.jar

I hope that helps.

@g051051
Copy link
Contributor Author

g051051 commented May 14, 2024

Thanks, I'll give that a try next time I work with it.

@g051051
Copy link
Contributor Author

g051051 commented May 15, 2024

I tried it, and it seemed to work OK.

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

3 participants