-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Error: There are no available ports between 8000 and 9000 for debugging #46
Comments
Looks like it's related to rust-headless-chrome/rust-headless-chrome#300 Haven't tested that Docker image for a while, maybe it's because of the dependencies. |
I tested both the latest and 0.1.8 tags of the Docker image on my computer with Docker (Linux, amd64), and both work fine. Not sure what's going on on your side, maybe it's more related to Colima's issue. |
Thanks for the clarification, sounds like the issue might be with Colima. Do you open any port when running the docker image? |
No, the Chromium is running inside the container, no port is needed to be exposed to the host. |
One possibility is that Chromium failed to start in Colima. |
I had to run Colima in x86_64 mode with rosetta, then everything ran fine. Problem probably was that the image was built for x86 and not arm, and then caused problems with Chromium? |
Ah, so you are using Mac M1/M2/M3 and your platform is not amd64? Then the method you mentioned here is actually misleading: #45 You need to match the image architecture with your computer. I haven't added the aarch64 support in CI for that Docker image and I'll do it now. https://github.com/HollowMan6/mdbook-pdf/blob/main/.github/workflows/docker-publish.yml#L72 If everything works fine, I'll revert #45, if not, I'll let you know and feel free to add more detailed description about this on top of #45 |
Ah, I see! That is correct, I'm on M2 Max. My bad! By my googling, the platform specification had seemed to resolve issues in similar situations when running inside a VM, so I thought it was applicable, but I see now that this might not have been the correct solution in this case. Now I'm getting lot's of these issues: I'll give the updated image a go as soon as it is available |
Now we have the arm64 image https://hub.docker.com/layers/hollowman6/mdbook-pdf/latest/images/sha256-90654aba3daa6a48cfec434271e9ec3f9241e3b9c69f643c4a6f6a7859c5ce33?context=explore. You can try with that image again and see how it goes now. I expect everything to be fine, so I'll close this issue now. Feel free to let me know if you have further questions! |
Thanks! Now it works fine to run the build, but I'm getting these warnings when trying to use the image. Do you have any idea on how to fix? Or shall I open an additional issue? Btw. thanks for being so helpful and responsive :D 2024-04-25 13:13:12 [INFO] (mdbook::book): Book building has started
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "external-links" preprocessor installed?
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p mdbook-external-links --locked --release --
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "pandocs" preprocessor installed?
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p pandocs-preproc --locked --release --
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "toc" preprocessor installed?
2024-04-25 13:13:12 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p mdbook-toc --locked --release --
2024-04-25 13:13:12 [INFO] (mdbook::book): Running the html backend
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "external-links" preprocessor installed?
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p mdbook-external-links --locked --release --
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "pandocs" preprocessor installed?
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p pandocs-preproc --locked --release --
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): The command wasn't found, is the "toc" preprocessor installed?
2024-04-25 13:13:14 [WARN] (mdbook::preprocess::cmd): Command: cargo run -p mdbook-toc --locked --release -- |
Oh, I see in the README.md, that this is probably due to them not being installed on my machine. I'll try that first |
Yes, these are other dependencies, but remember to download the Linux arm64 binaries/use a container to build the binaries, don't directly download the Mac executable / build on your Mac as that won't work. |
Ah, I see. I find no published binaries for arm64 for these, so i guess I have to compile them with a container. Thanks for helping out :) |
Got it working. If useful for anyone else, I made a Dockerfile that takes in Cargo plugins as arguments to build them. https://github.com/Cliffback/rust-plugin-builder-docker To actually use the compiled binaries, I had to do it for each one (probably exists a better way) docker run --rm \
-v .:/book \
-v ~/.tmp/cargo/bin/mdbook:/mdbook \
-v ~/.tmp/cargo/bin/mdbook-toc:/mdbook-toc \
-v ~/.tmp/cargo/bin/mdbook-pandoc:/mdbook-pandoc \
-v ~/.tmp/cargo/bin/mdbook-external-links:/mdbook-external-links \
hollowman6/mdbook-pdf |
Some comments:
docker run --rm \
-v .:/book \
-v ~/.tmp/cargo/bin:/mdbook \
hollowman6/mdbook-pdf |
I tried that first, but then got warnings that none of the plugins were found. Didn’t work until I explicitly listed each plugin. |
That's interesting, it worked when I tried on my Linux machine with the method I mentioned above. Anyway, it's good if what you have tried works. |
Yeah, could be something with my setup, or related to either macOS or Colima idk :) |
I've got the very same issue, completely unrelated to macOS. I'm using a custom Dockerimage based on rust:1.80.0-bookworm with chromium installed via APT, mdbook v0.4.40-x86_64-unknown-linux-gnu and mdbook-pdf v0.1.8 installed via cargo. All jobs producing a PDF output are hanging and not executing anymore |
Did it work before and suddenly become not working now? The issue should be more related to rust-headless-chrome and looks like they have a new release recently. https://github.com/rust-headless-chrome/rust-headless-chrome/releases/tag/1.0.12 |
Okay, looks like the CI failed here as well https://github.com/HollowMan6/mdbook-pdf/actions/runs/10250872025 |
Related to rust-headless-chrome/rust-headless-chrome#500 Should be fixed in c9dbeba, will release a new version soon. |
Thank you for the fix! |
I would suggest you to check if you can actually start Chrome in your environment, it should be related to Chrome crashes. |
Ahh.. Thanks. Starting up chromium resolved my issues. This flag is now gone with the workaround fix. I don't know if you could re-add it, I guess many others will probably run into this issues soon as well. Anyways - switching the user resolves the problem. |
Now I realize that the problem should be that I re-enabled the sandbox (I forgot the reason why we needed that yesterday), while the sandbox is not supported in a container environment, so I just disabled it again (v0.1.10), and it should get back to work after the new release. |
I'm running mdbook-pdf using the docker image, but I'm getting
Error: There are no available ports between 8000 and 9000 for debugging
. I have tried opening port 8080 in the image, but the issue persists. Seems like the issue is related to rust-headless-chrome.How would I get around this issue (if possible on my end)?
I'm running docker through Colima on my mac
The text was updated successfully, but these errors were encountered: