Spring Tool Suite 3.6.1 and Pivotal tc Server Developer Edition logging ignored - spring-tool-suite

I was trying to alter the logging that takes place with Pivotal tc Server Developer edition 3.0 and I found out that the java process that starts the server never reads the logging.properties file in catalina base.
I created a new Pivotal tc Server 3.0 with a new instance called diff-instance and added the bio profile. When it is finished a logging.properties file has been created in the /diff-instannce/conf folder. I started the server and stopped it and looked at the settings (F3 or open on the list of servers). It says:
configuration path:
option selected: Use tc Server installation (takes control of tc Server installation)
server path (catalina.base): /diff-instance
Then I stop the server and modify the logging.properties file and noticed that none of the changes I make to this logging.properties file seems to ever be reflected in the tc Server.
I brought in my swiss army knife the good old sysinternals tools (www.sysinternals.com) and started procmon. To my great surprise the file logging.properties file in the catalina.base conf folder is never read by the javaw.exe process (only the logging.properties in /jre/lib folder is read). That explains what I saw.
I have 3 important questions related to this:
Why is the logging.properties file never read?
Where is the method to customize the Pivotal tc Server developer edition documented? I looked at the "Getting started with Pivotal tc Server" at http://tcserver.docs.pivotal.io/index.html in the section "tc Runtime Instance Configuration Files" on page 29 and it says this file should be used. Also the "Pivotal tc Server Administration" has a whole section "Configuring Logging for tc Runtime" on page 50 that keeps on talking about this same file.
I know there is a lot of glue stuff between tc Server developer and STS. The whole thing about defining a new server and the options about kind of server locations to define as show below
are all very cool but where is the documentation for this stuff?
This page describes an older version of the tc server and how to change the logging. It also refers to the logging.properties file in catalina.base.
https://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.tc-server.2.6/admin/manual-logging.html

Did you try creating a tc server instance from the command line and alter the logging for that instance?
Were you able to get the logging working with previous versions of tc Server such as 2.9.x?
If that worked, but the logging for instance you're created via STS didn't work then I think you've uncovered a bug in Tc Server Eclipse integration code. I suspect that perhaps option for logging.properties file needs to be specified at the tc server instance creation time in the creation command somehow.
Please create a bug report for this issue here: https://issuetracker.springsource.com/browse (project: Spring Tool Suite, component: SERVER)

Actually, this was fixed by the STS group. See comment from Alex Boyko about the tc Server nightly update site http://dist.springsource.com/snapshot/TOOLS/eclipse-integration-tcserver/nightly in JIRA STS-3998. In STS 3.6.3 if you select Help/Install new software and you paste this update site and select it you should be able to install a version of the tc Server integration in STS 3.6.3 that fixes this. This should be fixed in STS 3.6.4.

Related

Blank profile name in Eclipse, Websphere Settings

I am trying to add a New Server (WebSphere Application Server 7) to Eclipse (Kelper). I have just installed WebSphere Application Server 7 on the PC but have not changed any settings yet (default settings).
In Eclipse, after New Server -> WebSphere Application Server Settings it shows me the following:
As you can see the Profile name box is empty, with no choices in the drop down box. When I click Configure profiles... I see:
At this point I am stuck. I'm guessing that I already have a profile setup in websphere, but that maybe it doesn't have write permissions yet?
What do I have to do to get this server working in Eclipse?
Based on the second image looks like you dont have any profiles. Check if you have any profiles (folders) e.g. AppSrv01 in the C:\Program files\IBM\WebSphere\AppServer\profiles.
If you have - it means that you dont have write permissions to that folder - try to run Eclipse as Administrator. Did you installed WebSphere with your user or Administrator? In general as a best practice you should avoid installing WebSphere in Program Files.
If you don't have - create it using for example Profile Management Tool - should be available in your Start menu.
You probably don't have rights, because the "Run Profile Management Tool" button should be enabled, if you would highlight WebSphere Runtime in upper table.
I have same issue.
If you install websphere in
C:\IBM\WebSphere\AppServer\profiles
instead of:
C:\Program files\IBM\WebSphere\AppServer\profiles
Then it will solve lots of configuration problems related to access.
Hope it helps
If your C:\Program files\IBM\WebSphere\AppServer\profiles dir is empty go to:
http://www-01.ibm.com/support/docview.wss?uid=swg21442487
Download the attached zip and extract it to WebSphere's bin directory and run the bat/sh.

