I'm trying to use WGLMakie on a Pluto.jl server. Any news on this: MakieOrg/Makie.jl#489 ? The evaluation of the plotting cell never stops
59 replies
Hm, that's likely because the port is already in use
JSServe.JSSERVE_CONFIGURATION.listen_port[] = 8493
try something like that
sorry for the naive question but inside the pluto notebook one cell with your line of code?
Yeah, must be run before displaying any plot to change the port of the server that serves the WGLMakie plots
Screenshot_20201228_154525.png
not the desired output but at least progress!
Ah yeah, if it's ssh I guess you'll need to forward that port
I'm not sure if its really ssh. I have a server with a static ip adress. On this server is jupyter hub installed which spawns a server for my users. In the jupyterlab environment they have a pluto.jl button which again spawns a pluto server by this: https://github.com/barche/pluto-on-binder/blob/logo/plutoserver/__init__.py#L7
sorry for the super niche question but I want to show students plots of finite element computations
Ah, I think I know a fix
image.png
This works on the branch: SimonDanisch/Bonito.jl#82
Maybe we can have one function to set this more easily?
wait a sec I'll give it a shot on my server
grafik.png
I have no idea about web but maybe this try wasn't that dumb: the server sits in the university network and only a few ports are accessible with a vpn connection, so I tried one where I'm sure that it's open, but same problem.
Did you checkout that branch?
[824d6782] JSServe v1.0.1 `https://github.com/SimonDanisch/JSServe.jl.git#sd/on_server`
before that external_url[]
wasn't there to configure
so there should be an error if I'd use master
Can you inspect the frame with the browser that shows no connection
?
Btw, how is pluto setup?
There doesn't seem to be a port in the URL you're using to browse to the Pluto site
I'm guessing that may be the problem
Pluto is set up by this line: https://github.com/barche/pluto-on-binder/blob/logo/plutoserver/__init__.py#L7which gets magically the port of the jupyter server which is the default 80
such that it is invisible for the students
and this indeed coincides with the expected behavior of JSServe if I set the port to 80. With this I can reproduce the never ending cell evaluation
this is what I see in the inspector
Screenshot_20201228_201346.png
Ah that's the content of it, I want to see the url in the iframe
ah sorry!
grafik.png
That looks good ;) I suppose, if you browse that same iframe url you get the same connection error?
yep
Could it be that only port 80 is forwarded?
and anything else will be blocked?
I thought that at least 3389 should be forwarded by default, but maybe that was last time just by chance, let me check if I can get a list of forwarded ports
ah, but then you need to set the JSServe port to 3389
ye, tried that already, but maybe 3389 was only by chance last time
anyhow: do I need for every user an own port?
no
ok so just one for all users?
oh wait... how does that even work with multiple users
Pluto or jupyter?
Pfew, so Pluto is running on the server and starts julia processes on the server - which then start a JSServe Server ... So I guess every user does need to have it's own port -.- (edited)
I guess to make this use case real nice, we do need a proper Pluto integration after all...
Which uses the file server & websocket connection from the pluto server
image.png
theres no emoji to react which laughs and cries at the same time
I wonder if we could quickly hack a "server mode" where all users connect to a single instance of JSServe to get the graphics... So on the server you'd do:
using JSServe
JSServer.start_server()
using Pluto
Pluto.run()
And then all users would just use that one JSServe Server
So on the client side it would be something like:
using JSServe
JSServe.use_existing_server(url)
I'll think about it tomorrow
I also contacted my colleague, who is the sys admin of our chair and has a solid background in web dev
Sweet! I hope we can make this work
There is definitely some way to make this work The question is, how can we make it work with the limited time constraints^^
could be that I just fucked up something. I'd love to say: hey nice case to contribute FOSS but I'm simply to dumb
but the JSServe idea already before Pluto doesn't sound bad, for this I just have to reinstall the jupyter "plugin" which is the pluto button. I'm not certain how long the messages will be saved here since I'm only using slack for makie questions. Do you think we can continue to chat here the next days or will it disappear to fast? (edited)
I think julia actually got upgraded recently So they may not disappear anymore
There isn't much in this thread anyways...So just DM me or open an issue
Join Channel