RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

2016-01-15 Thread Terence M. Bandoian

On 1/13/2016 12:18 PM, McDermott, Becky wrote:

My problem has been solved.  In the tomcat7w.exe, I had to add the following to 
the Java Options:

-Djava.library.path=\PROGRA~1\IBM\JazzTeamServer_601\server\tomcat\lib

I also had to remove:
-Xgc:preferredHeapBase=1

With the removal of -Xgc and the addition of the -Djava.library.path, the 
service successfully started.


Nice work!

-Terence



-Original Message-
From: Terence M. Bandoian [mailto:tere...@tmbsw.com]
Sent: Tuesday, January 12, 2016 6:46 PM
To: Tomcat Users List
Subject: RE: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows Service

On 1/12/2016 10:04 AM, McDermott, Becky wrote:

I used the Java options provided by IBM.  Since Tomcat will successfully start 
using the startup batch files, I assume that these settings are fine.  I've 
tried playing with the settings and cannot get it to work either.  I seems like 
it's some sort of weird Windows thing.

I have successfully configured these services before with prior version of 
IBM's CLM.  The difference in those previous versions was that Tomcat came 
bundled with t heir product.  For this latest IBM version, Tomcat was not 
bundled and they provided instructions for downloading it from Apache and 
instructions for where to install it.

I have escalated the issue with IBM's support and since they are providing the JVM, it is 
probably their issue but wanted to put it out to the larger community to see if anyone 
has ever had this issue before.  A user on the user forums said that the memory error in 
the Tomcat log file is a red herring and that it is giving that memory allocation error 
because the JVM didn't actually start.  So, the issue seems more connected to the error 
in the Windows Event viewer ("cannot open file").


Hi, Becky-

Have you tried the Tomcat Windows Service Installer available on the download 
page (http://tomcat.apache.org/download-70.cgi)?  In my experience, it makes it 
much easier to get Tomcat up and running as a Windows service.  In addition, a 
configuration app is included which further simplifies the process.

With your current setup, I'd start by checking the Log On settings of the 
service and the permissions of the Tomcat files and folders.

-Terence Bandoian



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, January 12, 2016 8:59 AM
To: Tomcat Users List
Subject: [EXTERNAL] Re: Problem starting Tomcat 7.0.59 as a Windows
Service

Becky,

On 1/12/16 10:42 AM, McDermott, Becky wrote:

I am integrating Tomcat with the IBM CLM 6.0.1 collaboration tools.  Per IBM's 
installation instructions, I downloaded and extracted Tomcat 7.0.59 to my 
server.

I am successfully able to start the Tomcat server from the command line using 
the batch files provided by the IBM application (C:\Program 
Files\IBM\JazzTeamServer_601\server\server.startup.bat).  Tomcat starts as well 
as all of the IBM CLM applications.

The problem I'm having is when I try to configure tomcat to run as a Windows 
service.  I have followed the instructions provided by IBM:


1.   Set the environment variable CATALINA_HOME to C:\Program 
Files\IBM\JazzTeamServer_601\server\tomcat

2.   Deleted existing tomcat7 services using:  sc delete tomcat7

3.   Re-booted the machine

Note that, depending upon how you set the CATALINA_HOME environment variable, 
rebooting will lose this value. I'm not sure the reboot was necessary.


4.   Installed the new tomcat service from the Tomcat bin directory:  
service.bat install tomcat7

5.   Configured the service using:  tomcat7w.exe

1.   Clicked "Java" tab

2.   Cleared "Use default" checkbox

3.   Added the following path to the Java Virtual machine:  C:\Program 
Files\IBM\JazzTeamServer_601\server\jre\bin\j9vm\jvm.dll

4.   Added the following lines to the end of the java Options text field:
-DJAZZ_HOME=le:///C:/PROGRA~1/IBM/JazzTeamServer_601/server/conf
-Djava.awt.headless=ue
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin>> >tr ue 
-Dcom.ibm.team.repository.tempDir=C:\Program
Files\IBM\JazzTeamServer_601\server\tomcat\temp
-Djazz.connector.sslEnabledProtocols=Sv1.2
-Djazz.connector.algorithm=mX509
-Dlog4j.configuration=le:///C:/PROGRA~1/IBM/JazzTeamServer_601/ser
ve
r/conf/startup_log4j.properties
-Xgcpolicy:gencon
-Xcompressedrefs
-Xgc:preferredHeapBase=1
-XX:MaxDirectMemorySize=

That's a BIG buffer. Do you need 1G NIO buffers? A web-based video-editing 
application?


-Xmx4G
-Xms4G
-Xmn1g

What is -Xmn? It's probably not a problem, but I thought I'd point-out 
something that looks weird.


-DORACLE_JDBC_DRIVER_FILE=\Program
Files\IBM\JazzTeamServer_601\server\Oracle\ojdb6.jar

5.   Cleared the following fields:

* Initial memory pool

* Maximum memory pool

* Thread stack size

6.   In the Startup and Shutdown tabs, confirmed that "jvm" was selected for the 
"Mode" setting


Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]

