Jira, Tomcat and JBoss behind Apache - linux

I need to install these environment in the same machine.
Jira : ( installer, port: 8080, tomcat-jira)
Tomcat : ( tomcat for other applications, port: 8084 )
JBoss : ( port: 8086 )
Apache2: (as a proxy, mod_proxy, port: 80)
First I´d install Jira as a service, with their installer, so, It came with a tomcat embed, port 8080.
Then I installed apache as a proxy, It worked, I can now acces the jira like this: debian.local/jira intead of debian.local:8080.
But when I put tomcat in the same server the problems began:
I changed the tomcat ports on connectors and shutdown, but when I start it, the Tomcat from Jira goes down, both-ways.
The question is, how "un-recommended" is to install jira as a WAR deployed on my tomcat, intead of tomcat-jira?
What´s the best way to configure this environment? How must to be declared the CATALINA_HOME and CATALINA_BASE for this?
That´s all... thanks!

I think your installer-created CATALINA_HOME/CATALINA_BASE will probably be fine.
I would also not suggest trying to share one Tomcat instance with other applications due to potential conflicts between library versions (and also because you won't be able to shut down one application without shutting down the other).
The immediate problem is likely that you are trying to use the same shutdown port on both Tomcat instances. In JIRA's conf/server.xml, you will find a line like this:
<Server port="8004" shutdown="SHUTDOWN">
The configured port must be unique for each Tomcat instance, so you need to pick something that is not in use. (This is in addition to having a unique connector port declared in <Connector port="8080" ...).
If you use the same shutdown port, you will find that (say) your shutdown script for one instance ends up accidentally shutting down the other instance.

Related

Node js on virtual machine ignores requests from outside

this is the first time I use nodejs (and express), so I'm sorry if the question is stupid.
I installed nodejs and express on my debin virtual machine and created hello-world application. I run it like
DEBUG=myapp ./bin/www
Calling my application from virtual machine works just fine, but it ignores requests from outside workspace (windows). I thought it could be related to apache that I also have, so I stopped it, but it doesn't solve the issue. Please advice.
Thanks.
And this is how I solved it.
Opened port 3000 in Firewall (not sure if this was required), see how to do this http://windows.microsoft.com/en-us/windows/open-port-windows-firewall
Added port forwarding in my vm settings in virtualbox. By default there were ports 80 and 22. So I added 3000 which was the solution.

Trying to setup Linux Service in IBM Tivoli Identity Manager (ITIM)

I am currently trying to setup a Linux service with IBM Tivoli Identity Manager (IBM Security Identity Manager) a.k.a. ITIM, to a Linux development server where I work and have had some issues. All our Linux servers use ssh to connect. Our eventual goal is to implement single sign on across our networks using Identity Manager.
In the ITIM web interface, I chose the option MANAGE SERVICES and was displayed a page like the following, where I click the CREATE button to create a new service:
Then I am next shown a page where I choose the kind of service I want to make, in this page I choose the POSIX LINUX option because I want to connect to a Linux Server.
Then on the next page, I am entering the information for my Linux server that I want to connect to, the domain name for the server is phongdev.fit.edu, a server for development work.
Note on this page there is a field titled TIVOLI DIRECTORY INTEGRATOR (TDI) where there is default information for the TDI installation, in my case, TDI is installed on the same server as ITIM is installed, so the localhost domain name should be fine. However when I check the server using netstat command there is nothing running on that port, 16231, so I looked up the instructions for starting the TDIDispatcher on google and was told to run the following command, /etc/init.d/ITIMAd restart at the command line and that appeared to run successfully, however still nothing running on port 16231 on the server.
Since our servers use SSH I was required by ITIM to setup key based authentication, I did setup a key and passphrase on this Linux server using ssh, and entered the data on the next screen of ITIM which looks like the following, but as you can see an error is generated when I choose the TEST CONNECTION button:
I checked the logs and there is no info in the logs for these errors, I am not sure where to move next in trying to solve this issue, i suspect it may be related to the fact that the TDI Dispatcher does not appear to be running on port 16231.
Apart from what Matt said (the link especially is useful), the var/ibm/tivoli/common/TDI logs should tell you what the problem with TDI is when you start it up - if there's a problem.
The port number where it's listening ought to be mentioned somewhere in those logs.
Unless there was an upgrade or multiple attempts to configure the RMI dispatcher I don't see why the port shouldn't be 16231 or 1099.
TDI is probably running on a different port. You didn't specify if TDI is running on Windows or Linux, so my answer is assumes Linux since that is what I am most familiar with.
You can find your port # by looking in the solution.properties file in your TDI/timsol directory. It should be listed as api.remote.naming.port.
TDI runs on the default port 1099. Once you start TDI (service ITIMAd start, or however you start it on your system) use ps auxw | grep -i rmi (or something similar) to find the process. Then use netstat -anp | grep PID where PID is the process ID of the TDI RMI process. You should see immediately what port it is listening on. I am not where I have access to a TDI server right now to get you exact commands, but you should get the idea.
Here is a good article for ISIM 6 (should be the same for ITIM 5.1 on TDI 7) on changing the port # for the RMI:
http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=%2Fcom.ibm.itim_pim.doc%2Fdispatcher%2Finstall_config%2Ft_changeportnum.htm
If you are experiencing error CTGIMT600E and you have multiple network interfaces on TDI 6 or lower, you may need to specify your server IP (or hostname) as a java property so the TDI RMI binds on the correct interface. Edit <tdi_home>/ibmdisrv and insert -Djava.rmi.server.hostname=<yourhost>. For more infomration refer to this article:
http://www-01.ibm.com/support/docview.wss?uid=swg21381101
If you are still having issues, watch your ITIM msg.log and trace.log when you test the connection and look for clues. Also look at the TDI ibmdi.log which will be located under your TDI directory. That may also help you out.

Scalatra on nginx : how to set up?

Would like to set up Scalatra to run on a box running nginx.
Already have nginx set up correctly, and am able to serve static html pages, however, I now wish to point it to a Scalatra app. All of the documents available appear to assume that the server used will be Jetty: for example - http://blog.everythings-beta.com/?p=430
I assume that I cannot simply point it to just the folder because the jetty configuration requires, in addition to this, a class name and a servlet mapping.
How to I configure nginx to point to a Scalatra app?
Thanks!
Additional Info:
Ubuntu 12.04 is my operating system - so answers may either be specific to this, or anything that would generally work on Linux.
Bonus:
Throw in MongoDB as well - i.e. how to set up nginx with Scalatra and MongoDB - into your answer for extra points!!
Setting up with nginx is easy check out the docs on deploying java servers.
Once you are up and running install casbah and you are up and running.

Is it possible to run IIS and Tomcat side by side?

I am required to publish a JSP/Java servlets webapp. Unfortunately IIS does not support such deployments. The server I need to deploy it on already runs IIS and several IIS applications. I don't want to interfere with those applications but it is necessary for them and the new webapp to run on the same server. I tried setting up a proxy to redirect traffic to tomcat, but that broke the other applications.
I was wondering if it's possible to run IIS (accessible through good ol' port 80) and tomcat (running on port 8080); and be able to access both remotely. So far my efforts have been fruitless. Accessing IIS applications yielded no problems, but when I tried to connect to tomcat the browser would just time out. I unblocked port 8080 as well, so I'm sure that is not the issue.
Any help appreciated, thanks.
It's definitely possible, as long as they run on different ports. If you can access tomcat locally (http://localhost:8080) but not remotely, then it's a firewall issue. Also, if you really wanted you could have iis forward requests to tomcat.
You can arrange IIS and Tomcat in 2 different IP addresses or you can setup reverse-proxy (nginx, lighttpd, mod_proxy, etc.) to port 80 and then set IIS to use port 8080 and for Tomcat port 9090.
Melder, It is perfectly possible to run IIS & Tomcat on same port with Different IPs. One server can have multiple virtual IPs for the same.