Eclipse : Whether to select Local Or Shared File during Remote Debugging

I have made some code changes and deployed the code to Jetty Server which is located Remotely .
Accessed the application through browser and I am trying to debug a Application .
Please tell me whether i need to select the Local File Or Shared File from the Eclipse Debug Configurations .
Please see the screen shot here .
The option shown in your screenshot will not help you automatically get code deployed to your remote Jetty.
The option simply allows you to Share your launch configuration (Remote Java Application - ManageWatchlistCall) in your eclipse workspace. This will allow you to checkin the launch configuration in a versioning control system so your colleagues automatically get the sme Remote Java Application launch configuration.
in order to get new code to your remote server, there are only 2 options :
Redeploy your application on the remote server.
Hotdeploy pieces of code to the remote supported (if the server supports it)
Use Hotswap Bug Fixing (works for small fixes) (*)
(*) If you are running Java Virtual Machine (JVM) V1.4 or higher,
Eclipse supports a feature called Hotswap Bug Fixing (not available in
JVM V1.3 or lower). It allows the changing of source code during a
debugger session, which is better than exiting the application,
changing the code, recompiling, then starting another debugging
session. To use this function, simply change the code in the editor
and resume debugging.

CREDENTIAL_ERROR Starting GLASSFISH Internal Server

