I am new to java servlets. I have installed apache-tomcat-9.0.0.M21.
When I run the project containing servlet in eclipse browser, sometimes I get the error-
Error resolving 'localhost': Name or service not known.
Other times the error is -
Error resolving 'localhost' : Temporary failure in name resolution.
This project runs fine in my web browser.
Also, after I add <servlet>...</servlet> and <servlet-mapping>...<servlet-mapping> in web.xml, I get the error - Server Tomcat v9.0 Server at localhost failed to start.
One more thing, I use Ubuntu operating system (if it has to do something with the question).
Please help. I googled for the solution but I am not able to resolve the error.
Try adding the below to your /etc/hosts file.
127.0.0.1 localhost
Related
I keep getting this error while I try to start Tomcat in Eclipse. No other message or details just a pop up with this message: "Server Tomcat v9.0 Server at localhost failed to start." Tomcat works fine in the terminal so I don't see what could be the issue. I looked at countless solutions, nothing worked.
What I tried:
- Changing the ports
- Reinstalling server
- Deleting .snap file
- Deleting temp folder
- Removing runtime environment
- Restarting everything
So basically all the suggestions that were made in different posts, nothing works, anybody have any idea what else can I try?
Ps. It can't be the web.xml since I get the same message when I try to start the tomcat server on it's own without any project.
Can it be some permission issues somewhere in windows?
I have big problem to run activiti-explorer when i try access: http://localhost:8080/activiti-explorer/ tomcat shows me HTTP Status 404 - The requested resource is not available. I'm really don't have any idea why that dosen't work. Can you help me?
This what have I done on my PC:
I'm using 5.19.0 version of activiti-explorer
7.0.63 tomcat
JDK 1.8.0.77 (i think there is no point to downgrade java to previous versions (<=1.7) becouse my main application using this version)
I'm sure I have correctly configured environment variables (JAVA_HOME,JRE_HOME,PATH,CATALINA_HOME)
I configured data base connection (db.properties, context.xml) in activiti-explorer.war and i moved this file to tomcat/webapps
I don't have any errors about activiti during tomcat start
Check if activiti explorer is deployed to tomcat in manager.
http://{host}:{port}/manager/html
More info in https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html
Check the catalina.out log. There will be something in there that leads you to the solution.
Check Admin Console (cmd that runs behind) after hitting the link. most recent exception occurred will be displayed there.
I am using Ubuntu 14.04 and I have installed Openfire 4.1 in that and that was working fine.
But on another day when I have started openfire with following command its not working
sudo /opt/openfire/bin/openfire start
and tried to open it like htp://localhost:9090
I have also checked the status with following command
sudo /opt/openfire/bin/openfire status
and it shows : The daemon is running.
I have also followed following link to setup a Java_home : http://www.wikihow.com/Install-Oracle-Java-JRE-on-Ubuntu-Linux
So whats wrong with my openfire and how can I debug it ?
For Debugging, you should take look at the logs located under /opt/openfire/logs directory.
Check info.log, error.log for clues.
Thanks Shoaib.
I have checked error log and found the error like :
2016.03.23 10:09:37 org.jivesoftware.openfire.filetransfer.proxy.ProxyConnectionManager - Error creating server socket
java.net.BindException: Cannot assign requested address
and I think that error was due to my domain was changed.
Now we are working in one office and assigned dynamic IP to all machines, so its changing IP each and every time and thats the reason its stopped working.
I have changed by IP to previous once,which I have added at the time of installing openfire, and it works...
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.
I'm using Eclipse kepler and Tomcat v7 64 bit on my windows 7 PC. My apache tomcat was running fine but suddenly it stopped working and shows the following error
"Starting Apache Tomcat v7 at localhost has encountered a problem.
Server Apache Tomcat v7 has failed to start."
I have tried deleting the .snap file and temp0 folder in the workspace folder.
I have also tried uninstalling and re-installing apache.
i referred to the question "Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal and tried all solutions.
But all this in vain.
There is no other process running on port number 8080 or other ports.
Tomcat doesn't start only in Eclipse
Try checking the Console tab of Eclipse to get more detail of what caused the error. There are several potential problems that could produce this symptom.
On the Console tab, there will be plenty of red text for "INFO" entries in the log, but likely there will be a "SEVERE" entry that explains what happened. You may have to look down a little further because the first one may list that it is "caused by" something else.
In my case, I had refactored the name of a Servlet, but accidentally left the mapping to the old name (e.g., #WebServlet("/SavePost"). This resulted in two servlets being mapped to the same url-pattern, which caused the error:
Caused by: java.lang.IllegalArgumentException: The servlets named [forum.SavePost] and [forum.SavePost_old] are both mapped to the url-pattern [/SavePost] which is not permitted
If eclipse shows like this:
starting tomcat v7.0 server at localhost has encountered a problem port 8080. default port number of tomcat is 8080. if oracle install in your system then you need to change oracle port number. connect with user sysdba and change HTTP port number of oracle SQL command.
SQL> select dbms_xdb.gethttpport as "HTTP-Port", dbms_xdb.getftpport as "FTP-Port" from dual;
HTTP-Port FTP-Port
8080 0
Change Port HTTP and FTP.
SQL> begin
2 dbms_xdb.sethttpport('80');
3 dbms_xdb.setftpport('2100');
4 end;
5 /
SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;
HTTP-Port FTP-Port
80 2100
I used to get this error and were very frustrated because none of the answer were solving problem.
Just see the mappings of servlet this error can be because mapping are
not correct
Try this it worked for me