Which port we can use to run IIS other than 80?

IIS does not work when I start applications like Skype since it also uses port 80.
Which port can I use to run IIS other than 80? (8080 does not work)
You can run IIS on any port you like, as long as it does not conflict with other applications. I am using 88, 8888 and other easy to remember ports.
You can find the common used port here: PORT NUMBERS, and it is safer to choose an unassigned TCP port.
Quote:
The Dynamic and/or Private Ports are those from 49152 through 65535
If IIS is working and you have troubles with an ASP.NET applications, those links might be helpful:
How to: Configure ASP.NET Applications for an ASP.NET Version
ASP.NET and IIS Configuration
ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
IIS and ASP.NET: The Application Pool
If you are still having troubles, it would be helpful to provide more information about your environment, the steps taken so far to solve the problem, and retagging the question (append asp.net for example)
Well you can disable skype to use port 80. Click tools --> Options --> Advanced --> Connection and uncheck the appropriate checkbox.
Port 8080 might have been used by another process in your computer.
Do netstat in command prompt to find out which server/process is using it.
Have a look at this page (http://en.wikipedia.org/wiki/Port_number) it gives you full explanation on how to use port number
Also remember, when running on alternate ports, you need to specify the port on the URL:
http://www.example.com:8080
There may be firewalls or proxy servers to consider depending on your environment.
you can configure IIS in IIS Mgr to use EVERY port between 1 and 65535 as long it is not used by any other application
Stopping Skype from using port 80: http://forum.skype.com/lofiversion/index.php/t15582.html
I'm going to make a few assumptions and come at the problem from a different angle... in that because you have skype installed and running on the same machine, that it is not a production machine and instead used for testing / development?
If so, you may wish to look at alternatives to IIS completely to alleviate your issue. If you use IISExpress or the web server built into recent versions of Visual Studio, they will automatically pick a port for you.
Of course this does mean that it's not particularly useful for giving other people access, but is fine for local development for personal use.
I think the other answers probably offer a better alternative in most situations, but this may offer a different insight.
Here is an intro to IIS Express: http://learn.iis.net/page.aspx/860/iis-express/
You have to configure the port first for example 127.0.0.1:91 then you need to allow access to port 91
from windows firewall->>advance setting->>inbound rules->> new rule.
then check port->> assign new port (91). then next to finished.
After this 127.0.0.1:91 should be accessible from the web.

Resources