SOLVED - See bottom of post
Firstly, I will state that I have read all the existing posts regarding this problem and none of the suggested solutions have worked.
After upgrading eclipse to Indigo SR2 and to java 7, I was not able to start Glassfish, either embedded or separate installation.
After a week of this and because my PC was getting sluggish, I decided a full rebuild of my PC was required, so I reset the PC back to factory settings and started again.
My spec now looks like this...
Windows XP SP3 - Firewall Disabled as 3rd Party solution installed
Java 7 - jdk1.7.0_03 + jre
Eclipse Indigo SR2
hosts file...
127.0.0.1 localhost
I installed the latest Glassfish Plugin from: http://download.java.net/glassfish/eclipse/indigo
However, just as before the rebuild, when I try and start the server, I get the CREDENTIAL_ERROR.
I'm now super frustrated as I would have expected this completely clean install to just work.
I disabled the firewall, but that made no difference.
I then tried to start the embedded server manually. e.g. asadmin start-domain, and it started fine. I can stop it from Eclipse, but as soon as I try and start it again I get the CREDENTIAL_ERROR. Grrrrhhh!!!
I also spotted this entry in the eclipse .log file...
!MESSAGE GlassFish: error reading one jmx portjava.lang.NumberFormatException: For input string: "${JMX_SYSTEM_CONNECTOR_PORT}"
...which may be relevant as the final line of a verbose manual startup of the server looks like this...
[#|2012-04-09T15:33:16.625+0100|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=41;_Thre
adName=Thread-23;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://HOME:8686/jndi/rmi://HOME
:8686/jmxrmi|#]
Many thanks
Chris
SOLVED
Darn it. Just after posting this, I stumbled upon this link...
http://java.net/jira/browse/GLASSFISHPLUGINS-72
...which suggested that the Anti-Virus (not the firewall) being the culprit and lo and behold, it was. I removed port 8080 from scanning and the server fired up without a problem.
Now I need to work out if I've opened up a security hole.
UPDATE
I decided to install a separate Glassfish instance and the problem started over again. In then end I discovered that I had to disable the NOD32 HTTP Scanner entirely to allow the server to start. Re-enabling it got the CREDENTIAL_ERROR again. There didn't seem to be any configuration setting that would get around this. I'll have to fire an email off to ESET to see what they suggest.
I'm working with about the same configuration. Only my eclipse is Version: Indigo Service Release 1, and I work in an environment where it isn't allowed to disable a firewall.
In my case it helped to switch to a previous version of Java (jdk6-u30), which wasn't what I intended. So I installed the newest version of the JDK at this moment: jdk1.7.0_04, and used this as the -vm value in de eclipse.ini.
This still left some complains about a Currentversion of 1.7 when 1.6 was expected by our version of Glassfish's asadmin. Which were worked around by changing the registry back to 1.6, instead of the 1.7 version added by the installation of the jdk1.7.0_04.
After these changes I could start and stop Glassfish from within eclipse without the CREDENTIAL_ERROR.

Eclipse: Glassfish and Tomcat don't work

I have reinstalled java JDK 6.0.25,(after some problems installing java, finally succeeded). I have set paths (JAVA_HOME points to C:\Program Files\Java\jdk1.6.0_25 and in Path also added C:\Program Files\Java\jdk1.6.0_25\bin).
In eclipse I have pointed everything to this new JDK, also in servers. When I have installed Glassfish 3.1, after installation the domain wasn't created. So when I add this server in Eclipse, the domain wasn't found.
So I did extract an ZIP version of Glassfish and in Eclipse configure the server to this ZIPPED Glassfish. Also I have installed tomcat 7.0.14 again and add to eclipse but both did not work.
Main problem: When I start Tomcat or Glassfish in Eclipse they don't start. Tomcat is starting but after 45 seconds it says, that the time is run out. I have read the forums to increase starting time, I have putted it to 240 sec, but it does not work, because it pop out error in which sazs, that the port is already used by a different server.
By Glassfish, when I start it, its starting, but after few minutes gives me error: Failed to start. It looks like some ports or something is blocking this servers. I have turned off firewall also and antivirus but nothing.
I have looked all the forum about "not starting Glassfish or Tomcat" but didn't found the solution. I don't want to reinstall windows for this.
So if anyone know anything about this problem, please HELP.
Update:
I've tried to change the ports in domain.xml and checked with netstat -b (everything was established), but the server (Glassfish) didn't start. It shows an error "Server GlassFish Server Open Source Edition 3 (Java EE 6) at localhost failed to start.". I've also tried install "built in Eclipse" Glassfish from marketspace and from "Install new software" from eclipse, but it comes out with the same error. Currently, for needs I'm using XP Mode in Windows 7, there servers work, without any problems.
It seems your installation odyssey messed up your system.
But you should get it working without reinstalling Windows. Maybe the fragment of an old server installation blocks the ports Glassfish and Tomcat need for operation.
Try the following:
Check which ports your "new" servers try to access (should be something like 8080 and should be written in server logs during startup)
Use netstat -b (from cmd started with admin rights) to check which application blocks this / these ports (could be java.exe if there is an old installation still hanging)
Remove the old installation (uninstall or disable service)
Try again to start your new server(s).
Try tell to GF or TC to bind the default web listener other port than 8080, because this is a root of problem.
I doesn't know well TC, but in GF case, this is very easy. Simply edit $GLASSFISH_HOME/domains/domain1/config/domain.xml and find something similar:
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
And replace 8080 with other port (but not same with TC). In your case I could choose 8888 which is easy to remember but you can pretty sure this is differs from TC's port.
Note: Edit this file before you start GF!

Installing Tomcat 7 as Service on Windows Server 2008

I want to install my tomcat v7.0.12 as a service on my Windows 2008 Server.
On the tomcat page I found this tutorial. But there isn't a service.bat file in my installation dir.
In the service overview of WS2008 it isn't possible easily create a new service like new->service ...
To Start Tomcat7 Service :
Open cmd, go to bin directory within "Apache Tomcat 7" folder. You will see some this like C:\..\bin>
Enter above command to start the service: C:\..\bin>service.bat install. The service will get started now.
Enter above command to start tomcat7w monitory service. If you have issue with starting the tomcat7 service then remove the service with command : C:\..\bin>tomcat7 //DS//Tomcat7
Now the service will no longer exist. Try the install command again, now the service will get installed and started: C:\..\bin>tomcat7w \\MS\tomcat7w
You will see the tomcat 7 icon in the system tray. Now, the tomcat7 service and tomcat7w will start automatically when the windows get start.
You can find the solution here!
Install the service named 'Tomcat7'
C:\>Tomcat\bin\service.bat install
There is a 2nd optional parameter that lets you specify the name of the service, as displayed in Windows services.
Install the service named 'MyTomcatService'
C:\>Tomcat\bin\service.bat install MyTomcatService
Looks like now they have the bat in the zip as well
note that you can use windows sc command to do more
e.g.
sc config tomcat7 start= auto
yes the space before auto is NEEDED
I just had the same issue and could only install tomcat7 as a serivce using the "32-bit/64-bit Windows Service Installer" version of tomcat:
http://tomcat.apache.org/download-70.cgi
I have spent a couple of hours looking for the magic configuration to get Tomcat 7 running as a service on Windows Server 2008... no luck.
I do have a solution though.
My install of Tomcat 7 works just fine if I just jump into a console window and run...
C:\apache-tomcat-7.0.26\bin\start.bat
At this point another console window pops up and tails the logs
(tail meaning show the server logs as they happen).
SOLUTION
Run the start.bat file as a Scheduled Task.
Start Menu > Accessories > System Tools > Task Scheduler
In the Actions Window: Create Basic Task...
Name the task something like "Start Tomcat 7" or something that makes sense a year from now.
Click Next >
Trigger should be set to "When the computer starts"
Click Next >
Action should be set to "Start a program"
Click Next >
Program/script: should be set to the location of the startup.bat file.
Click Next >
Click Finish
IF YOUR SERVER IS NOT BEING USED: Reboot your server to test this functionality
There are a lot of answers here, but many overlook a few points. I ran into the same issue and it was likely due to a combination of being a complete neophyte when it comes to tomcat. Even more I am rather new to web servers in general. I consider myself somewhat proficient user of windows, but I guess not proficient enough. In particular I don't work with services too much.
I did not have a startup.bat or any bat files. I only downloaded the 32-bit/64-bit Windows Service Installer. The bin that is created for that download is small - only 4 files. My colleagues were surprised that I did not have a catalina.bat etc... and I was too. Only the below four files in the bin. And no %CATALINA_HOME% or %TOMCAT_HOME% etc...
bootstrap.jar
tomcat-juli.jar
Tomcat7.exe
Tomcat7w.exe
With this setup I had some frustrations as setting parameters is done via the gui widget - very helpful I might add.
So nearly all the answers I have perused were not immediately applicable as many said, "go to bin and issue the startup.bat file" I am a neophyte but not so much to not be able to look into the bin and start such a file it is existed!
For my simple purposes (again remember that I am a neophyte at tomcat and even web servers) all I wanted to do was to be able to startup and shutdown the tomcat server from a cmd prompt window. Nothing too heavy duty. I am embarrassed to say how simple it is. It is probably evident to anyone with a shred of experience with services and such.
To Start server: <Tomcat Root>/bin>Tomcat7.exe start
To Stop server: <Tomcat Root>/bin>Tomcat7.exe stop
Found here - http://crunchify.com/how-to-start-stop-apache-tomcat-server-via-command-line-setup-as-windows-service/
I did not realize there was a separate download the 64-bit Windows zip file that has a tomcat server and all the standard array of cmd line tomcat management tools. This zip file has all the common startup/shutdown scripts, batch files for windows, including catalina.bat/.sh etc... Then all the above answers make sense and are rather trivial.
Remember I am a neophyte when it comes to tomcat and web servers. It appears these two downloads are somewhat mutually exclusive in the sense that if I download and install the 32-bit/64-bit Windows Service Installer version and the 64-bit Windows zip file the startup.bat file in the 64-bit Windows zip file version will not run or interact with the 32-bit/64-bit Windows Service Installer tomcat instance. But I am not sure about this point.
Edit service.bat – Swap two lines so that they appear in following order:
if not “%JAVA_HOME%“ == ““ goto got JdkHome
if not “%JRE_HOME%“ == ““ goto got JreHome
Open cmd and run command service.bat install
Open Services and find Apache Tomcat 7.0 Tomcat7. Right click and Properties. Change its startup type to Automatic (with delay).
Reboot machine to verify if the service started automatically
its done through service.bat file in apache tomcat7
visit this blog ..
install tomcat7 on windows
I had a similar problem, there isn't a service.bat in the zip version of tomcat that I downloaded ages ago.
I simply downloaded a new 64-bit Windows zip version of tomcat from http://tomcat.apache.org/download-70.cgi and replaced my existing tomcat\bin folder with the one I just downloaded (Remember to keep a backup first!).
Start command prompt > navigate to the tomcat\bin directory > issue the command:
service.bat install
Hope that helps!