2016-01-15 Thread David kerber

On 1/15/2016 1:02 AM, Rahul Singh wrote:

Dear Christopher,

Thanks for your guidelines, we have big hope from Apache Tomcat Team to solve 
this problem as this is show stopper for our application, we have also raise 
this question on various forum like stack overflow and other,but no relevant 
reply till now.

Hope you understand my situation,

please refer the below stackoverflow reference for more detail about this issue.

http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438


for more information:

  -No error are printed in tomcat logs.
- how to configure "call HttpServletRequest.getHeader("Content-Length") as a String 
and parse it yourself."


This is straight forward java programming that you should be able to 
handle yourself.  It could be done in one line, though I personally 
wouldn't do it that way.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat - Multiple sites and SSL

2016-01-15 Thread Olaf Kock
Please clarify your intent:

By default, tomcat has a /commented/ connector on 8443, which you can
configure You can activate as many connectors on as many ports
as you like. But if you have all applications on the same application
server anyways (and are using the same hostnames): Why bother?

This could be a question about SNI (Server Name Indication) to have
multiple domain names on a single IP (but you're mentioning only one
domain name).
This could also be a question about how to map tomcat's ports to 80 or,
in your case more likely 443.
Or it could be a question on how to set up https in general. Why do you
want to listen on several ports? Wouldn't you - in the end - want them
all to come in through https on the standard port?

Olaf

Am 15.01.2016 um 20:01 schrieb Jeff Jennings:
> I will have two applications running on my tomcat server
>
> Jira on port 8080 and confluence on port 8090
>
> I'm going to get an ssl cert for the server which I'll call something like
> test.mysite.com
>
> Once I get my ssl cert for test.mysite.com how do I go about setting up the
> configuration file for tomcat so that both sites can share the cert.
>
> I've been using regular apache for years and know how to do it with virtual
> hosts in httpd.conf and ssl.conf but tomcat is new to me.
>
> any pointers would be appreciated.
>
> I'm thinking I'd like to map 8080 to something like test.mysite.com/jira
> and 8090 to test.mysite.com/confluence
>
> but I'm open to all ideas.
>
> I see tomcat want to use port 8443 for ssl
>
> I have read this page:
> https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html but am unsure how
> to handle multiple apps on the same server that listen on different ports.
>
> thanks
>
> jeff
>



Re: Tomcat - Multiple sites and SSL

2016-01-15 Thread Ari Luoma
Hi,

Try following. I can't guarantee it works with Jira and Confluence but this
could work.

Set up the cert in Apache and create AJP proxies between Apache and Tomcats
(if running one Tomcat for jira and one for confluence). I have similar
setup with other applications.

-Ari

15.1.2016 21.02 "Jeff Jennings" wrote:
>
> I will have two applications running on my tomcat server
>
> Jira on port 8080 and confluence on port 8090
>
> I'm going to get an ssl cert for the server which I'll call something like
> test.mysite.com
>
> Once I get my ssl cert for test.mysite.com how do I go about setting up
the
> configuration file for tomcat so that both sites can share the cert.
>
> I've been using regular apache for years and know how to do it with
virtual
> hosts in httpd.conf and ssl.conf but tomcat is new to me.
>
> any pointers would be appreciated.
>
> I'm thinking I'd like to map 8080 to something like test.mysite.com/jira
> and 8090 to test.mysite.com/confluence
>
> but I'm open to all ideas.
>
> I see tomcat want to use port 8443 for ssl
>
> I have read this page:
> https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html but am unsure how
> to handle multiple apps on the same server that listen on different ports.
>
> thanks
>
> jeff


