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

Error 400 when using local server #6

Open
francislavoie opened this issue Jul 26, 2018 · 3 comments
Open

Error 400 when using local server #6

francislavoie opened this issue Jul 26, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@francislavoie
Copy link

15:51:21:038.284302 1.48e+02 - PlantUmlDiagrams.diagram.plantuml.generate:101 - Failed to connect to the server: HTTP Error 400: Bad Request (http://localhost:8181/) Falling back to local rendering...

Ran it with docker like this: docker run --rm -p 8181:8080 plantuml/plantuml-server:jetty

Still getting the TypeError from #2 but I don't think it's relevant here.

@evandrocoan
Copy link
Owner

evandrocoan commented Jul 26, 2018

Sorry, I never had used docker. I just tested with my local server and worked.

I looked into their page and I saw this:

docker run -d -p 8080:8080 plantuml/plantuml-server:jetty

I do not know what are these 8080:8080, perhaps you can try to use 8181:8181 instead of 8181:8080, or just use 8080:8080 and set the local URL on your .sublime-settings to:

    "plantuml_server": "http://localhost:8080/plantuml/"

Or:

    "plantuml_server": "http://localhost:8181/plantuml/"

Or:

    "plantuml_server": "http://localhost:8080/"

Or:

    "plantuml_server": "http://localhost:8181/"

@evandrocoan evandrocoan added the help wanted Extra attention is needed label Jul 26, 2018
@francislavoie
Copy link
Author

francislavoie commented Jul 26, 2018

So in Docker, -p 8181:8080 means bind to port 8181 on the host machine and map it to 8080 in the container. I did this because I'm using 8080 for other stuff already. Very sure that's not the issue.

I'm thinking it might be an issue because I use an !include ../theme.puml?

@francislavoie
Copy link
Author

Ah, yep, that's the issue. That's a bummer.

Got this error in the docker logs. Didn't look there before.

Preprocessor Error: Cannot include /var/lib/jetty/./../theme.puml
Preprocessor Error: Cannot include /var/lib/theme.puml

Idea - this lib could parse the file for an include and just copy the contents of that file in before sending it to the server? That would be great 😄

@evandrocoan evandrocoan added enhancement New feature or request and removed help wanted Extra attention is needed labels Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants