Re: Multiple domian names one web site different content
There is another approach, which is what I use. I presume that you are using some kind of web programming language such as ASP, ColdFusion (which I use) or something like that. All (I believe) web servers maintain a list of CGI Variables, one of which is: SERVER_NAME Your server's fully qualified domain name (e.g. www.cgi101.com) ColdFusion and I presume others allow you access to this variable. I then wrote a little program which is set up as the home page for all sites on my server. This little program then accesses the SERVER_NAME that was called in the URL. If this variable is www.Site1.com control is transferred to the directory/home page for Site1. If it is www.Site2.com it goes to the directory/home page for Site 2. I have hosted as many as twenty two entirely separate sites using this technique. I presume that you don't want to have twenty two separate tomcat instances running on your server. John Matlock On Fri, Mar 4, 2016 at 2:55 PM, Jeffrey Janner wrote: > > -Original Message- > > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > > Sent: Friday, March 04, 2016 3:36 PM > > To: Tomcat Users List > > Subject: Re: Multiple domian names one web site different content > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Jose, > > > > On 3/4/16 3:46 PM, Jose MarĂa Zaragoza wrote: > > > Maybe my question does't have to do with current thread ( an > > > probably doesn't have any sense at all) but : > > > > > > would be possible to define "VirtualHost" according the destination > > > port ? I know that VirtualHost diferent domain name, but i want to > > > keep the same domain name and to define 2 connectors , listening on > > > 8080 and 8081 Requests to 8080 go to /webapps-app1 and requests to > > > 8081 go to /webapps-app2 > > > > > > is it possible in a only one Tomcat instance ? or I need to > > > configure 2 tomcat instances ? > > > > You would need to configure Tomcat to listen on two different > > interfaces (or two different ports as you have above), plus have those > > in separate s in Tomcat's configuration so their > > s wouldn't interfere. > > > > More trouble than it's worth IMO. > > > > - -chris > > Chris's approach is correct. That's the only way to separate > by . > If you are stuck with that approach for some reason, it's what you'd need > to do. But might as well have two separate tomcat instances. After all, > that is what setting up multiple configs is really accomplishing. > The only advantage this gives you is if you are tight on memory and need > to share the JVM's heap space between the webapp. (note: this only shares > the memory, neither has access to the other's objects.) > Used to do this for some smallish webapps on Windows, primarily to give > each webapp/host it's own connector set for 80/443 without having to do > dances around that default host stuff. > Nowadays, I'm on linux with a load-balancing front-end that can properly > serve the correct SSL certificate, so it's not so important. > > Jeff > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Can tomcat serve MPI (parallel) applications?
As I said earlier, it has been a long time since I worked with MPI (1991 to be exact) so I am not quite understanding your application or the software topology. Let me ask a few more questions. It seems you say that a request for processing comes in, the task it split among many hosts using MPI, probably with mpi_put and mpi-get to handle the communications between hosts. In this kind of system each host only works on one part of the problem, yet you say that the subsidiary host is to send the "final presentation" over the web, back to presumably whoever asked for the processing to be done, wherever in the world it is needed. If the subsidiary host is only working on part of the problem, how does it get the data results from how ever many other hosts are doing their part of the processing? If a single host can produce the results, what is MPI being used to do? Why not just send the request to the server that is going to process the data? Again going back over the years, the system I worked on had a front end machine that was sent the problem/application to be processed. It broke up the processing task to get more CPU power onto the problem. Then the results from the individual tasks were sent back to the front end which assembled the independent or intermediate results into the final presentation. The whole system was not connected to the web (1991 remember), but I see no reason that the front end machine couldn't take in requests from the web and then use the web to distribute these results for which Tomcat would work fine. But I don't understand why you would want to use Tomcat on each individual processing node. MPI communicators would seem to handle this internal communication better than trying to fit these communications onto some kind of intranet. I don't think I am helping you very much. John Matlock On Mon, Nov 30, 2015 at 2:25 AM, Stefan Mayr wrote: > Am 29.11.2015 um 19:24 schrieb Martijn Slouter: > >> Thanks for your reply, comments below: >> ... >> Any suggestion how I can accomplish the configuration, if I start >> tomcat with the MPI web application using "mpirun -n 2 java ..." so >> that only the first MPI process opens the tomcat communication ports, >> while all other MPI processes disable their communicators? >> >> As an alternative I can run the MPI application as a separate server >> (tested across 16 hosts already), and use tomcat as a (serial) client >> to this parallel server. The disadvantage is that huge amounts of data >> need to be processed another time instead of being served directly >> from the MPI application. >> >> > How does mpirun communicate to the started java process that it is the > first process? Maybe it is easier to write a wrapper that can decide which > tomcat configuration to use depending if this is your master process or > not. If you write this wrapper in java you could use an embedded tomcat or > jetty to startup a servlet container where needed. > > Regards, > >Stefan Mayr > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Can tomcat serve MPI (parallel) applications?
It has been a lot of years since I worked with MPI, but IIRC one "host" has to be the master (usually called mpirun or mpiexec) that distributes the tasks to the "dependent hosts" and then collects the processed results. If this is true, then using one machine as a dedicated front end makes sense to me. Are the dependent hosts connected to the master via a LAN (perhaps a Beowulf cluster) or all of them distributed and receiving/returning data over the web as well? If co-located, then a gigabit LAN can handle the com between hosts at fairly high speed. If this is not fast enough then you need to go to something faster (and more expensive) like the PCI-Express system from Dolphin. Going over the web for "huge amounts" of data is going to be limited to the bandwidth of the internet connection, i.e. much slower than a LAN. It may be possible to have the individual tasks sent to the processing hosts individually, but again, it seems to me that this is the function of the master host. Are the applications you run all using data from a single big collection of data like a database. Perhaps if widely distributed you could supply the data set to all the hosts using something like a backup/restore model. Then these copies of the data set could be transferred to the individual hosts using something like a flash drive or SD card. A briefcase full of these memory devices in a briefcase on an airplane has a hell of a lot of bandwidth, even though we've become more accustomed to just dumping everything on the net, when it comes to terabytes, petabytes, exabytes, zettabytes, or yottabytes of data, the web isn't the answer. If the whole thing has to come over the internet, would something like Linda or Rinda software help you? As I say, it has been many years since I worked with MPI and with the rate of change in this business, I may have it all wrong. I hope I'm being helpful rather than just cluttering up your mailbox. What MPI software are you using? Are the applications written primarily in FORTRAN with a mixture of other languages? Good Luck! John Matlock On Sun, Nov 29, 2015 at 10:24 AM, Martijn Slouter wrote: > Thanks for your reply, comments below: > > On Fri, Nov 27, 2015 at 10:15 AM, Konstantin Kolinko > wrote: > > What is your goal, your expectation of Tomcat? What these n instances > > should do that 1 instance cannot? > > They are running cpu-intensive calculations on distributed hosts > ("high perfomance computing"), so that all hosts share the CPU and RAM > requirements. Tomcat will allow interaction with the MPI application > through the internet. > > > Is is possible to start several Tomcats with the same CATALINA_BASE in > > parallel, but you have to > > ... > > A connector can be configured, reconfigured, started/stopped > > programmatically via JMX. > > Any suggestion how I can accomplish the configuration, if I start > tomcat with the MPI web application using "mpirun -n 2 java ..." so > that only the first MPI process opens the tomcat communication ports, > while all other MPI processes disable their communicators? > > As an alternative I can run the MPI application as a separate server > (tested across 16 hosts already), and use tomcat as a (serial) client > to this parallel server. The disadvantage is that huge amounts of data > need to be processed another time instead of being served directly > from the MPI application. > > Which solution do you suggest? > > Thank you > Martijn > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: ColdFusion10 custom mod_jk difference
Recommendation: Switch away from Adobe CF 10 to Railo (www.getrailo.org). On Tue, Apr 8, 2014 at 2:44 PM, Doug Strick wrote: > We're moving from ColdFusion8 to CF10 where I work and ran into a strange > issue. We tried using mod_jk-1.2.39 and it compiled fine. We were able to > get the communication working, but ran into strange errors like below. > Adobe provides their own customized version of mod_jk which appears to be > built from 1.2.32. When I compiled their version from the source they > provide our errors went away. I downloaded the source from here if > anyone's interested: > http://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration.html. > I'd like to avoid using their custom version as I don't know how it will > play if other non-ColdFusion based apps want to use AJP in the future. > Does anyone have any recommendations on how I might be able to figure out > what was changed? I'm not a developer so I don't know much at the code > level. > > > > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > ajp_send_request::jk_ajp_common.c (1713): (cfusion) request body to send 0 > - request body to resend 0 > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > ajp_connection_tcp_get_message::jk_ajp_common.c (1403): received from ajp13 > pos=0 len=14 max=65536 > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > ajp_connection_tcp_get_message::jk_ajp_common.c (1403): 0F 00 0A 2F > 69 6E 64 65 78 2E 68 74 6D 00 00 00 - .../index.htm > ... > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [error] > ajp_process_callback::jk_ajp_common.c (2071): Unknown AJP protocol code: 0F > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [info] > ajp_service::jk_ajp_common.c (2669): (cfusion) sending request to tomcat > failed (recoverable), because of server error (attempt=2) > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > jk_shutdown_socket::jk_connect.c (840): About to shutdown socket 25 [ > 172.16.113.55:49315 -> 10.9.49.245:51010] > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > jk_is_input_event::jk_connect.c (1287): timeout during poll on socket 25 [ > 172.16.113.55:49315 -> 10.9.49.245:51010] (timeout=2) > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > jk_shutdown_socket::jk_connect.c (922): Shutdown socket 25 [ > 172.16.113.55:49315 -> 10.9.49.245:51010] and read 23848 lingering bytes > in > 0 sec. > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [error] > ajp_service::jk_ajp_common.c (2689): (cfusion) connecting to tomcat failed. > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > ajp_reset_endpoint::jk_ajp_common.c (810): (cfusion) resetting endpoint > with socket -1 (socket shutdown) > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [debug] > ajp_done::jk_ajp_common.c (3140): recycling connection pool for worker > cfusion and socket -1 > [Fri Apr 04 15:22:49 2014] [9753:139964571830064] [info] > jk_handler::mod_jk.c (2806): Service error=-3 for worker=cfusion >
Re: Moving Tomcat to work externally.
You say: Remove the ROOT directory from Tomcat's webapps directory, replacing it with your webapp renamed to ROOT.war (or, if it's already an expanded .war file, put it in the ROOT directory under webapps). Do I understand that you are telling me to put the whole web application into the webapps/ROOT directory? That's a couple of hundred pages and several sub-directories just for the main application. And I have to move another half dozen applications to Tomcat as well. Further these are almost all dynamic pages, and I may be incorrect, but I've read that .war files can only contain static web pages. These are all in ColdFusion. Is my understanding incorrect, and somehow this can connect to Railo to handle the database interaction? You then ask: What URL did you try to use? -- www.books-on-line.com Where is the "other machine" located relative to the one Tomcat is running on? -- I'm in a room with the on-line server, the new server and a half dozen other machines. The on-line server is about six and a half inches from the new server. I used one of the other machines to browse to www.books-on-line.com. It was 8 or ten feet away. What port is specified in server.xml? -- 80 -- localhost:80 works, localhost:8080 doesn't. Is there a firewall blocking that port? -- There's a hole in the firewall to let page requests through to the on-line server. Be specific when reporting problems. -- I thought I had been. Register the DNS name for your server with your DNS providers. -- This site is about 17 years old with several million home page hits. I think it is registered. I asked and you answered: Did I do something stupid? -- Not terribly, other than not reading the real Tomcat doc before making changes. -- I've tried to read the real Tomcat doc without success. I've worked in a dozen or so languages, but the Java world is new to me and it uses a lot of jargon making trying to get anything out of it very difficult. On Wed, Jul 10, 2013 at 7:09 PM, Mark Eggers wrote: > On 7/10/2013 6:08 PM, Caldarale, Charles R wrote: > >> From: john Matlock [mailto:johndmatl...@gmail.com**] Subject: Moving >>> Tomcat to work externally. >>> >> >> Following instructions found in various places I added the >>> following to the server.xml file and restarted Tomcat: >>> >> >> If you followed something that said to put a element in >> server.xml, you need to stop going to those places and read the real >> Tomcat doc. >> >> > Sadly, the three documents I read concerning Railo and Tomcat all have > this same exact syntax. > > The rest of the instructions concerning integrating Tomcat and Railo are > pretty much on par with this. > > > >>> >> >> The above has no business being anywhere in a config file. >> >> >> docBase="C:\inetpub\wwwroot\" /> >>> www.books-on-line.org >>> www.books-on-line.net >>> >> >> Take out all of the above; none of it is needed or desirable. >> >> Remove the ROOT directory from Tomcat's webapps directory, replacing >> it with your webapp renamed to ROOT.war (or, if it's already an >> expanded .war file, put it in the ROOT directory under webapps). >> >> Chrome, Firefox and even tried IE from another machine -- all say >>> they can't connect. >>> >> >> What URL did you try to use? Where is the "other machine" located >> relative to the one Tomcat is running on? What port is specified in >> server.xml? Is there a firewall blocking that port? Be specific >> when reporting problems. >> >> Tomcat version: Whatever comes with Railo 4 >>> >> > It comes with some (undefined) version of Tomcat 7. > > > >> If you don't know what it is, remove it, and install a real one from >> tomcat.apache.org; otherwise, you're just shooting in the dark. >> >> Is there something else I'm supposed to do? >>> >> >> Register the DNS name for your server with your DNS providers. >> >> Did I do something stupid? >>> >> >> Not terribly, other than not reading the real Tomcat doc before >> making changes. >> >> - Chuck >> > > In the original author's defense, the railo documentation is . . . > unpleasant. > > Here's what I did to get it running quickly: > > 1. Download a copy of Tomcat from tomcat.apache.org > > Grab the zip file and unpack it somewhere. Right now you don't need to run > it as a service, nor do you need to even use the manager application. > > 2. Download the WAR file for railo > > I believe the current prod
Moving Tomcat to work externally.
I'm obviously new to Tomcat. Got it working fine on localhost, now trying to get it to deliver web pages to the outside world. Following instructions found in various places I added the following to the server.xml file and restarted Tomcat: www.books-on-line.org www.books-on-line.net Chrome, Firefox and even tried IE from another machine -- all say they can't connect. Tomcat version: Whatever comes with Railo 4 OS: Windows 7 - 64 bit Computer: HP DL385 The docBase is the same as with localhost which works. I've tried changing the host "name" to www.books-on-line.com - same result. I've set the IP address to match the IP address for our online server and simply moved the cable from the online server (which works using XP and IIS) to the HP machine. Is there something else I'm supposed to do? Did I do something stupid? John