Please explain what you’ve done not just what you see.
Like before I created a trame template application using CookieCutter and chosen App with Components
. Then I build the vue-components
as mentioned in README. They built successfully. Next I built the docker scripts for server i.e. build_server.sh
. Next I ran it using run_server.sh
. In that I was getting that timeout error. So as per your suggestion
I added trame part in my apps.yml
file. I rebuilt the server directory and ran the application again following same steps. This time I was able to view cone example in browser on the host machine on url http://localhost:8080/volume-viewer.html
. I tried accessing same from another machine using url http://192.168.60.177:8080/volume-viewer.html
. 192.168.60.177
is the IP of host machine on which docker is deployed. On accessing this URL I got the error that I shared.
Original apps.yml
PyWebVue: # Default app under /index.html
app: volume-viewer
volume-viewer: # /volume-viewer.html
app: volume-viewer
Modified apps.yml
file content
PyWebVue: # Default app under /index.html
app: volume-viewer
volume-viewer: # /volume-viewer.html
app: volume-viewer
trame:
www_modules:
- volume_viewer.module
app: volume_viewer
Only saw some error in launcherLog.log
which I also share in previous post.
So you are connecting remotely to the same docker process that you started from run_server.sh
? And when the request for starting the trame app is coming from a different host, the same command line within the docker image is failing? What is the content of that failing session log?
Yes I’m accessing same docker process from different machine on same network. I can access it from local host machine but not from remote machine. Session log file is generated but it’s blank.
I don’t understand why the exact same command line within docker works (for local requests) and fails (for remote requests) unless there is a difference that I’m not aware of.
So, is the following correct:
- from the host:
- from another host:
- http://172.17.0.2:8080/volume-viewer.html => does not work
The situation is as follows:
- from the host:
- http://locahost:8080/volume-viewer.html => works
- http://172.17.0.2:8080/volume-viewer.html => Does not works
- http://192.168.60.177:8080/volume-viewer.html => Does not works
- from another host:
- http://172.17.0.2:8080/volume-viewer.html => Does not works
- http://192.168.60.177:8080/volume-viewer.html => Does not works
Where 192.168.60.177 is the IP of host machine on which docker is deployed.
And by “Does not work”, you mean that you get the exact same error “The process did not properly start” or do you get some other kind of error (like not able to reach the docker endpoint)?
Also what about:
- os: Windows / Linux / Mac
- app: The untouched one from cookiecutter [ ] yes / [ ] no
- network: firewall, open port, ?
Here are error details
-
from the host (Cent OS 7):
- http://locahost:8080/volume-viewer.html => works
- http://172.17.0.2:8080/volume-viewer.html => Unable to connect
- http://192.168.60.177:8080/volume-viewer.html => Error process didn’t start properly
-
from another host (Windows 10):
- http://172.17.0.2:8080/volume-viewer.html => Unable to connect
- http://192.168.60.177:8080/volume-viewer.html => Error process didn’t start properly
-
172.17.0.2 IP is automatically assigned to docker virtual interface
docker0
created with docker installation. Network IP of the host is 192.168.60.177 and that of remote machine is 192.168.60.217.
Further details:
- os: Windows (Remote machine) / Linux (Docker Host)
- app: The untouched one from cookiecutter - yes
- network: - 8080 port allowed in firewall of docker host machine
Can you post the generated file inside ./bundles/docker/server/launcher.conf
?
There’s a file launcher.json
whose content is as below:
{
"configuration": {
"host": "0.0.0.0",
"port": 9000,
"endpoint": "paraview",
"log_dir": "/deploy/server/logs/launcher",
"proxy_file": "/opt/trame/proxy-mapping.txt",
"sessionURL": "ws://USE_HOST/proxy?sessionId=${id}&path=ws",
"timeout": 25,
"sanitize": {},
"fields": []
},
"resources": [
{
"host": "0.0.0.0",
"port_range": [
9001,
9500
]
}
],
"properties": {},
"apps": {
"PyWebVue": {
"cmd": [
"volume-viewer",
"--host",
"${host}",
"--port",
"${port}",
"--authKey",
"${secret}",
"--server"
],
"ready_line": "App running at"
},
"volume-viewer": {
"cmd": [
"volume-viewer",
"--host",
"${host}",
"--port",
"${port}",
"--authKey",
"${secret}",
"--server"
],
"ready_line": "App running at"
},
"trame": {
"cmd": [
"volume_viewer",
"--host",
"${host}",
"--port",
"${port}",
"--authKey",
"${secret}",
"--server"
],
"ready_line": "App running at"
}
}
}
Great, I think I know why it is not working.
Are you sure you are adding volume-viewer.html
at the end of all URLs?
If so, you have a caching issue on your local machine as it should not work either. (just a browser thing)
The way to fix that and have http://192.168.60.177:8080/
to work is by replacing
"trame": {
"cmd": [
"volume_viewer",
by
"trame": {
"cmd": [
"volume-viewer",
This is driven by the ./setup/apps.yaml
that you modified by using a _
instead of a -
.
docker pull kitware/trame
cookiecutter gh:Kitware/trame-cookiecutter
You've downloaded /Users/sebastien.jourdain/.cookiecutters/trame-cookiecutter before. Is it okay to delete and re-download it? [yes]:
project_name [Trame App]:
Select project_type:
1 - App
2 - App with Components
3 - Components
Choose from 1, 2, 3 [1]: 2
author [Trame Developer]:
short_description [An example Trame application]:
Select license:
1 - BSD License
2 - MIT License
3 - ISC License (ISCL)
4 - Apache Software License
5 - GNU General Public License v3 (GPLv3)
6 - Other
Choose from 1, 2, 3, 4, 5, 6 [1]:
include_continuous_integration [y]:
package_name [trame-app]:
import_name [trame_app]:
cd trame-app/vue-components
npm i
npm run build
cd ../bundles/docker
./scripts/build_server.sh
./scripts/run_server.sh
Then connecting with my external IP.
Then for the network flow and content validation
And response from launcher
Thanks @Sebastien_Jourdain. My bad . While updating apps.yml
I used _
as app name was given like that only. Didn’t noticed other fields had -
in it. It worked after making that changes. Thanks for your support.
Will now try converting my existing trame application into docker deployable format.
Glad it is working. Usually we use - for executable name and package name but in Python the import path can only have _ and that is why we have some difference.