Starting Websphere from Eclipse hangs when security is enabled - java
I have a Websphere Application Server 8.0.0.6, which was installed as part of RAD.
I need to run the server from an Eclipse Java EE Kepler or Luna. There is no problem when administrative security is disabled. However, once security is enabled, the server either doesn't start completely, or Ecplise is unable to to detect it.
The progress bar stops at 23%. The last message logged is "Server server1 open for e-business". The status however is still "starting". After a while I get an error complaining that the server didn't start within 300 seconds. It then tries to stop the server, and remains in "stopping" indefinitely.
The server is started, Eclipse just seems unable to see it. I can't access the admin console from within Eclipse (though I can with a browser), I can't publish or debug applications, and I can't stop the server from Eclipse.
This happens with both Kepler and Luna.
The server starts fine in RAD, or when started with the start script.
I have checked start websphere server from RAD hangs at "Server server1 open for e-business" . There is a similar question: Websphere in RAD hangs on startup, but there was no solution.
Update: The problem is the communication between Ecipse and Websphere, after Websphere has started (as wFateem also has pointed out).
Eclipse makes SOAP calls to Websphere to check the status. If administrative security is disabled in WAS, it accepts SOAP calls in plain HTTP. Once security is enabled, only HTTPS is allowed.
I checked communications between Eclipse and WAS using the TCP-Monitor built into Eclipse. With disabled security I can see the successful SOAP calls. After enabling security I expected to see just the binary SSL data. However, Eclipse was still trying to use HTTP, without any success of course.
Eclipse has a setting for the WAS server to indicate that the server is secured, and which user and password to use for the calls. It even has a flag pertaining to the SSL communication ("automatically trust server certificate during SSL handshake"). But still, it is not using SSL for some reason.
I had no problem in this scenario on my old development machine, which got replaced by my current machine a few days ago.
So, the current status is: Eclipse does not use SSL when talking to the WAS, even though it knows the server is secured.
The question now is: What did I do wrong that Eclipse does not use SSL to talk to a secured server?
I solved same problems for WebSphere 7 and Eclipse Neon.
Just run eclipse with ibm jdk 8 (type in google "ibm jdk 8 download").
My eclipse ini is
-vm
..\ibm_sdk80\jre\bin\javaw.exe
-vmargs
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
-XX:MaxPermSize=320m
-Dcom.ibm.ws.management.event.max_polling_interval=1000
-Dcom.ibm.websphere.thinclient=true
Best regards, Sergey Batsura
If you suspect problems with SSL, you could try the following workaround.
Once server is started (e.g. via command line), go to web admin console and then to: Global security > CSIv2 inbound communications and in transport section set transport to TCP-IP. Save and restart the server. This will disable SSL for RMI/IIOP connections.
Then in RAD in Server settings change Server connection types... to Manually provide connection settings and select only RMI.
Check if it will work better.
As last resort you could also try to start the server, then exit the RAD and restart the RAD again, it should detect server as already running. But it's not very useful...
it's important to modify the eclipse.ini.
First of all specifying the WebSphere -vm BEFORE -vmargs
Here are my parameters:
--launcher.XXMaxPermSize
512M
-vm
C:\IBM\WebSphere\AppServer\java\jre\bin\javaw.exe
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize=512m
-Xmx1024m
-Xshareclasses:name=IBMSDP_%u
-Xcompressedrefs
-Xquickstart
-Xgcpolicy:gencon
-Xmnx64m
-XX:+UseCompressedOops
-Dcom.ibm.ws.management.event.max_polling_interval=1000
-Dcom.ibm.websphere.thinclient=true
After the above changes, communication from eclipse to WebSphere with security enabled works without problems
I'm not too familiar with starting WAS from Eclipse. However, from the sound of it this looks like a communication issue between your IDE and the WAS server. If you're able to start the server and you get the "open for e-business" message, but Eclipse is unable to see the proper status and this only occurs when security is enabled then you need to look into how Eclipse authenticates and performs SSL handshake with the WAS server.
You can start the server without any issues, but other tasks would require authentication (stopping server, retrieving status, etc...).
You may need to retrieve the WAS server's personal certificate into Eclipse's local trust store for example.
I was experiencing the same issue when trying to start WebSphere from Eclipse Luna. Finally I was able to start it following the guidelines posted by Aleksander Kovač in an answer from developer works forum: Unable to initialize SSL connection(WASCE7)
I hope this helps!
Maybe this is a silly advise, but have you tried using WebSphere Developer Tools? They are installed on top of Eclipse, either Luna or Kepler, using P2
https://developer.ibm.com/wasdev/
Look at this web page to learn how to install the tools
http://www-01.ibm.com/support/knowledgecenter/was_beta_devtools/com.ibm.websphere.wdt.doc/topics/t_install_wdt.htm
Update the JDK in eclipse.ini file to IBM JDB 1.8 64Bit. I am using WAS 8.5.0 with Eclipse MARS.
-vm
C:/IBM/WebSphere8.5/AppServer/java_1.8_64/bin/javaw
If eclipse does not start and return code=13, then check in eclipse.ini version is 1.7
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
Note:I have already commented in Sergey's answer,but needed to update some info.
I had the similar issue (Websphere application server hung in eclipse after adding Security).
Resolved the same by adding com.ibm.ws.orb_8.5.0.jar file from your appserver/runtimes and placed it in C:\Temp\endorsed folder and specify the same in your eclipse.ini file as below.
Eg:
vmargs
Djava.endorsed.dirs=C:\Temp\endorsed
Related
Eclipse Tomcat server does not start
Situation: I installed JRE 8, and configured Tomcat 8.5 on my Eclipse Neon.3 Release (4.6.3). Problem : I added a project and the server console shows server start-up in 41935 ms. But the background process keeps showing "Starting...." This is shown in the ScreenShot below. Later, the server stops because it times out. Please help me resolve this.
I don't know how this worked, but merely restarting the PC and cleaning Eclipse's Tomcat server solved this issue. Also, if at any point of time there is a Security alert asking permission to allow Java to access Public or Private networks, check all the boxes.
This can happen if already an instance of Tomcat server is running on the port(default is 8080). Kindly run below command in command prompt netstat -ano to list down the list of process and the port they acquire that are running currently and see if there a process running on the Port that your tomcat server is trying to acquire. If yes, kill it and run the server again
had the same problem with Tomcat 7 (Liferay server), seems to be a compatibility bug in eclipse, I had to change to a lower version of eclipse.
IntelliJ, can't start simple web application: Unable to ping server at localhost:1099
I'm trying to make a simple web app in IntelliJ by following this tutorial: http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_for_Tomcat_in_IntelliJ_IDEA_12 I believe my Tomcat is installed correctly since I see the tomcat pictures when I go to http://localhost:8080/ I've followed all the steps up until the part it tells me to run index.jsp, at which point I get the error: Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: nodename nor servname provided, or not known I see this in the log: Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:1099 This 1099 comes from the JMX port in Run -> Edit Configurations. How do I fix this?
To fix this you need add your machine name in the /etc/hosts file to point to localhost(127.0.0.1). You can find your machine name by running the following command: $ hostname macbook-pro From the output above you know your hostname is "macbook-pro". Edit "/etc/hosts" file and add that name at the end of line that lists 127.0.0.1 127.0.0.1 localhost macbook-pro Save the file. Now you IntelliJ should be able to start your server.
See that the tomcat you are using is compatible with the Java version. For me the issue was Tomcat-9 required Java-8. If you have a older version of Java, you could use Tomcat-7 to test.
I added my hostname to /etc/hosts on localhost. Added JAVA_HOME but still it showed the same error. In the console, there was output: Unable to start as CATALINA_BASE contains a colon (:) character I solved the problem by going to Edit configurations -> Startup/Connection -> changing CATALINA_BASE value to the tomcat installation folder. Before that, it was CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 8.0 which can't be correct on a linux machine ;)
For those who encounter this when you just recently updated IntelliJ (In my case 2019.2). I am using JBoss server so i tried to run standalone.bat in the command line and I saw the real issue on the console. It can be different to yours, but in my case I saw: failure description: "WFLYSRV0137: No deployment content with And on that error I was able to fix this by removing the items (war or ear) inside the <deployments/> node in my standalone.xml Hope this helps for those using JBoss+IntelliJ
FYI Under certain network conditions your hostname may change or be incorrect. If you are on a mac the following will let you set your hostname fairly permanently: sudo scutil --set HostName correct-name
This appears to be a problem with the way mac is handling reading the /etc/hosts file. See for example http://youtrack.jetbrains.com/issue/IDEA-96865 Adding the hostname to the hosts file as bond described should not be required, but it does solve the problem.
My problem was that tomcat 8 and higher are not compatible with java 6. Changing to java 7 solved it.
I had similar issue when I entered very big port here: But when I corrected it to something smaller which is in offset range: Issue was resolved.
I had same problem. In "Edit Configurations.." -> "Tomcat Server" I changed JRE from "Default" to my current version with SDK directory address (like C:\Program Files\Java\jdk1.8.0_121\jre) My Tomcat version is 8.5.31
This error came to me when I configured (wrong) 3 Gb memory where there was none. IntelliJ does shows the real error message (Could not reserve enough space for object heap) in the Output frame. I was confused, and attracted by the message in the Event Log, which is to be ignored in this case.
None of the answers above worked for me. In the end I figured out it was an configuration error (I used the android SDK and not Java SDK for compilation). Got to [Right Click on Project] --> Open Module Settings --> Module --> [Dependendecies] and make sure you have configured and selected the Java SDK (not the android java sdk)
I meet this question when i use intellij 15.0,then i update to 15.02 version. after that, I edit configurations and reset the Default JRE to my own JRE.It works well for me;
I added the following VM Options and it worked for me: -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
I solve this problem adding the environment variables JAVA_HOME(C:\Program Files\Java\jdkx.x.x_xx) and JRE_HOME.
I had the same problem of "Unable to ping server at localhost:1099" while I was using intellij 2016 version. However, as soon as I upgraded it to 2017 version(Ultimate 2017.1) which is installed using "ideaIU-2017.1.exe" the problem disappeared.
I had this issue when running Tomcat 6.0.53 on Mac OS Sierra with Intellij IDEA to deploy Spring projects. This problem was solved after changing the Tomcat version to the 'tar.gz' one from official site. It seems the 'zip' one is for windows.
Setting project's SDK in IntelliJ (File > Project Structure > Project:Project SDK) worked for me
If your tomcat contains file setenv.sh ([YOUR_CATALINA_HOME]/bin/setenv.sh) it may redefine the JAVA_OPTS variable that JIdea uses to set up JMX, so you have to add them there: export JAVA_OPTS ="$JAVA_OPTS <whatever was in setenv.sh>" echo $JAVA_OPTS
Below is the error I observed : to resolve, in my case, I exit intelliJ and renamed folder ".idea" to ".idea_old" (so that I don't loose old config) and restarted intelliJ, It created a new ".idea" folder and I provided new tomcat configuration. On running tomcat this issue was removed.
On top pointing my hostname to 127.0.0.1 in hosts (just run hostname in cmd to get it) as well as doing what David GC mentioned, for me the error cleared and debugging worked when I went into the tomcat configuration and changed the debugging startup script from startup.bat (which was just my monkeying around) back to the catalina.bat start default.
I had same issue and my mistake was, I was trying to start tomcat server with incompatible version of JDK and installed Apache tomcat server. In my case I had installed JDK 7 with Apache tomcat 9. For Apache 9 JDK should be >= 8. For compatibility check this https://tomcat.apache.org/whichversion.html
For me, it was a much different solution since it was running on a virtualbox, so I had to edit the hosts file and add the virtualbox as a localhost 127.0.0.1 VirtualBox-blahblah
In windows environment just check the PATH environment variable if Oracle JRE runtime refreshed the path and put himself at the very beginning of the path. In this case even if the JAVA_HOME AND JRE_HOME points to the correct JDK, the JRE will have precedence. And this case IntelliJ will not start Tomcat instance with the mentioned error message.
If you are using java 7 then make sure you have Tomcat 7 brew install tomcat#7 and update run configuration to Tomcat 7 Tomcat 9 is working with java 8
I'm leaving an answer for the jboss user. If any of the people experiencing this error are using jboss, make sure the JBOSS_HOME location is correct.
If we have the installed the compatible tomcat version for the application JAVA jdk version, we can resolve this issue easily. In my case, when I am using Tomcat 10.1.0.M4 with JAVA JDK 1.8 I faced this issue. When I downgrade my tomcat version to 9.0.41, the issue resolved for me. You can find the compatible tomcat version for the JAVA JDK here.. http://tomcat.apache.org/whichversion.html
Setting Java Heap Space in Weblogic Server
I have my Java EE web application deployed and running in Weblogic server. If I want to set min and max arguments like this, Xms100m Xmx500m, where should I change this? Whether in Weblogic 10.0MP server (if so, where) or while building the application in IDE?
For Admin Server this can be done in $domain_home/bin/setDomainEnv.sh (most likely corresponding bat if you use Windows) script, for managed servers via Weblogic console.
If you're starting weblogic form IDE like Eclipse you can change this in Run Configuration options (JVM Arguments).
You can change it in Server Start arguments as described here: http://itbitsolutions.wordpress.com/2010/08/22/increasing-the-heap-size-of-the-jvm/ after changing, you need to restart servers to apply changes.
The environment variable USER_MEM_ARGS on WLS 12c. For instance: -Xms256m -Xmx768m -XX:MaxPermSize=256m Don't forget the MaxPermSize, or it will default and probably niet be enough.
Eclipse cannot shutdown BEA WebLogic server
I am using Eclipse Galileo and I have the BEA WebLogic Server v.10 installed. The problem that I am facing is that the server cannot be stopped anymore(running in debug mode). For example it shows the progress bar of stopping until 93% and after that it gives the message "The server cannot be stopped within timeout."; I can only restart eclipse in order to start again the server. In the console I see the message: "C:/bea1001/jrockit_150_11/bin/java -classpath C:/bea1001/wlserver_10.0/server/lib/weblogic.jar weblogic.Admin -url t3://localhost:80 -username weblogic -password 12345678 FORCESHUTDOWN AdminServer Server "AdminServer" was force shutdown successfully ..." - But it seems that something is blocking to stop the server. Can anyone tell me what I can do? p.s. I tried to delete and create a new server in the eclipse but I still have the same problem Thanks and regards, Luisa
I have found the problem: I changed the port of the BEA WebLogic to be 80 and this port was used also by Skype. I changed the port of the Skype and now the server stops Luisa
I've had the same problem and another solution may be to start Eclipse with java command (in my case Weblogic was running as java.exe, but Eclipse as javaw.exe). Also check if the same version of JDK is used for running both Weblogic and Eclipse.
Debug web application in Eclipse under Oracle Application Server
I am using Eclipse and I am familiar with Apache Tomcat. I can run/debug my web applications under Tomcat. But I can not do it for Oracle Application Server. When I try to start the server from eclipse it is beginning to start, but after 240 seconds it says that timeout is reached. Please suggest any method to debug under Oracle Application Server in Eclipse.
#user179437: you can try following things:- You can increase debug timeout setting in eclipse you can increase heap memory size by passing java parameters in debug configuration If it is windows machine, you can do netstat -a to check what is status of debug port on the machine where OAS is running. What happens to status of port when timeout happens. Just check java home configured in your eclipse and check its filesystem directory, if you are seeing any java heap dump files. If these files are created, you may see useful error information in same. Last but not least, I was having same issue in websphere 6.0 with myeclipse, then I needed to apply server latest patches which basically upgraded my JRE which resolved the issue. Please let me know if you want to know detailed explanation on any of the steps above.
Double-click on the server, and change the Start timeout in the Timeouts section.
Check the logs: - in Eclipse workspace under .metadata/.plugins/org.eclipse.wst.server.core or - in the deployment directory There must be an error or something other useful message.