I want to install Apache Tomcat in fedora 20.
I have try to install tomcat using below code
yum install tomcat.
Then, enable Tomcat on system startup:
systemctl enable tomcat
Command is executed properly, but when try http://127.0.0.1:8080 it shows a blank page.
Can anyone tell me, how I have to configure tomcat to make it work properly?
I recently got the same problem. And if you are used to yum but not used to install applications manually you can find below how I resolved the problem using yum:
# yum search tomcat
Loaded plugins: langpacks, refresh-packagekit
tomcat-native.x86_64 : Tomcat native library
jglobus-ssl-proxies-tomcat.noarch : Globus Java - SSL and proxy certificate support for Tomcat
jspc-compiler-tomcat6.noarch : JSPC Compiler for Tomcat6
openwebbeans-tomcat7.noarch : Apache OpenWebBeans Tomcat 7 plugin
springframework-instrument-tomcat.noarch : Spring Instrument Tomcat Weaver
**tomcat-admin-webapps.noarch : The host-manager and manager web applications for Apache Tomcat**
tomcat-docs-webapp.noarch : The docs web application for Apache Tomcat
tomcat-javadoc.noarch : Javadoc generated documentation for Apache Tomcat
tomcat-jsp-2.2-api.noarch : Apache Tomcat JSP API implementation classes
tomcat-jsvc.noarch : Apache jsvc wrapper for Apache Tomcat as separate service
tomcat-lib.noarch : Libraries needed to run the Tomcat Web container
tomcat-servlet-3.0-api.noarch : Apache Tomcat Servlet API implementation classes
**tomcat-webapps.noarch : The ROOT and examples web applications for Apache Tomcat**
tomcatjss.noarch : JSSE implementation using JSS for Tomcat
pki-tps-tomcat.noarch : Certificate System - Token Processing Service
tomcat.noarch : Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
tomcat-el-2.2-api.noarch : Expression Language v1.0 API
Because I ran into this dependency conflict:
Error: tomcatjss conflicts with tomcat-native-1.1.30-1.fc20.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I run yum install with the skip-broken flag:
# yum install --skip-broken tomcat*
And now after
# service tomcat restart
the Tomcat start Page appears as expected.
Related
I am using Jetty server for my apps. I have a web app, and when I deploy it in ${JETTY_HOME}/webapps, it works fine: I can access the APIs I have created locally and remotely.
But when I create a new Jetty base directory, and deploy my web app there, I cannot access these APIs and I get a 404 error.
Any idea about things I might have done incorrectly? I am new in web development, so any help will be very much appreciated.
Update: So these are the steps I did when I created the new Jetty base directory:
mkdir /opt/web
cd /opt/web
java -jar $JETTY_HOME/start.jar --add-to-start=http,deploy
then I placed my WAR file in /opt/web/webapps. From the new jetty base directory, I started the server with
java -jar $JETTY_HOME/start.jar jetty.port=8000
This is the log when the server started.
WARNING: Property jetty.port in <command-line> already set in /opt/web/start.ini
2015-05-14 12:11:49.973:INFO::main: Logging initialized #659ms
2015-05-14 12:11:50.278:INFO:oejs.Server:main: jetty-9.2.10.v20150310
2015-05-14 12:11:50.310:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/opt/web/webapps/] at interval 1
2015-05-14 12:11:51.271:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /myapi, did not find org.eclipse.jetty.jsp.JettyJspServlet
2015-05-14 12:11:51.305:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext#47cdc2ce{/myapi,file:/tmp/jetty-0.0.0.0-8000-myapi.war-myapi-any-1456158384990153592.dir/webapp/,AVAILABLE}{/myapi.war}
2015-05-14 12:11:51.328:INFO:oejs.ServerConnector:main: Started ServerConnector#5171c41f{HTTP/1.1}{0.0.0.0:8000}
2015-05-14 12:11:51.329:INFO:oejs.Server:main: Started #2015ms
I have the following configuration:
I deployed a sample SymmetricDS engine in Tomcat 8. It should have a JMX MBean I have to connect to. The configuration file symmetric-server.properties has the following values:
# Enable Java Management Extensions (JMX) web console.
#
jmx.http.enable=true
# Port number for Java Management Extensions (JMX) web console.
#
jmx.http.port=31417
# Enable Java Management Extensions (JMX) remote agent.
#
jmx.agent.enable=true
# Port number for the Java Management Extensions (JMX) remote agent.
#
jmx.agent.port=31418
And yet when I go to localhost:31417 I get 404 and when I launch the JConsole this application is nowhere to be found.
But when I start SymmetricDS with command bin\sym and it launches using the embedded jetty server, I can see the HTTP Adaptor on localhost:31417 and can connect via JConsole to the local application, yet I cannot connect remotely to localhost:31418:
I downloaded the sources of the SymmetricDS and in the file
symmetric-server\src\main\java\org\jumpmind\symmetric\SymmetricWebServer.java
there are only three configuguration taken from file symmetric-server.properties -- from default values it seems that they are jmx.http.port for HTTP Adaptor, https.port for HTTPS and http.port for SymmetricWebServer.
I also tried changing jmx.agent.enable to false and manually overriding java command line options in sym_service.conf by adding:
wrapper.java.additional.13=-Dcom.sun.management.jmxremote
wrapper.java.additional.14=-Dcom.sun.management.jmxremote.port=31417
wrapper.java.additional.15=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.16=-Dcom.sun.management.jmxremote.ssl=false
to no avail.
Could you please help me, what am I doing wrong?
Update
After greping sources I found SystemConstants.java, in which again there were ports for http, https and jmx.http, but none for remote agent
I have an issue setting up an rmi port on Apache Tomcat server
(set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401)
Here are the steps i have done and getting the error respectively.
Issue with MoSKito tool while configuring RMI port on Tomcat
I am also tried to configure MoSkito inspect on my java web application. as part of it, i have been trying to make RMI port using "set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401" on catalina.bat. there is no error as such but 9401 is not getting connected.
Steps followed:
1) My OS is Windows 7
2) I have installed Apache Tomcat v7
3) I have downloaded Moskito inspect .war file from http://www.moskito.org/download.html and
4) Installed Moskito inspect on my tomcat server, the MoSKito inspect web UI is loading good.
5) I have created a sample java web application and deployed on same tomcat server. and web application also working good.
6) Now i have taken step to configure RMI port 9041 using below command on \bin\catalina.bat file(since i am on Windows OS).
I have put the below command on top of the file in \bin\catalina.bat
set JAVA_OPTS=%JAVA_OPTS% -DlocalRmiRegistryPort=9401
7) and started tomcat server, and then opened Moskito application on browser and gone to Quick Connect option on and given localhost and rmi port 9401 to call remote invocation.
Its failed.... its always giving error as MoSKito encountered an error:
Cannot connect to localhost#localhost:9401, due: Can not resolve manually set reference. Server at localhost, port: 9401 is down or not properly configured
[net.anotheria.moskito.webui.util.APILookupUtility.findRemote(APILookupUtility.java:168), net.anotheria.moskito.webui.util.APILookupUtility.findRemote(APILookupUtility.java:142), net.anotheria.moskito.webui.util.APILookupUtility.getAdditionalFunctionalityAPI(APILookupUtility.java:113),
Q1: How to set -DlocalRmiRegistryPort=9401 on tomcat on Windows OS.
Q2: Once we set port, how to ensure port is set properly and its up and ready state for connection.
Q3: Once port is set properly, then how to set / configure specified java web application needs to be configured for MoSKito, since we could have more than one java web application on same tomcat server.
Please guide me, thank you :)
in order to be able to connect to a MoSKito monitored application you have to enable an agent that binds itself to port 9401 and answers your replies. To do so, you have to add a dependency to your pom (if you are using maven):
<!-- Enabling MoSKito Inspect Embedded -->
<dependency>
<groupId>net.anotheria</groupId>
<artifactId>moskito-inspect-remote</artifactId>
<version>${moskito.version}</version>
</dependency>
Please keep in mind that the current MoSKito version is 2.5.4
If you are using a servlet 3.0 compatible container (tomcat 7, jboss wildfly) you are done. If you are using an older container you may need to add following to your web.xml:
<listener>
<listener-class>net.anotheria.moskito.webui.embedded.StartMoSKitoInspectBackendForRemoteListener</listener-class>
</listener>
If you are using no container at all, you can start it manually:
net.anotheria.moskito.webui.embedded.StartMoSKitoInspectBackendForRemote.startMoSKitoInspectBackend()
Now for you questions:
Q1: via catalina.bat. You were doing it correctly.
Q2: if the agent is configured everything will work correctly.
Q3: You may want to check out step by step guide here:
http://blog.anotheria.net/msk/the-complete-moskito-integration-guide-step-1/
Regards
Leon
I updated to Eclipse Juno, and since then, it seems that I can't start or debug Glassfish when I could do it perfectly before. When starting the server I get this console output...
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: Grizzly Framework 1.9.50 started in: 1978ms - bound to [0.0.0.0:7676]
INFO: Grizzly Framework 1.9.50 started in: 2031ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.50 started in: 2165ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 2071ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.50 started in: 2077ms - bound to [0.0.0.0:8181]
INFO: SEC1002: Security Manager is OFF.
SEVERE: Exception while deploying the app [LuxorAutorizacionesBackEnd]
I can't deploy on eclipse, but when I export the project to a WAR file and put it on the autodeploy folder of the glassfish server, and start it on command prompt it starts perfectly fine.
I'm on Windows 7 x64, using Glassfish OpenSource 3.1.2.2 with Eclipse Juno
You have to change jreX.X to appropriate jdkX.X(where is X.X some number of version jre or jdk). I find on the web that glassfish now need jdk like default environment.
You have to go in eclipse to the widow>Installed JREs and click on add button to setup jdk instead jre. And after this you have to go in properties of project and click on java build path end mark glassfish system libraries. It is news of the glassFish in new version.
I have netbeans with the GWT4NB plugin installed. My code can compile and works with production mode. But when I try to launch the dev mode aka hosted mode in Netbeans the GWTShell window doesn't load. Getting this to work would be greatly useful for debugging. Here is my error in the console:
GWT4NB https://gwt4nb.dev.java.net
GWT installation directory: C:\Users\Guillaume\.netbeans\6.9\framework\gwt-2.1.0
init:
debug-connect-gwt-shell-hosted-15:
Unknown argument: -style
Google Web Toolkit 2.1.0
GWTShell [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-out dir] [url]
where
-noserver Prevents the embedded web server from running
-port Specifies the TCP port for the embedded web server (defaults to 8888)
-whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
-blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
-logdir Logs to a file in the given directory, as well as graphically
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-gen Debugging: causes normally-transient generated types to be saved in the specified directory
-bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
-codeServerPort Specifies the TCP port for the code server (defaults to 9997)
-out The directory to write output files into (defaults to current)
and
url Automatically launches the specified URL
Java Result: -1
init:
The problem seems to be the unknown -style argument. I tried changing this argument in build-gwt.xml under the gwt 2.0 section, no changes. Why isnt gwt 2.1 not in the xml config file also?
I have the same issue and fix it manually on every restart by setting the gwt version as '2.0' even if I am actually on 2.2.
The problem is caused by the fact that the GWT4NB does not undertand the version of GWT you are using and so tries with GWT 1.5, that is pretty different from modern ones.