Closed wiselyman closed 9 years ago
Unless you added some custom logic to the HAProxy template file, the prefix given by the ACL rule defines the route your web service must adhere to. In your case, your service must be able to process requests to /app-group/test
, and I think you would then call the service as in
http://192.168.1.113:8000/app-group/test
@timoreimann
http://192.168.1.113:8000/app-group/test
also shows 404 page not found
my app is only cmd python -m SimpleHTTPServer $PORT
The default template using port 80. so it's likely to be at http://192.168.1.113/app-group/test
IIRC, Python's SimpleHTTPServer
just serves files off of the disk, so you might need to create /app-group/test/some_file.html
relative to where you start the HTTP server for it to return anything.
thanks @timoreimann I will try your opinion!
@timoreimann
I use an accessible empty tomcat using marathon with instance of 3,and everything are ok in marathon!
belove is api/state
{
"Apps": [
{
"Id": "/tomcat",
"EscapedId": "::tomcat",
"HealthCheckPath": "",
"Tasks": [
{
"Host": "192.168.1.113",
"Port": 31000
},
{
"Host": "192.168.1.115",
"Port": 31000
},
{
"Host": "192.168.1.114",
"Port": 31000
}
],
"ServicePort": 10000,
"Env": {}
}
],
"Services": {
"/tomcat": {
"Id": "/tomcat",
"Acl": "path_beg -i /app-group/tomcat"
}
}
}
And http://192.168.1.113:8000/app-group/tomcat
still shows 404 page not found
And http://192.168.1.113/app-group/tomcat
shows tomcat's 404,It may mean that tomcat can access,but can't show pages
Does your Tomcat instance actually serve something under the /app-group/tomcat
prefix? Can you hit it directly under the exposed IP address and port?
@timoreimann Thank you very much!I worked
at last ,How can you access your app?
I lanch docker image in one of my mesos slave
And I add a id: "test" with cmd
python -m SimpleHTTPServer $PORT
with scale of 4.And then I change the acl to
path_beg -i /app-group/test
belove is http://192.168.1.113:8000/api/state
and I open
http://192.168.1.113:8000/api/services//app-group/test
shows404 page not found
How can i access my app?