Re: tomcat is not coming Up

2023-01-12 Thread Zero

On 1/12/23 11:46, Ganesan, Prabu wrote:


Hi Team,

This is the only message we are receiving while starting the services. 
Can some one help on this .


11-Jan-2023 18:21:58.101 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Djava.io.tmpdir=/srv/tomcats/tomcat1/temp
11-Jan-2023 18:21:58.101 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older 
version [1.2.17] of the APR based Apache Tomcat Native library is 
installed, while Tomcat recommends a minimum version of [1.2.23]
11-Jan-2023 18:21:58.101 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded 
APR based Apache Tomcat Native library [1.2.17] using APR version [1.4.8].
11-Jan-2023 18:21:58.101 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR 
capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true].
11-Jan-2023 18:21:58.101 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 
APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
11-Jan-2023 18:21:58.105 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL 
successfully initialized [OpenSSL 1.0.2k-fips  26 Jan 2017]

LunaNamedSystemMutex: open() failed: Permission denied

Thanks & Regards,

_Email_CBE.gif

*PrabuGanesan***

*Consultant|MS-Nordics*

capgemini India Pvt. Ltd. | Bangalore **

Contact: +91 8526554535

Email: prabhu.c.gane...@capgemini.com





Out of curiosity looked at the loggings.

What does LunaNamedSystemMutex open() failed (for Luna Cloud?) mean ?

~Z



*From:*Hiran CHAUDHURI 
*Sent:* 11 January 2023 21:36
*To:* Tomcat Users List 
*Subject:* RE: tomcat is not coming Up

This mail has been sent from an external source

CONFIDENTIAL & RESTRICTED

If on the old command line the apr libs were referenced but on the new 
one it is not, I believe that could make the process not find the 
libraries to communicate.


Enough of a reason to terminate with an error, but maybe it is on 
stderr and nowhere in the logs.


  * Check where the jvm’s stderr/stdout goes to (could be cron,
system, syslog, a docker container, …). If it has an error
message, share it or act on it.
  * Check what caused the changes that you are noticing
  * Check what else it may have impacted (e.g. JVM version, keystores,
startup scripts, …)

*From:*Ganesan, Prabu 
*Sent:* Wednesday, January 11, 2023 16:25
*To:* Tomcat Users List 
*Subject:* tomcat is not coming Up

EXTERNAL Email. Be careful with links and attachments! If in doubt, 
click the Report Mail button.


Hi team

Our Production Servers are down, Not Coming up When we are trying to 
start the services


In logs we couldn’t see Any Errors only I can see Info.

Though I can see some changes in this. But we have not made any changes

*Old :* INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Djava.library.path=/usr/local/apr/lib


*New : *INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line 
argument: -Xmx3072m



*Old : *INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded 
APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.3]


*New :* INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded 
APR based Apache Tomcat Native library [1.2.17] using APR version [1.4.8]


Could you please confirm. Is this could be the reason to not start up?

We have not done any changes from our end.

Please help us what more required I ll Provide logs

Thanks & Regards,

_Email_CBE.gif

*PrabuGanesan*

*Consultant|MS-Nordics*

capgemini India Pvt. Ltd. | Bangalore **

Contact: +91 8526554535

Email: prabhu.c.gane...@capgemini.com



Re: setenv.sh not loaded

2022-11-04 Thread Zero



If I look how the service is defined in Arch Linux (for tomcat 10)


it defines a service file for Systemd, 
usr/lib/systemd/system/tomcat10.service


Looking in that file it calls jsvc.

In the parameters you then can define additional class path entries in 
parameter -cp and java runtime options in CATALINA_OPTS.


The idea there seems to be to change the tomcat10.service file instead 
of changing the setenv.sh file.


HTH
~Z

On 11/4/22 12:57, Ivano Luberti wrote:

I follow with the conclusion on this matter.

Installing Tomcat with yum and epel repository,so doing

yum install epel-release

yum install tomcat

leads to a tomcat installation with no catalina.sh present in either 
usr/share/tomcat or var/lib/tomcat


