Replies: 13 comments 9 replies
-
That behavior is expected because you never started a session. Also that websocket endpoint is wrong for a mulit-user/docker setup. |
Beta Was this translation helpful? Give feedback.
-
Hi Sébastien,
Thank you for your response.
Currently I am evaluating Trame for a particular biomedical research
project for a centre at the Indian Institute of Technology, Bombay.
The project is not funded at the moment and we are attempting to create a
MVP that we can then use to get funds / grants. Therefore while at the
moment we will not be able to engage with Kitware commercially I do see
such a synergy possible in the future since the overall project vision is
very substantial.
I understand your difficulty in covering all of this well enough for a
trame novice to grasp here, however if you could give me any pointers,
examples and resources rhen I would greatly appreciate it. It would be
great if we could use Trame for this Work since I really like what I have
seen of it thus far.
Thank you again.
Regards,
Jeetu
…On Wed, 15 May, 2024, 00:56 Sebastien Jourdain (Kitware), < ***@***.***> wrote:
That behavior is expected because you never started a session. Also that
websocket endpoint is wrong for a mulit-user/docker setup.
But guiding you through a discussion will be tricky, there will be too
much to cover. You can obviously go through the documentation of the
launcher to understand the principle but it might be easier to just grab a
small support with Kitware and then we can walk you through how you can
leverage trame in your specific setup.
—
Reply to this email directly, view it on GitHub
<#523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNNFZFDD2WUIE7NMYATZCJQNXAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIMZXG43TS>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Sebastien,
Thank you for the pointers and the documents. I shall attempt to follow
suit with what you have suggested.
I would appreciate a few clarifications below :
<quote>
As a first step, I would just drop your react app into /setup/www so it can
be bundled with the regular trame docker step.
Then make sure your wslink config for setting up the connection only has
{application: 'trame'}.
</unquote>
Do I need to do this even if I want my frontend application to be hosted on
a different server as the Trame server?
Instead of a react app I am looking to create a vanilla js app. For this
MVP we would like to use Webflow as the frontend with JS code that connects
to the backend. The reason for this is simply since we have in-house
Webflow frontend experience instead of React / Vue
Thank you.
Regards,
Jeetu
…On Wed, 15 May, 2024, 01:26 Sebastien Jourdain (Kitware), < ***@***.***> wrote:
But you can look at that one
<https://kitware.github.io/paraviewweb/docs/multi_user_setup.html> along
with a couple of others on that same website.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNJK77YBPVAGQ3IYG3LZCJT5ZAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIMZYGAZDQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you want to host your react/plain-js app somewhere else, it will be
more complicated and will require more knowledge of the setup which will be
very hard/impossible to go over in a discussion like that. But if you
bundle it with docker (for now as MVP), it will be simple.
Thank you so much Sebartien for the advice and help.
I am attempting to package the react app found in the vtk-web-solutions
example into my docker container like you suggested.
I am running into the following error as seen in the console log :
index-e639b0b0.js:44 POST http://localhost:8080/paraview/ 400 (Bad
Request)
I guess I need to understand the architecture and the setup documents and
configs in the link provided by you to understand all of this a lot better.
Thank you again for everything.
Regards,
Jeetu
…On Wed, May 15, 2024 at 7:54 PM Sebastien Jourdain (Kitware) < ***@***.***> wrote:
If you want to host your react/plain-js app somewhere else, it will be
more complicated and will require more knowledge of the setup which will be
very hard/impossible to go over in a discussion like that. But if you
bundle it with docker (for now as MVP), it will be simple.
But since you have the pieces of info in docs and code examples. You
should be able to do your own integration the way you aim to.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNJ5GN6W7C5IJ3JYQFTZCNV2LAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINBWG42TO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes I have changed my connect call to { application: 'trame' } however that
error persists. I also see the following in my terminal where I run
./scrips/run_image.sh
ERROR: Launch request is missing application key.
…On Wed, May 15, 2024 at 11:52 PM Sebastien Jourdain (Kitware) < ***@***.***> wrote:
If you are using the trame based image, that POST
http://localhost:8080/paraview/ should have worked if you changed the
connect call to have the { application: 'trame' }. Assuming your trame
app is also properly configured within docker.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNKTIJNHMMUGHECM3QTZCORVTAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINBZGQYDK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I understand Sebastien and I am sorry for the trouble.
I shall read the docs closely and attempt to debug some more this looking
at the link you gave earlier and code / config samples therein.
Failing that I shall put up the code sample and share it with you and seek
your help further.
Thank you for your time and I appreciate your help.
Regards,
Jeetu
…On Thu, 16 May, 2024, 01:04 Sebastien Jourdain (Kitware), < ***@***.***> wrote:
Launch request is missing application key. See my comment on the config
which has an application key...
Without code example showing what you did compare to what I told you to
do, I can't help except by just repeating myself.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNOSANV6WUJ6U6W5C7DZCO2CVAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINBZHEZTI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Sebastien,
I am facing a problem where I keep getting a 404 not found error when the
client attempts to connect to the trame server as part of the
sessionManagerURL key.
I first deployed my Trame server as a container onto AWS lightsail and my
JS client as a S3 static site and was seeing the following errors :
POST http://[AWS-trame-server-host]/paraview 404 (Not Found)
WebSocket connection to 'ws://[S3-frontend-client-host]/ws' failed:
* I realize that the ws URL is taking the [S3-frontend-client-host] host
instead of the remote [AWS-trame-server-host]. You had suggested I use a
configDecorator for this but I am not sure what I should be doing. The
configDecorator for the react-client code as part of the simple-server
example of vtk-web-solutions project (
https://github.com/Kitware/vtk-web-solutions/) checks if the sessionURL is
defined but for us from what I understand the sessionManagerURL will return
the sessionURL.
Anyway, I decided to first tackle the 404 error on the /paraview endpoint
thinking that this may get the correct sessionURL or at least I would then
progress.
I figured the above maybe because AWS lightsail was redirecting http
traffic to https and the trame server wasn't configured for https and this
maybe causing an issue. I wasn't sure but to test this theory out I went on
to deploy two docker containers on my local system. One with the trame
server and the other with the client. Both containers can ping into each
other and can also get http content from each other.
The config for my frontend now has the following :
const config = {
application: 'trame',
sessionManagerURL: 'http://172.17.0.2/paraview',
};
I still get the 404 not found error on the /paraview endpoint.
If I log into the container with the trame server and attempt to access
http://localhost:9000/paraview, I get a 404.
I am sure it's something in my understanding, would appreciate if you could
shed light on how I can resolve this.
Thank you.
Regards,
Jeetu
…On Fri, May 17, 2024 at 8:59 PM Sebastien Jourdain (Kitware) < ***@***.***> wrote:
Now that you have that part working when the JS execute from another host,
you should be able to use a config like
{
application: "trame",
sessionManagerURL: "https://trame-server/paraview",
}
Then you may need to add a configDecorator to properly process the
USE_HOST placeholder so it does not pickup your Webflow server but the
trame-server instead.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNOASV346EEVZUG37KDZCYO47AVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINZSGI3DE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Add a / at the end of paraview.
…On Sun, May 19, 2024 at 14:29 Jeetu Golani ***@***.***> wrote:
Hi Sebastien,
I am facing a problem where I keep getting a 404 not found error when the
client attempts to connect to the trame server as part of the
sessionManagerURL key.
I first deployed my Trame server as a container onto AWS lightsail and my
JS client as a S3 static site and was seeing the following errors :
POST http://[AWS-trame-server-host]/paraview 404 (Not Found)
WebSocket connection to 'ws://[S3-frontend-client-host]/ws' failed:
* I realize that the ws URL is taking the [S3-frontend-client-host] host
instead of the remote [AWS-trame-server-host]. You had suggested I use a
configDecorator for this but I am not sure what I should be doing. The
configDecorator for the react-client code as part of the simple-server
example of vtk-web-solutions project (
https://github.com/Kitware/vtk-web-solutions/) checks if the sessionURL
is
defined but for us from what I understand the sessionManagerURL will
return
the sessionURL.
Anyway, I decided to first tackle the 404 error on the /paraview endpoint
thinking that this may get the correct sessionURL or at least I would then
progress.
I figured the above maybe because AWS lightsail was redirecting http
traffic to https and the trame server wasn't configured for https and this
maybe causing an issue. I wasn't sure but to test this theory out I went
on
to deploy two docker containers on my local system. One with the trame
server and the other with the client. Both containers can ping into each
other and can also get http content from each other.
The config for my frontend now has the following :
const config = {
application: 'trame',
sessionManagerURL: 'http://172.17.0.2/paraview',
};
I still get the 404 not found error on the /paraview endpoint.
If I log into the container with the trame server and attempt to access
http://localhost:9000/paraview, I get a 404.
I am sure it's something in my understanding, would appreciate if you
could
shed light on how I can resolve this.
Thank you.
Regards,
Jeetu
On Fri, May 17, 2024 at 8:59 PM Sebastien Jourdain (Kitware) <
***@***.***> wrote:
> Now that you have that part working when the JS execute from another
host,
> you should be able to use a config like
>
> {
> application: "trame",
> sessionManagerURL: "https://trame-server/paraview",
> }
>
> Then you may need to add a configDecorator to properly process the
> USE_HOST placeholder so it does not pickup your Webflow server but the
> trame-server instead.
>
> —
> Reply to this email directly, view it on GitHub
> <
#523 (reply in thread)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAATXNOASV346EEVZUG37KDZCYO47AVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINZSGI3DE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACH45WQRRDWPX4HESN7QKLZDEDTJAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJQGE3TM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
And it worked :) thank you so much Sebastien.
For the sake of anyone else who comes across this thread, once I added a /
and the end of paraview and moved past this 404, I received back the
sessionURL and seeing this I was able to understand how to have a
configDecorator so that the USE_HOST get's replaced with the remote
hostname instead of the server on which the JS client is hosted. This is
exactly what Sebastien has guided me towards previously in this thread.
So it works now but since my Trame server is hosted headless on AWS
Lightsail, I am using vtk-osmesa and therefore the performance isn't great
even for the simple cone example. AWS Lightsail also does not have a GPU
instance. So my next step will be to host all of this on an EC2 instance
with GPU. I remember reading somewhere that I will need to use VTK with
EGL. Will need to see from where I can get this version of VTK. And then I
think I will need to configure docker to access the GPU appropriately. Not
sure if anything else is needed. I will post here for the sake of anyone
else who stumbles upon this.
Once again Sebastien, I want to thank you. I see you posting to pretty much
every query on this forum and that makes this forum such a wealth of
information. It's really fantastic. Sincerely appreciate it :)
Regards,
Jeetu
On Mon, May 20, 2024 at 2:16 AM Sebastien Jourdain (Kitware) <
***@***.***> wrote:
… Add a / at the end of paraview.
On Sun, May 19, 2024 at 14:29 Jeetu Golani ***@***.***> wrote:
> Hi Sebastien,
>
> I am facing a problem where I keep getting a 404 not found error when
the
> client attempts to connect to the trame server as part of the
> sessionManagerURL key.
>
> I first deployed my Trame server as a container onto AWS lightsail and
my
> JS client as a S3 static site and was seeing the following errors :
>
> POST http://[AWS-trame-server-host]/paraview 404 (Not Found)
> WebSocket connection to 'ws://[S3-frontend-client-host]/ws' failed:
>
> * I realize that the ws URL is taking the [S3-frontend-client-host] host
> instead of the remote [AWS-trame-server-host]. You had suggested I use a
> configDecorator for this but I am not sure what I should be doing. The
> configDecorator for the react-client code as part of the simple-server
> example of vtk-web-solutions project (
> https://github.com/Kitware/vtk-web-solutions/) checks if the sessionURL
> is
> defined but for us from what I understand the sessionManagerURL will
> return
> the sessionURL.
>
> Anyway, I decided to first tackle the 404 error on the /paraview
endpoint
> thinking that this may get the correct sessionURL or at least I would
then
> progress.
>
> I figured the above maybe because AWS lightsail was redirecting http
> traffic to https and the trame server wasn't configured for https and
this
> maybe causing an issue. I wasn't sure but to test this theory out I went
> on
> to deploy two docker containers on my local system. One with the trame
> server and the other with the client. Both containers can ping into each
> other and can also get http content from each other.
>
> The config for my frontend now has the following :
>
> const config = {
> application: 'trame',
> sessionManagerURL: 'http://172.17.0.2/paraview',
> };
>
> I still get the 404 not found error on the /paraview endpoint.
>
> If I log into the container with the trame server and attempt to access
> http://localhost:9000/paraview, I get a 404.
>
> I am sure it's something in my understanding, would appreciate if you
> could
> shed light on how I can resolve this.
>
> Thank you.
>
> Regards,
> Jeetu
>
> On Fri, May 17, 2024 at 8:59 PM Sebastien Jourdain (Kitware) <
> ***@***.***> wrote:
>
> > Now that you have that part working when the JS execute from another
> host,
> > you should be able to use a config like
> >
> > {
> > application: "trame",
> > sessionManagerURL: "https://trame-server/paraview",
> > }
> >
> > Then you may need to add a configDecorator to properly process the
> > USE_HOST placeholder so it does not pickup your Webflow server but the
> > trame-server instead.
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <
>
#523 (reply in thread)>,
>
> > or unsubscribe
> > <
>
https://github.com/notifications/unsubscribe-auth/AAATXNOASV346EEVZUG37KDZCYO47AVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TINZSGI3DE>
>
> > .
> > You are receiving this because you authored the thread.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <
#523 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AACH45WQRRDWPX4HESN7QKLZDEDTJAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJQGE3TM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNIBVEJKJH4SYYVEWMTZDEFSJAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJQGI2DK>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
For vtk-egl see this requirements but replace Also make sure you do not have a regular vtk previously installed.
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much Sebastien :) will give this a go. Appreciate it :)
Regards,
Jeetu
…On Mon, 20 May, 2024, 21:00 Sebastien Jourdain (Kitware), < ***@***.***> wrote:
For vtk-egl see this requirements
<https://github.com/Kitware/trame/blob/master/examples/deploy/docker/VtkRendering/setup/requirements.txt>
but replace vtk-osmesa by vtk-egl.
Also make sure you do not have a regular vtk previously installed.
pip uninstall vtk vtk-osmesa
pip install vtk-egl --extra-index-url https://wheels.vtk.org
—
Reply to this email directly, view it on GitHub
<#523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNJRJYRB4BEW24OH5FDZDIJK7AVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJYGAZDS>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
And I now have the Trame server for my application working in a docker
container running on a AWS EC2 instance with GPU (gs4dn.xlarge instance
type) based on the guidance given by Sebastien (thank you :) ). I have EGL
working in the container. My frontend is being hosted separately from the
trame server and remote rendering works really well :)
For the sake of anyone who follows this thread, I would like to point out
what I needed to do to get EGL working in the container and able to access
the GPU. The section on EGL caution at
https://kitware.github.io/trame/guide/deployment/docker.html came in very
handy to me.
However, I needed to include the -e NVIDIA_DRIVER_CAPABILITIES=all, without
which EGL wasn't fully accessing the GPU and I was seeing a slight
unresponsiveness.
Therefore, the command in the document is :
docker run --gpus all -it nvidia/opengl:1.0-glvnd-runtime
What I needed to do was :
docker run --gpus all -e NVIDIA_DRIVER_CAPABILITIES=all -it
nvidia/opengl:1.0-glvnd-runtime
Now, currently I have Apache in the trame container listening on port 80
(http). I would the trame container to work with https / wss.
I came across this thread on the forum that discusses configuring trame /
apache for https / wss - #334
The one thing I am not sure of there is the apache config the OP has
mentioned in his final solution still has <VirtualHost *:80> shouldn't
this be 443?
Once again Sebastien, thank you. Trame is beautiful and you have made this
journey of learning it so much more pleasurable. Appreciate all of your
help :)
Regards,
Jeetu
On Mon, May 20, 2024 at 9:02 PM ***@***.*** <
***@***.***> wrote:
… Thank you so much Sebastien :) will give this a go. Appreciate it :)
Regards,
Jeetu
On Mon, 20 May, 2024, 21:00 Sebastien Jourdain (Kitware), <
***@***.***> wrote:
> For vtk-egl see this requirements
> <https://github.com/Kitware/trame/blob/master/examples/deploy/docker/VtkRendering/setup/requirements.txt>
> but replace vtk-osmesa by vtk-egl.
>
> Also make sure you do not have a regular vtk previously installed.
>
> pip uninstall vtk vtk-osmesa
> pip install vtk-egl --extra-index-url https://wheels.vtk.org
>
> —
> Reply to this email directly, view it on GitHub
> <#523 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAATXNJRJYRB4BEW24OH5FDZDIJK7AVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TIOJYGAZDS>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
For the sake of anyone who stumbles across this thread, I managed to
configure the trame docker container to work with a self-signed SSL
certificate. I have managed to deploy this on a EC2 instance with GPU
(gs4dn.xlarge instance type) and configured my instance and docker so the
GPU is available inside the docker and works with EGL. I am using vtk-egl.
On the frontend I have got a vanilla JS client that talks to our trame
server using the wslink library.
Should someone have an interest in this then please ping me and I can
probably document these steps and create a sample.
Thank you very much Sebastien for all of your help and your patient
guidance. Appreciate it :)
Regards,
Jeetu
…On Sun, May 26, 2024 at 8:45 PM Sebastien Jourdain (Kitware) < ***@***.***> wrote:
Correct it should be 443. And on the 80 you could setup a redirect to 443.
—
Reply to this email directly, view it on GitHub
<#523 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATXNI3DGTVOK76X4BEXZTZEH4BPAVCNFSM6AAAAABHWYRQKSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TKNRSGEZDM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I would like to use Trame as the server with a separate vanilla JS frontend client. I would like both the server and client to be hosted separately as well. The client would need to create a Websocket connection to the server.
I came across mention from @jourdain in another thread of the example https://github.com/Kitware/vtk-web-solutions where you have a react and vue client with a backend trame server.
Taking the above as a basis, I have converted the code from React / Vue as a frontend to vanilla JS. I have used the trame-cookiecutter to create the trame server and the docker images for these.
I have deployed the docker server onto AWS Lightsail and I have hosted the client on S3 to test all of this out.
My JS client attempts to create a Websocket link to the server and when it does that it fails with the following in my console log in the browser :
WebSocket connection to 'ws://[path to my container public endpoint]/ws' failed:
I am very new to Trame and probably need to do something to enable websocket forwarding in the docker image and / or open up some ports - currently my container is listening in only on port 80.
Would appreciate help on how I could go about debugging this.
Thank you for your time.
Thank you.
Regards,
Jeetu
Beta Was this translation helpful? Give feedback.
All reactions