On machine1, I installed apache tomcat 7 listening on port 9999 and copied a sample.html file in ../webapps/dummy folder of tomcat machine.I was able to access the resource with URL http://localhost:9999/dummy/sample.html
On machine2, Tomcat is already part of some product listening on port 8080 which i thought of utilising it for my sample test. So, I copied a sample.html file in ../webapps/dummy folder of tomcat machine. I was unable to access the resource with URL http://localhost:8080/dummy/sample.html
On machine2, I have existing servlet programming modules running in another folder ../webapps/xyz.
My question:
I am trying to understand, What are the list of things that i need to verify on machine, which let me know, why i have an issue in accessing the URL(above) on machine2? Is this something to do with http access configuration like basic.user/basic.groups file?
It has nothing to do with the port on which tomcat is running.
Did you restart Tomcat after copying file over? It might be that on machine2 it's not configured to run in a dev mode so it doesn't pick up changes at runtime.
or
(if this is linux/unix/mac computer) Tomcat on machine2 is running as tomcat:tomcat user, but file you copied can't be read by this user. Change the permissions of the file.
HTH,
Jan
Related
I installed my spring boot application in another server (linux machine) with the following run jar :
java -jar myapp.jar --spring.profiles.active=dev
--spring.config.location=file:/opt/myapp/conf/application.yml
where in my application.yml , i defined the port 8081 which is available, with a context root myApp.
The start of the jar is going well, the DB connected, the app started with the profile dev, in port 8081 and with context myApp properly.
But when i tried to connect from other machine http://serverIP:8081/myApp , the browser sham me ERR_CONNECTION_TIMED_OUT and no adress exist with this name.
i tried to run the app in my machine and i can access with localhost.
I don't know what is the problem, maybe i'm missing somthing.
I also verified the port and it's open, the ping with ip server was responding also.
Maybe there are other conf that i missed ?
UPDATE:
i followed this link stackoverflow.com/questions/29885274/… , with the telnet serverIP 8081 told me no connection, so as the link explain that tomcat is not correctly connected to the ip chossen, in application.xml i added server.adress = serverIP, and the same problem shown
I run a Java Application by using Apache Tomcat 7.0. I want to write files to another ftp server. The ftp file path is saving in a text file (//192.168.100.3/ftp/Testing).
When I start tomcat from bin>>tomcat.exe, the file is really written to the Ftp server.
When I start tomcat from services.msc, the following error occurs: File not found exception : access is denied
Execute services.msc as an administrator.
I assume one of the invoked files is in a subdirectory of Program Files and thus needs special permissions to be run.
I had installed Websphere Liberty Runtime in a Windows 7 machine following the instructions here :
https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/
I had installed and configured the admin-center feature following these instructions :
http://www-01.ibm.com/support/knowledgecenter/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/ae/twlp_ui_setup.html
I set two users : admin and nonadmin
I am able to connect to this server from Eclipse in another computer.
However, each time i try to deploy an application on this server, i get this error in the computer with Eclipse :
Publish HelloWorldApplication
OK
Failed to transfer application HelloWorldApplication
CWWKX0121E: Access denied to path C:/wlp/usr/servers/servername/apps/HelloWorldApplication.war.
Failed to synchronize server configuration.
CWWKX0121E: Access denied to path C:/wlp/usr/servers/servername/server.xml.
Deployment of application HelloWorldApplication failed.
And, in the server i got this :
[ERROR ] CWWKX7901E: The C:/wlp/usr/servers/servername/apps/HelloWorldApplication.war file system path is not valid.
Can anyone help me, please ?
We are more than one developer needing to work on this server.
Thanks in advance.
SJRM
How do you have your server.xml configured? Given the error you mention, I think it's missing the configuration for writing into the remote directories, which looks something like this:
<remoteFileAccess>
<writeDir>${writePath}</writeDir>
</remoteFileAccess>
You can define several write directories and each one can refer to variables or absolute paths, for example:
<remoteFileAccess>
<writeDir>${wlp.user.dir}</writeDir>
</remoteFileAccess>
You can obtain the basic configuration for remote administration by executing this command on you Liberty profile bin directory:
configUtility install remoteAdministration
For reference see:
http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/t_creating_remote_server.html?cp=SSEQTP_8.5.5%2F1-3-11-0-2-3 for setting up a remote server,
http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/rwlp_command_configutil.html%23rwlp_command_configutil?cp=SSEQTP_8.5.5%2F1-3-11-0-3-2-1-1&lang=en for reading about the configUtility and
http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/rwlp_dirs.html?cp=SSEQTP_8.5.5%2F1-3-11-0-2-0&lang=en for a list of Liberty profile properties and their corresponding directories.
Hey I want to access my application only through host name .. can you please tell how and where to configure it into tomcat
e.g http://host-name : 8080/myapp
I want only http:// host-name
Rename your war deployed in tomcat server as root.war and you can access your application by
hitting the url below:
http://host-name : 8080/
About the port, run Tomcat on 80 instead of 8080. Refer to this
I have a Solr 4.2.0 server which is running under the Tomcat 7.0 container. I'm trying to wire it with my external zookeeper (actually, it doesn't work with the embdedded zookeeper too).
I tried this java opts:
-Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf
-DzkRun
-DnumShards=2
for running the embedded zookeeper.
And also this java opts:
-Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf
-DzkHost=localhost:2181
-DnumShards=2
For connecting to external zookeeper
In both cases I continue to get the same exception:
java.io.FileNotFoundException: File '.\solr\collection1\conf \admin-extra.html' does not exist
But the problem is that file admin-extra.html exists and it's right here. And I can't figure out what the problem is.
From your exception it seems your path has a white space after the config directory.
Try to define your bootstrap_configdir between "", like:
-Dbootstrap_confdir="./solr/collection1/conf"