Glassfish timeout - java

When a try to start glassfish from within Eclipse the following error occurs:
Unable to start server on time. java.util.concurrent.TimeoutException
And when a try to start via asadmin start-domain or asadmin start-domain domain1 it remains loading and never stops.
Anyone can help me?

Perform the following two steps:
Go to the folder where you store the Glasfish.
Example: My folder is C:\Program Files (x86)\glassfish-4.0\glassfish\bin.
Double click on startserv.bat and wait a few seconds and it will work.

I had the same problem and I solved it like the following :
try to update the GlassFish tools from the Eclipse MarketPlace, and
get the latest update , and check eclipse for any updates .
restart Eclipse , "I don't know why , but it works " .

I was facing the same issue with my Glassfish 4.0 server, I did googled but didn't worked out for me.
You can manually deploy your web application by exporting your project as .war file and then using Glassfish GUI (http://localhost:4848) deploy your application and then access it.

Open the GlassFish Server configuration by double clicking on your server instance in your server windows. You shall find a Timeout section. Expand it and increase the time limit to complete server operations in the Start section. This should work.

Related

Weblogic configuration wizard fails to start

I have the Oracle Weblogic 12.1.3 and the installation went well and the server was starting successfully. But now It fails to start for some unknown reason. It had problems with the base domain that I created in the setup. So now I'm trying to set up a new domain. But the problem is that the configuration wizard fails to start. I've tried running it with Run as Administrator but the cmd just pops up and disappears. I tried to reinstall the Weblogic server from start and even that didn't solve the problem. The part where the configuration wizard starts I got the same issue. I've also tried running it from command prompt itself but the same thing happens. I have also tried this:
config.cmd -mode=console
and in the cmd it says
Files/Microsoft went wrong this time
and also running it in "text" mode like this
config.sh -mode=console
but it fails to start. and shows the following:
What could be the problem and the fix for this? I'm running Windows 7
There was some discrepancy in the path variable of the environmental variables. Re-arranged the path values and inserted/removed quotes from some values and added that path value containing Files/Microsoft int the end(which was added by Microsoft VS Code). This solved the problem.

Could not load the Tomcat server configuration

I have installed apache tomcat7 using sudo apt get in ubuntu. I have added apache tomcat 7 to eclipse using Windows > Preferences > Server > Runtime Environment.But when I'm starting the server from server view by right clicking the shown Tomcat v7.0 Server at localhost [Stopped,Republish]
It says:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0
Server at localhost-config. The configuration may be corrupt or
incomplete.
The path to tomcat7 that I've provided is /usr/share/tomcat7
I've just been encountering a very similar issue in Ubuntu while trying to get Eclipse Mars and Tomcat7 integrated because Eclipse was expecting the tomcat configuration files etc to be all in the same location, and with the necessary permissions to be able to change those files.
The following instructions from this blog article helped me in the end:
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /var/log/tomcat7 log
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat7/conf
I've just solved this exact problem on my Ubuntu 14.04 with Eclipse Mars 2.
This could happen when Eclipse is not finding Tomcat's configuration files where they are expected to be. This place is in
$eclipse_workspace_folder/$version_of_your_tomcat_server_at_localhost/
(by default if you didn't changed server's name). So you have to copy all the files under your $tomcat_installation_folder/conf/* to the workspace server's folder.
But it was easier to just remove the server from your server list and add it again. Eclipse will automatically recreate all these files again into the proper folders. Like in the picture below:
In my case I've downloaded tomcat-8.0.35 from the website, so the configuration files needed are in /opt/apache-tomcat-8.0.35/conf/ filesystem.
Just delete the desired server from the Servers view (Window -> Show View -> Servers) and then go to Window -> Preferences -> Server -> Runtime Environment -> Add and add the server again.
You can install tomcat7 in ~/tomcat7 instead of /usr/share/tomcat7.
Close Eclipse.
Delete org.eclipse.wst.server.core.prefs and org.eclipse.jst.server.tomcat.core.prefs in {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings.
Launch Eclipse.
Go to Window->Show View->Other... and choose the Servers.
Select Tomcat v7.0 Server from the server type and press Next.
Enter /home/user/tomcat7 (not /usr/share/tomcat7) into the "Tomcat installation directory" and press Download.
Wait a few minutes and press Finish.
tomcat7 worked correctly with Eclipse 4.4 on my Ubuntu 15.04 in this way.
I know it's an old question and it has been solved already but for me the Tomcat conf/tomcat-users.xml file was created with a different encoding from the rest of the configuration files. The first line of that file looked like this:
<?xml version='1.0' encoding='cp65001'?>
All I had to do to solve the issue was change that line for:
<?xml version="1.0" encoding="UTF-8"?>
And voila.
I have no idea what 'cp65001' means or why it was created like that.
Maybe this will help other users facing the same issue.
The application is trying to load /usr/share/tomcat7/conf/ which doesn't exist. Eclipse assumes conf is in the same directory as bin
In Ubuntu, conf is placed in /etc/tomcat7/ and there is a symbolic link in /var/lib/tomcat7/.
To solve this, you can either
Download package from Apache Tomcat, and place them in a specific directory, say /opt/ or
Create a symbolic link in /usr/share/tomcat7/ pointing to /etc/tomcat7/conf
A quick solution in eclipse to resolve when Tomcat could not load as per the following error:
Just refresh the Tomcat folder should do the trick. If it still does not work, delete all files in eclipse under the Tomcat folder, re-copy the server files then refresh the Tomcat folder. Tomcat should restart correctly after that.
I have Windows 8.1, Eclipse Neon, Tomcat 8.
The solution is to copy all the files from folder ".../Tomcatxxx/conf" to the ".../Workspace_directory/Servers" and try to launch server again.
You tried to start Tomcat and got the following error:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete
How to solve:
Close Eclipse
Copy all files from TOMCAT_7_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v7.0 Server at localhost-config
Start Eclipse
Expand the Servers project, click on the Tomcat 7 project and hit F5
Start Tomcat from Eclipse
I know it's been a while since this question was posted, but I was just getting this exact error, and I have a really simple solution that MIGHT work for some. All I did was double click on the folder 'Servers', which then allowed me to start the server with no error message. Sometimes the solution is right in front of your eyes. This might work for some people like me who go straight to google without trying fix the issue themselves!
on Centos 7, this will do it, for Tomcat 7 :
(my tomcat install dir: opt/apache-tomcat-7.0.79)
mkdir /var/lib/tomcat7
cd /var/lib/tomcat7
sudo ln -s /opt/apache-tomcat-7.0.79/conf conf
mkdir /var/log/tomcat7
cd /var/log/tomcat7
sudo ln -s /opt/apache-tomcat-7.0.79/logs log
not sure the log link is necessary, the configuration is the critical one.
:
Had the same issue with Kepler (after trying to add a Tomcat 7 server).
Whilst adding the server I opted to install the Tomcat binary using the download/install feature inside Eclipse. I added the server without adding any apps. After the install I tried adding an app and got the error.
I immediately deleted the Tomcat 7 server from Eclipse then repeated the same steps to add Tomcat 7 back in (obviously skipping the download/install step as the binary was downloaded first time around).
After adding Tomcat 7 a second time I tried adding / publishing an app and it worked fine. Didn't bother with any further RCA, it started working and that was good enough for me.
I had the same problem in Eclipse Oxygen with Tomcat 8 in ubuntu 16.04 LTS.
Solution:
1. Give permission to entire tomcat folder (chmod 777 -R /Tomcat)
2. Delete and re-add the server in eclipse
3. Restart eclipse
4. Start the tomcat server. It will work..........
In the Servers tab of eclipse, go to the properties of the server and Switch location to latest downloaded tomcat version.
This resolved the issue for me.
Tomcat Server Properties
I solved this problem. DON'T USE THE .exe
Unistall Tomcat and download the .zip from Tomcat's web site. Then unpack and put it in C:\Program Files. Open Eclipse and set the server. it will work.

apache tomat7 not starting in browser?

Hi i'm using Apache Tomcat 7,with jdk 1.7 in windows 8. and i have installed tomcat successfully in windows 8,now i'm going hit URL in browser like"localhost:8080" it's work fine,after i open eclipse created web-application & i configured tomcat with that web-application,now i try to restart i'm getting error like!!
so for that,i have stopped tomcat in services(task-manger-service).now it will work fine(it get restarted in eclipse and works fine). when i hit URL in browser like"localhost:8080" i' getting error like ! and more i have added java_home,Catalina_home and also path.
can any one help me out it should work in both eclipse & browser?
First do
netstat -a -b -o
and see if ports that are configured in Eclipse Tomcat are free. If they are not free kill that process
taskkill /PID <pid>
Use /F flag if needed. You should get PID fro, netstat command. You should get Eclipse tomcat ports from Server tab of JavaEE perspective
Then start your tomcat.
PS : If you are getting 404 either you are entering incorrect URL or server is not up in the first place. In any case check the logs if you are getting 404.
Follow the below steps
Right click on your eclipse project
Select Refresh
Click the Run icon
It is not straight forward when you invoke Tomcat from within Eclipse. Please read the FAQ section at https://wiki.eclipse.org/WTP_Tomcat_FAQ
It explains how if you start Tomcat from within Eclipse, the binaries of original directories of Tomcat are used, but the web apps etc are stored separately in the Eclipse Workspace.

Liferay restart issue

I am a noob. I just downloaded the liferay with jboss 7.0.2. I had it installed on mt laptop by watching the youtube. I got it started by just using command line console. I successfully got it setup and running on the localhost. I turned off the command line console after I got it done.
Then I tried to open it one the browser by the localhost and it is not working now. Now I cant go back to the platform.
I tried to go under the cmd again and enter
{the folder}\jboss-7.0.2\bin\standalone.bat
It shows me that it was calling another file called "standalone.conf.bat"
Now my environmental variables are
JAVA_HOME C:\Program Files\Java\jdk1.7.0_04\bin
JAVA C:\Program Files\Java\jdk1.7.0_04\bin
I need to start the thing start.. please help me
If you working with Tomcat (as per your last comment), then you should go to bin/startup.bat file (windows) or startup.sh (linux).
Now :
1) If your console does not start, that means, either some problem with tomcat configuration (CATALINA_HOME variable) or java configuration (JAVA_HOME)
2) If it starts, but hangs when configuration of data (default sql scripts), then there is a problem with database configuration that you did in portal.properties file, or default HS SQL DB.
3) If it hangs somewhere else, there must be some issue with the default port of the server.
Hope this helps.

Trouble in starting my jetty server on a remote server

I have started a jetty server in my remote server. But I got problem accessing the default page. I followed the getting started steps and used the command java -jar start.jar to start the server. The port is set to 8080. When I use my Ip http://20.14.228.123:8080/ The site is never found. Do you guys have any clue of what I have done wrong? According to my terminal window it is running.
UPDATE:
sorry I ran wget localhost:8080 and connection failed it says. But I can go in to the default page though. I'm newbie in Java apps deployment, but I exported a war file on my computer and placed it under webapps in the jetty folder is that right procedure? because it don't runs. According to my web.xml in my webapp a servlet is mapped through /Push/GetContacts and when I enter the destination(http://localhost:8080/Push/GetContacts) in my web browser it don't show up?
FINAL:
Never mind I fixed it!
Can you try to run wget localhost:8080 from you server terminal? Just to check that port\ip not blocked somewhere on network layer? It must download html showed by jetty if it actually run...
Q: how do I get the jetty server to not shut down all the time after I close down the terminal?
A: start Jetty as service(process)

Categories