Open ronaldd2 opened 9 months ago
Hi @ronaldd2,
Could you please provide an example what (and how) you try to render and result in the error?
I tried to test the latest jetty version but can not reproduce any error.
docker run -d --pull always -p 8080:8080 --name plantuml plantuml/plantuml-server:jetty
docker logs -f plantuml
$\rightarrow$ http://localhost:8080
What is not working for you? Does the docker log show any errors? Could you provide a small code snippet? For example the following code snippet (take from the documentation) is working for me normally:
@startuml
!include <C4/C4_Container>
Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")
System_Ext(extSystemAlias, "Label", "Optional Description")
Rel(personAlias, containerAlias, "Label", "Optional Technology")
Rel_U(systemAlias, extSystemAlias, "Label", "Optional Technology")
@enduml
What does the following Code return on your end?
@startuml
version
@enduml
@startuml
testdot
@enduml
@HeinrichAD This is weird, when I enter your simple command on the website of our server it renders correctly. However when I'm using Visual studio code with the Plantuml plugin from jebbs I get the error again. Inside the plugin I configured to use our own server and the problem solves when I make a link to dot on our server. The testdot doesn't work at all in VSC
@ronaldd2 again, I tried the vscode extension jebbs.plantuml
and got no problems.
I could also render the version and testdot diagram.
Could you please check the following extension settings:
plantuml.server
has the correct URL to your own plantuml server (e.g. http://localhost:8080)plantuml.render
is set to PlantUMLServer
(to ensure that not the local plantuml instance but the server is used)You can also check if the server really is rendering the diagram. To do that, just look into the plantuml log
# note that `-f` is important here
docker logs -f <docker-conainer-id-or-name>
and see if rendering the following code snippet shows [Log] Hello World
:
@startuml
!log Hello World
@enduml
If [Log] Hello World
does not appear inside the terminal/docker log, you know that you are not using the plantuml server, but most likely rendering your diagram locally. In this case check your extension settings again.
@HeinrichAD I double checked it already and when making the hardlink in the docker image the problem is solved. So i'm not running it locally. This is what I see in the docker log without the hardlink:
java.io.IOException: Cannot run program "/usr/bin/dot": error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.Runtime.exec(Unknown Source)
at net.sourceforge.plantuml.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:165)
...
@arnaudroques Since you changed the dot file location code and some other Graphviz stuff not too long ago.
(E.g. here: https://github.com/plantuml/plantuml/commit/63a09e2#diff-db4f5f51af6438174c994a13261270758f10c643252eb1ab56840332184f0aee)
Do you have an idea why /usr/bin/dot
instead of /usr/local/bin/dot
is tried to use?
I mean the simplest solution is like @ronaldd2 already stated in the original issue text to create a hard link. But maybe we could try to find the root of this problem since this solution is only valid for the PlantUML Server. (To be more specific only for the docker versions of PlantUML Server.)
Describe the bug When rendering a C4 model an error is shown Dot executable does not exist. Cannot find Graphviz
The expected location is /usr/bin/dot but the actual location is /usr/local/bin/dot
Expected behavior Correct rendering without error
Screenshots![Screenshot 2023-09-21 094456](https://github.com/plantuml/plantuml-server/assets/88076729/e5c4f6ed-22ca-4ba6-b46e-6c30cceff3b2)
Server
Work around Made a hard link in the local docker image so dot can be found in /user/bin/