plantuml / plantuml-server

PlantUML Online Server
https://plantuml.com/
GNU General Public License v3.0
1.6k stars 463 forks source link

!include from URL not working with plantuml-server docker image #213

Closed aucampia closed 1 year ago

aucampia commented 2 years ago

The following puml source works fine with the official server:

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")

Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
http://www.plantuml.com/plantuml/uml/ZOvFIyGm4CNl-HIrfowupMLFdbQgjnKN_vnbcWxRm6GICXDalxtPWaKHnTDxCypxpTkBGjOIg1bsR_U40Ld5N7bsL2PiPjKaDzPcUEzFNkSo5i7i8YkozYu6cmZuaj-AJkH7E-osnylgzU5W0uXYjfKyr0HunjodUclC4RD4xj8Yj-H1hfls02DIMyrZKXyPgBb3STalKxinAwHpd-v7z0NTp97YwVm7wFaiYg6JHVxxtJmXVI-yjlWTyQNEnkoHfnBe0m00

However, when I try use it with plantuml server hosted locally from docker it does not work:

$ docker container run --detach -e ALLOW_PLANTUML_INCLUDE=true -p 127.0.0.1:27272:8080 --volume /etc/localtime:/etc/localtime:ro,z --name plantuml docker.io/plantuml/plantuml-server:jetty
$ curl -vvv http://127.0.0.1:27272/svg/ZOvFIyGm4CNl-HIrfowupMLFdbQgjnKN_vnbcWxRm6GICXDalxtPWaKHnTDxCypxpTkBGjOIg1bsR_U40Ld5N7bsL2PiPjKaDzPcUEzFNkSo5i7i8YkozYu6cmZuaj-AJkH7E-osnylgzU5W0uXYjfKyr0HunjodUclC4RD4xj8Yj-H1hfls02DIMyrZKXyPgBb3STalKxinAwHpd-v7z0NTp97YwVm7wFaiYg6JHVxxtJmXVI-yjlWTyQNEnkoHfnBe0m00
...
...Cannot open URL...
$ docker container logs -f plantuml
...
issue raw.githubusercontent.com java.util.concurrent.ExecutionException: java.net.UnknownHostException: raw.githubusercontent.com

I tried using the forum but the captcha thing is not working, there is space to enter some numbers but I have no idea what numbers to put there.

mblaschke-daimlertruck commented 1 year ago

try using -e PLANTUML_SECURITY_PROFILE="UNSECURE" -e ALLOW_PLANTUML_INCLUDE="true"

at least here it's working

aucampia commented 1 year ago

thanks @mblaschke-daimlertruck - I will try that next time, but this has not come up again for me, so I'm closing this issue.