Tomcat - Multiple sites and SSL

2016-01-15 Thread Jeff Jennings
I will have two applications running on my tomcat server

Jira on port 8080 and confluence on port 8090

I'm going to get an ssl cert for the server which I'll call something like
test.mysite.com

Once I get my ssl cert for test.mysite.com how do I go about setting up the
configuration file for tomcat so that both sites can share the cert.

I've been using regular apache for years and know how to do it with virtual
hosts in httpd.conf and ssl.conf but tomcat is new to me.

any pointers would be appreciated.

I'm thinking I'd like to map 8080 to something like test.mysite.com/jira
and 8090 to test.mysite.com/confluence

but I'm open to all ideas.

I see tomcat want to use port 8443 for ssl

I have read this page:
https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html but am unsure how
to handle multiple apps on the same server that listen on different ports.

thanks

jeff


Re: Tomcat - Multiple sites and SSL

2016-01-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff,

On 1/15/16 2:01 PM, Jeff Jennings wrote:
> I will have two applications running on my tomcat server
> 
> Jira on port 8080 and confluence on port 8090
> 
> I'm going to get an ssl cert for the server which I'll call
> something like test.mysite.com
> 
> Once I get my ssl cert for test.mysite.com how do I go about
> setting up the configuration file for tomcat so that both sites can
> share the cert.
> 
> I've been using regular apache for years and know how to do it with
> virtual hosts in httpd.conf and ssl.conf but tomcat is new to me.
> 
> any pointers would be appreciated.
> 
> I'm thinking I'd like to map 8080 to something like
> test.mysite.com/jira and 8090 to test.mysite.com/confluence
> 
> but I'm open to all ideas.
> 
> I see tomcat want to use port 8443 for ssl
> 
> I have read this page: 
> https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html but am
> unsure how to handle multiple apps on the same server that listen
> on different ports.

Although you can't use multiple Atlassian products in a single Tomcat
instance (boo!), the configuration would have been easy:

Just configure the same certificate on the connectors for both ports.
In fact, there's no reason to use separate ports for each application:
you can use a single connector with separately-named web applications
(e.g. /jira versus /other-product) or virtual hosting if both of them
must run as ROOT application (again, boo!).

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlaZVnUACgkQ9CaO5/Lv0PCV1ACgsYlG6zPbZOvRVEf2U8Nwq6Ds
jgQAniOX3xsjsLk0r0XNx1aBkhS+uE8t
=HtjI
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat - Multiple sites and SSL

2016-01-15 Thread Jeff Jennings
Thanks - I understand your questionw. but unfortunately based on further
investigation I've discovered that I cannot run both of my apps on the same
server.


https://confluence.atlassian.com/jira/deploying-multiple-atlassian-applications-in-a-single-tomcat-container-218279138.html

On Fri, Jan 15, 2016 at 2:09 PM, Olaf Kock  wrote:

> Please clarify your intent:
>
> By default, tomcat has a /commented/ connector on 8443, which you can
> configure You can activate as many connectors on as many ports
> as you like. But if you have all applications on the same application
> server anyways (and are using the same hostnames): Why bother?
>
> This could be a question about SNI (Server Name Indication) to have
> multiple domain names on a single IP (but you're mentioning only one
> domain name).
> This could also be a question about how to map tomcat's ports to 80 or,
> in your case more likely 443.
> Or it could be a question on how to set up https in general. Why do you
> want to listen on several ports? Wouldn't you - in the end - want them
> all to come in through https on the standard port?
>
> Olaf
>
> Am 15.01.2016 um 20:01 schrieb Jeff Jennings:
> > I will have two applications running on my tomcat server
> >
> > Jira on port 8080 and confluence on port 8090
> >
> > I'm going to get an ssl cert for the server which I'll call something
> like
> > test.mysite.com
> >
> > Once I get my ssl cert for test.mysite.com how do I go about setting up
> the
> > configuration file for tomcat so that both sites can share the cert.
> >
> > I've been using regular apache for years and know how to do it with
> virtual
> > hosts in httpd.conf and ssl.conf but tomcat is new to me.
> >
> > any pointers would be appreciated.
> >
> > I'm thinking I'd like to map 8080 to something like test.mysite.com/jira
> > and 8090 to test.mysite.com/confluence
> >
> > but I'm open to all ideas.
> >
> > I see tomcat want to use port 8443 for ssl
> >
> > I have read this page:
> > https://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html but am unsure
> how
> > to handle multiple apps on the same server that listen on different
> ports.
> >
> > thanks
> >
> > jeff
> >
>
>


Re: File size >= 2GB not uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK 1.7.79]

2016-01-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rahul,

On 1/15/16 1:02 AM, Rahul Singh wrote:
> Thanks for your guidelines, we have big hope from Apache Tomcat
> Team to solve this problem as this is show stopper for our
> application, we have also raise this question on various forum like
> stack overflow and other, but no relevant reply till now.

Why didn't you come to the Tomcat community first?

> Hope you understand my situation,
> 
> please refer the below stackoverflow reference for more detail
> about this issue.
> 
> http://stackoverflow.com/questions/34783438/dofilter-fails-to-get-any-
request-for-the-file-upload-2gb?noredirect=1#comment57315528_34783438
>
>
> 
for more information:
> 
> -No error are printed in tomcat logs. - how to configure "call 
> HttpServletRequest.getHeader("Content-Length") as a String and
> parse it yourself."

I don't have a test-case in front of my, but I'm fairly confident that
Tomcat allows file uploads of greater than 2GiB. I suspect the problem
is another component.

Are you using Servlet 3.0-based file upload, or are you allowing
Struts to handle the file-upload for you? If you use Servlet-3.0
file-upload, then you'll have code that deals with Multipart classes
and configuration in web.xml. If you are using Struts's file-upload,
then you'll mostly just be calling getFile or getInputStream or
however Struts 2 does things (I can't remember how it all works off
the top of my head).

The point is, if you are using Struts, then Tomcat will not touch the
request and Struts is handling the whole thing. If Struts is the
problem, you'll need to talk to the Struts team[1].

If you are using Servlet-3.0 file-upload, then Struts is just a red
herring and this is the right place to get your issue solved.

So far, you have posted some configuration for Struts and some JSP
tablib-filled code, plus some Java code for a Filter. You didn't say
where the Filter was in the filter chain (before or after Struts
filter).  You also mentioned that the form is actually posted using
XMLHttpRequest and not through a standard form, but you didn't explain
what component is doing that or how it actually works.

There isn't enough information here to make any sense of the
situation. Can you please address all of the questions I've posed
above and maybe we can then help you?

Are you sure the request is even made to the server in these cases?
What if the Javascript upload component is failing before it even starts
?

- -chris

[1] http://struts.apache.org/mail.html

>  From: Christopher Schultz 
>  Sent: Thursday, January 14, 2016
> 8:43 PM To: Tomcat Users List Subject: Re: File size >= 2GB not
> uploaded in application [Tomcat 7.0.54 Struts: 2.3.24 JAVA: openJDK
> 1.7.79]
> 
> André,
> 
> On 1/14/16 5:02 AM, André Warnier (tomcat) wrote:
>> I have not followed this thread in details, but did you check
>> this :
>> 
>> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Common_Attri
butes
>>
>>
>> 
- --> maxPostSize
> 
> +1
> 
>> The maximum size in bytes of the POST which will be handled by
>> the container FORM URL parameter parsing. The limit can be
>> disabled by setting this attribute to a value less than zero. If
>> not specified, this attribute is set to 2097152 (2 megabytes).
>> Note that the FailedRequestFilter can be used to reject requests
>> that exceed this limit.
>> 
>> Note: the size above might relate to the *encoded* size of the 
>> file, as it is transmitted over the WWW (possibly encoded as
>> Base64 e.g.), which may mean that an original 1 MB file
>> translates to more than 1 MB bytes while being uploaded.
>> 
>> Note also : maybe "Struts" is setting this to some other default 
>> value..
>> 
>> Another question : did you check the Tomcat logs ?
> 
> IIRC, Tomcat doesn't log anything in these cases. You have to use 
> the FailedRequestFilter to detect and report the condition. I 
> wouldn't use that Filter in productio, but it would be good as a 
> simple test to see if this is the error that is occurring.
> 
> When Tomcat refuses to allow a file upload that it too large, it 
> simply does not parse the parameters, but the request continues to 
> process as usual (but the servlet doesn't end up getting any of
> the parameters). I'm surprised that Struts isn't getting the
> request in these cases.
> 
> -chris
> 
> -
>
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> -
>
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/