Consequently tomcat is installed as a service with a service file that 
launches tomcat without reference to catalina.sh and instead loads a 
configuration file in  etc/tomcat/ (not sure about this dir but it has 
been erased and I can't verify)  where you can put your JAVA_OPTS



Il 02/11/2022 14:08, Ivano Luberti ha scritto:


Tomcat ahas benne installed using yum

I cannot find any catalina.sh file on the system.

So I have to check with the sysadmin how  he configured tomcat.

Il 02/11/2022 13:46, Olaf Kock ha scritto:


On 02.11.22 12:43, Ivano Luberti wrote:
Hi, I have been given an Oracle Linux instance with tomcat 9.0.65 
installed as a service.


Tomcat is running correctly

I have tried to create a setenv.sh file to tune the JVM, but using 
the tomcat manager application and the catalina.log file it seems 
that my java configuration is not loaded.


Any suggestion on how to debug this?


You're saying "installed as a service". This might mean that 
tomcat/bin/catalina.sh is also never executed, or that it has been 
altered from the default.


Ivano's suggestion is great already. On top, you might want to

* check how Tomcat is started by the system (e.g. does it go through 
catalina.sh at all?)


* check if anything in its installation directory is altered from 
default. Just inspect a diff between stock 9.0.65 and what you find 
in your installation.


Olaf 



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



Re: [OT] programming style or mental process ?

2021-04-04 Thread Zero

On 4/4/21 12:23 PM, André Warnier (tomcat/perl) wrote:

Hi.
I have a question which may be totally off-topic for this list, but 
this has been puzzling me for a while and I figure that someone here 
may be able to provide some clue as to the answer, or at least some 
interesting ponts of view.


In various places (including on this list), I have seen multiple 
occurrences of a certain way to write a test, namely :


 if (null == request.getCharacterEncoding()) {

as opposed to

 if (request.getCharacterEncoding() == null) {

Granted, the two are equivalent in the end.
But it would seem to me, maybe naively, that the second form better 
corresponds to some "semantic logic", by which one wants to know if a 
certain a-priori unknown piece of data (here the value obtained by 
retrieving the character encoding of the current request) is defined 
(not null) or not (null).


Said another way : we don't want to know if "null" is equal to 
anything; we want to know if request.getCharacterEncoding() is null or 
not.


Or in yet another way : the focus (or the "subject" of the test) here 
is on "request.getCharacterEncoding()" (which we don't know), and not 
on "null" (which we know already).


Or, more literarily, given that the syntax of most (all?) programming 
languages is based on English (if, then, else, new, for, while, until, 
exit, continue, etc.), we (*) do normally ask "is your coffee cold ?" 
and not "is cold your coffee ?".



So why do (some) people write it the other way ?
Is it purely a question of individual programming style ?
Is there some (temporary ?) fashion aspect involved ?
Do the people who write this either way really think in a different way ?
Or is there really something "technical" behind this, which makes one 
or the other way be slightly more efficient (whether to compile, or 
optimise, or run) ?




Cannot find it back right now.

But I seem to remember that it came from Scott Meyers in C++ programming.

Maybe there it forces the compiler to use the right method when there is 
overloading.



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



Re: Unable to start Tomcat 10.0.4

2021-03-16 Thread Zero

On 3/16/21 3:57 PM, dku...@ccilindia.co.in wrote:

Your more recent exception log didn't include the "caused by" exception

--

which is the actual failure details. Double-check that and make sure

it's

the same issue.

Also, use netstat to confirm you aren't using the ports already.

Changing

it may just find another conflict (although less likely). The first

error

was quite clear about the port being unavailable.

How are you starting Tomcat? Are you somehow starting it twice?

I start tomcat click on batch file. I have changed port 80 to 81 please
find both log below. Unable to find any port (80, 81, 443) in netstat.
Please suggest where I am doing wrong

Old log with port 80 and 443
16-Mar-2021 16:45:44.410 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized [OpenSSL 1.1.1i  8 Dec 2020]
16-Mar-2021 16:45:44.704 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-80"]
16-Mar-2021 16:45:44.716 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component [Connector[null-80]]
 org.apache.catalina.LifecycleException: Protocol handler
initialization failed
 at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
 at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
 at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
 at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

New log with change port 81 and 443
16-Mar-2021 20:16:06.094 INFO [main]
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
successfully initialized [OpenSSL 1.1.1i  8 Dec 2020]
16-Mar-2021 20:16:06.380 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-81"]
16-Mar-2021 20:16:06.411 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["https-openssl-nio-443"]
16-Mar-2021 20:16:06.413 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to
initialize component
[Connector[org.apache.coyote.http11.Http11NioProtocol-443]]
 org.apache.catalina.LifecycleException: Protocol handler
initialization failed
 at
org.apache.catalina.connector.Connector.initInternal(Connector.java:1055)
 at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
 at
org.apache.catalina.core.StandardService.initInternal(StandardService.java:558)
 at
org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

On Tue, Mar 16, 2021 at 9:38 AM  wrote:


Deepak,
You already have some service listening on port 80 (IIS maybe?)


from mobile (sorry for typos ;)

We have changed the port still getting same error
Maybe you have the same port configured twice in your conf/server.xml?
Please post *all*  elements from your conf/server.xml file,
being careful to remove any secrets from your configuration.

-chris
please find conf/server.xml file



   
className="org.apache.catalina.startup.VersionLoggerListener"

/>
   
   
   
/>

   
/>

   
 
   
   
 
disableUploadTimeout="true"

compression="on" compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"


compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript"

  server=" " />
 
="org.apache.coyote.http11.Http11NioProtocol"

port="445" maxHttpHeaderSize="8192" maxThreads="150"
 minSpareThreads="25"

enableLookups="false"

disableUploadTimeout="true" acceptCount="100" scheme="https"

secure="true"

 clientAuth="false" sslProtocol="TLS"
sslEnabledProtocols="TLSv1.2,TLSv1.1" SSLEnabled="true"
allowUnsafeLegacyRenegotiation="false"
  ciphers="TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA"
 keystoreFile="/conf/abc.key"
keystorePass="changeit" server=" " />
 
   
 
   
   
 
   
 
   



16-Mar-2021 18:09:38.299 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-81"]
16-Mar-2021 18:09:38.363 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["https-openssl-nio-445"]
16-Mar-2021 18:09:38.364 SEVERE [main]
org.apache.catalina.util.LifecycleBase.handleSubClassException Failed

to

initialize component
[Connector[org.apache.coyote.http11.Http11NioProtocol-445]]
  org.apache.catalina.LifecycleException: Protocol handler
initialization failed
  at



On Linux you cannot bind ports below 1024 without admin privileges.

Maybe that is also the case in Windows ?

Then you could change port 80 into 8080 and 443 into 8443 and see if 
that works.


~Z




Re: Cannot add dependency job for unit systemd-console-setup.service

2019-10-20 Thread Zero

On 10/20/19 3:28 PM, Emefile Francis Nwajie wrote:

Thank you Andre for helping out.

I figured that the "systemd-console-setup.service" was disabled in the
server. I have enable it. However, tomcat still refuses to start. Below is
the content of tomcat.service:

[Unit]
Description=Apache Tomcat 9
After=syslog.target network.target

[Service]
User=tomcat
Group=tomcat
Type=forking
Environment=CATALINA_PID=/opt/tomcat/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

Now it doesn't give any error other than "Unit tomcat.service entered
failed state."



Tomcat logs its state in logfiles located in /var/log or /opt/tomcat/log.

Maybe check those loggings to get an idea of why it fails to startup.

~Harm-Jan



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



Re: Any tutorials or hints about JSP using javax.script engines instead of Java?

2019-10-08 Thread Zero

On 10/8/19 5:11 PM, Rony G. Flatscher (Apache) wrote:

Does anyone know of any tutorials that would demonstrate how to use any 
javax.script language in
JSPs instead of Java (e.g. using Jython or JavaScript instead)?

If not, any advice/hint how to realize/create such a functionality (for then 
creating such a
tutorial instead) would be highly appreciated!

---rony



How about TutorialsPoint ?


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



Re: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Zero

On 4/23/19 10:28 PM, Pablo Salazar wrote:

Hi  Zero,


Not Yet.

DO you recomend it??

REgards,

Pablo Salazar



No I don't know, I am curious about that.


Regards, Harm-Jan Z.




-Original Message-
From: Zero [mailto:hz0...@gmail.com]
Sent: martes, 23 de abril de 2019 03:26 p.m.
To: users@tomcat.apache.org
Subject: Re: It's possible run PHP on Tomcat 8 without use Quercus?

On 4/23/19 9:55 PM, Pablo Salazar wrote:

Thanks Chris,

Do you know if exist some GUIDE to configure Tomcat 8 for run php files???

Regards,

Pablo Salazar


Out of curiosity, did you try PHP-JavaBridge ?


Regards, Harm-Jan Z.



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: martes, 23 de abril de 2019 09:15 a.m.
On 4/23/19 08:44, Pablo Salazar wrote:

Hi,

I am lookling for a solution to my problema.

I have Tomcat 8 installet with Quercus for run PHP, but recently I
need load Imagick module for a new funcionality on my page, but on
the GUIDES of Imagick, it's needed to use php.ini of PHP
intsdallation, but Quercus don't have that file.

I have insalled PHP on some folder (D: \PCSA\php) so into that folder
I have php.ini file, I configure the necesary lines fot Imagick so,
when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but
when I run http://hostname:9095/phpinfo.php (that file it's for
phpinfo() function) the response it's for configuration of Quercus, I
mean, load PHP of Quercus, not d:\PCSA\php.

First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in 2014. I'm 
not sure you want to trust something that old.


Second Question: How can I configure Quercus for load Imagick module?

I think you'll want to ask that question in a Quercus forum instead of in a 
Tomcat forum.

- -chris



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



Re: It's possible run PHP on Tomcat 8 without use Quercus?

2019-04-23 Thread Zero

On 4/23/19 9:55 PM, Pablo Salazar wrote:

Thanks Chris,

Do you know if exist some GUIDE to configure Tomcat 8 for run php files???

Regards,

Pablo Salazar



Out of curiosity, did you try PHP-JavaBridge ?


Regards, Harm-Jan Z.



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: martes, 23 de abril de 2019 09:15 a.m.
On 4/23/19 08:44, Pablo Salazar wrote:

Hi,

I am lookling for a solution to my problema.

I have Tomcat 8 installet with Quercus for run PHP, but recently I
need load Imagick module for a new funcionality on my page, but on the
GUIDES of Imagick, it's needed to use php.ini of PHP intsdallation,
but Quercus don't have that file.

I have insalled PHP on some folder (D: \PCSA\php) so into that folder
I have php.ini file, I configure the necesary lines fot Imagick so,
when I run pgp -i | findstr -i "imagick" the moduel t's loaded, but
when I run http://hostname:9095/phpinfo.php (that file it's for
phpinfo() function) the response it's for configuration of Quercus, I
mean, load PHP of Quercus, not d:\PCSA\php.

First question: How can I run PHP on Tomcat  8 without Quercus?

I'm certain the answer is "yes", but it might be easiest to use Quercus.

I'd never heard of Quercus before, but it's last release was back in 2014. I'm 
not sure you want to trust something that old.


Second Question: How can I configure Quercus for load Imagick module?

I think you'll want to ask that question in a Quercus forum instead of in a 
Tomcat forum.

- -chris



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



What causes OutOfMemoryError ?

2007-11-19 Thread zero args
   Hi
 Right now I was using tomcat 5.5.25 and got the exception as shown below:

2007/11/16 21:44:01 org.apache.coyote.http11.Http11Processor process
致命的: Error processing request
java.lang.OutOfMemoryError: Java heap space
at org.apache.tomcat.util.buf.ByteChunk.allocate(ByteChunk.java:159)
at org.apache.tomcat.util.buf.ByteChunk.init(ByteChunk.java:124)
at org.apache.catalina.connector.OutputBuffer.init(OutputBuffer.java
:170)
at org.apache.catalina.connector.OutputBuffer.init(OutputBuffer.java
:158)
at org.apache.catalina.connector.Response.setConnector(Response.java
:138)
at org.apache.catalina.connector.Connector.createResponse(Connector.java
:923)
at org.apache.catalina.connector.CoyoteAdapter.service(
CoyoteAdapter.java:124)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
2007/11/16 21:44:27
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
致命的: [EMAIL PROTECTED] を�g行中に例外 (
java.lang.OutOfMemoryError: Java heap space) をキャッチしたので、スレッドを�K了します

After the exception occur ,any request to  my app1 was refused while other
app deployed on the same tomcat server worked well.
I don't  what  can cause the exception and why other apps can still
work.Help please!