-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Error when using diagrams with a local Kroki instance #1361
Comments
Thanks for reporting this. I have to admit I've never used it this way myself. Please provide the details on how you started Kroki via podman. BTW: I'm a bit confused that one URL notes "8000", while another displays "8002" in the error message. Hm. |
I used the Kroki's own instructions: https://docs.kroki.io/kroki/setup/use-docker-or-podman/ , following them exactly. Yes, the offset between the configured and queried ports is what I noticed immediately too. I tried to use port When I use a public Kroki server instead, I see the diagram just fine: |
The issue is resolved -- actually it was a wrong Kroki configuration on my side. I finally noticed that the default After composing and running both containers, diagrams finally appeared in the preview. Here is a services:
kroki:
image: yuzutech/kroki:latest
depends_on:
- mermaid
environment:
- KROKI_MERMAID_HOST=mermaid
ports:
- "8000:8000"
mermaid:
image: yuzutech/kroki-mermaid:latest
expose:
- "8002" |
Interesting, thanks you for continuing to investigate it. BTW, if the only diagrams you're using are Mermaid diagrams, the AsciiDoc plugin for IntelliJ includes an experimental support for Mermaid diagrams out of the box. I seems to works ok, although not all feature might work at the moment - see #1280. You can enable it in the plugin's settings. I'd be happy to hear your feedback about it. |
I need Mermaid only for gitGraph diagrams, other than that I prefer PlantUML. BTW, why is the plugin not attempt using the |
For PlantUML, you could use the embedded asciidoctor-diagram - this works well with the built-in Mermaid Diagrams. My previous comment was wrong. The current behavior is that one Kroki is enabled, a setting of |
Observed vs. expected behavior
An Asciidoc document includes a simple Mermaid diagram:
A local Kroki server is running on
http://localhost:8000
(in a Podman container). The server is independently (using a VS Code plugin) confirmed to be functional and producing the diagrams.The IDEA plugin is configured to use the Kroki server instead of a public server:
Expected: the diagram is shwon in the preview.
Observed: an
Error 503: Connection refused: /127.0.0.1:8002
string instead of a diagram:Environment
Plugin Version: 0.38.13
IntelliJ IDEA 2023.1.2 (Community Edition)
Build #IC-231.9011.34, built on May 15, 2023
Runtime version: 17.0.6+10-b829.9 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 750M
Cores: 16
Non-Bundled Plugins:
org.asciidoctor.intellij.asciidoc (0.38.13)
Kotlin: 231-1.8.21-IJ9011.34
P.S. Also, looks like the IdeaJ plugin does not respect
diagram-server-*
attributes defined in the.asciidoctotconfig.adoc
, probably should be a separate issue.The text was updated successfully, but these errors were encountered: