Web Logic10.3.4 Server Startup Arguments in admin console not working - weblogic-10.x

We need to set up the command line argument for weblogic ,which can be given in startupWebLogoc.cmd file . But we would like to configure it in admin console. Admin console has the option to configure Node manager server start up arguments .
If i am not using node manager ,is there any option to set up server startup arguments in Admin Console.
Thanks
Vijay

Have a look at nodemanager.properties and ensure to set StartScriptEnabled to false.

Related

Set WebSphere variables via command prompt

I am not allowed to use the websphere admin console and I need to set the Websphere variable DB2_JDBC_DRIVER_PATH .
Is there a way so that I can set this variable from the command prompt itself?
version :Websphere 8.5.5.7 ( Network Deployment Edition)
You can use wsadmin + the wsadminlib.py script library from github, it has a function named "setWebSphereVariable" which is pretty straightforward.
https://github.com/wsadminlib/wsadminlib
Basics of wsadmin:
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-dist&topic=txml_script

How to start tomcat server manually

I installed tomcat 7 in my windows 7.Then ran C:\apache-tomcat-7.0.57\binstartup.bat,one window will open for 1 second and closes.when i hit http //localhost/8080 ,its not dsiplaying anything.I just checked C:\apache-tomcat-7.0.57\conf/server.xml and port is 8080.
Can somebody help on this.
Read RUNNING.txt and create C:\apache-tomcat-7.0.57\bin\setenv.bat file that sets JRE_HOME (or JAVA_HOME) path for Tomcat.
Sample from Tomcat 7 RUNNING.txt file using Java 6 JRE:
set "JRE_HOME=%ProgramFiles%\Java\jre6"
exit /b 0
You need to set Java_Home in Cataline.bat first in order to run TomCat server.
Additional Information for running project using Tomcat Server.
You can cd into the folder where tomcatXX/bin is through command line and run "run startup". So, when you , run startup on command line it tries to run script from startup.bat file, probably it crashed because port to be used by TomCat to run server is already in use. If you try to point your url to localhost:8080, if TomCat's home page appears, that would be because your server is already running. You should ideally also try to point to Windows -> Preference -> Runtime Environment. Check if Tomcat server is added in list under Server Runtime Environment window, if not try to add that server by clicking Add button, and trying to locate where Tomcat/bin is stored. If that still doesn't help, I would suggest you to also try right clicking a project on your IDE then click Run As, then click Run Configuration, it will give you option to run application using TomcatServer. List of servers will be found on left side of Run Configuration window.

How to stop/start specfic WebSphere-deployed EAR from command line?

I'm throwing a dependency jar into my exploded EAR on WebSphere app server. I need to stop/start the EAR to get WS to execute the new code. Is there a way to do this from command line?
Try running something like this:
/opt/ibm/websphere/appserver/profiles/<MyProfileName>/bin/wsadmin.sh -c "AdminControl.invoke(AdminControl.queryNames('type=ApplicationManager,process=<MyServerName>,*'),'stopApplication','MyAppName')" -lang jython
It will prompt you for a WAS Userid and password (in case you have enabled "Administrative Security") and when you enter them - provided your userid has at least been assigned the Operator Role - your application will be stopped.
In a similar way you may start the same application.
You should be able to manage that using the wsadmin command line tool provided as a part of your WAS installation. Pretty much any administration task can be scripted using this tool.
I don't know the specific command to do what you've asked but here is a link to the documentation that should help get you going.
http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftxml_script.html

How to enable JMX on tomcat7 running as Windows service?

I have googled this extensively before posting it here. I've been trying to find out a way to enable JMX Access on a Tomcat instance installed as Windows service. Its quite straightforward when Tomcat is invoked via the startup.bat script, one just needs to set the CATALINA_OPTS environment variable to something like "-Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
But how do i get the Tomcat Windows service to read these options? I tried this:
C:>tomcat\server\bin> service.bat install #install the Tomcat7 windows service
C:>tomcat\server\bin> tomcat7.exe //US//Tomcat7 ++JvmOptions "-Djava.io.tmpdir=$INSTDIR\server\temp;-XX:MaxPermSize
=256m;-Dcom.sun.management.jmxremote.port=8090;-Dcom.sun.management.jmxremote.au
thenticate=false;-Dcom.sun.management.jmxremote.ssl=false" --JvmMs 256 --JvmMx 1
024 #update the installed service using the //US switch; set tmpdir, JMX access and heap size
When i start the service from Services panel, the service fails to start and i get the following error on the logs\tomcat7-stderr-yyyy-mm-dd.log file:
yyyy-mm-dd hh:mm:ss Commons Daemon procrun stderr initialized
Error: Invalid com.sun.management.jmxremote.port number: 8090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
I don't have a Java background, am i trying to achieve something outlandish here? Please advise.
Answering my own question; turned out to be easier than i thought.
Following needs to be done, for enabling JMX access for Tomcat installed as a Windows service, that has a name "ApacheTomcatWindowsServer" for example:
Install Tomcat as Windows service, either using the command (first cd into \bin\ )
service.bat install
or your custom scripts.
Enable Apache Service Manager for the installed service using the following command:
tomcat7w.exe //MS//ApacheTomcatWindowsServer
This should start Apache Service Monitor program on your system tray. Click on its icon. select 'Configure', click on the 'Java' tab and append the following on the 'Java Options' text box, one option per line:
-Dcom.sun.management.jmxremote.port=8090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Save and exit and restart the service.
To connect to the JMX console, fire jconsole from your JDK installation, click 'New Connection', specify 'Remote Process' and enter hostname:8090.
you can also uninstall the service by
service.bat remove
then edit the service.bat and add the parameters in your StartPath and add the options
-Djavax.management.builder.initial=;-Dcom.sun.management.jmxremote.port=8090;-Dcom.sun.management.jmxremote.authenticate=false;-Dcom.sun.management.jmxremote.ssl=false
here is the sample StartPath in my file
--StartPath "C:\tomcat7\" --Startup auto --JvmOptions "-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;-Djava.rmi.server.hostname=;-Djavax.management.builder.initial=;-Dcom.sun.management.jmxremote.port=8090;-Dcom.sun.management.jmxremote.authenticate=false;-Dcom.sun.management.jmxremote.ssl=false" %JAVA_OPTS% ^
re-install the service by
service.bat install
then start Tomcat to apply changes

server not starting with NoServerDefinedException (RAD/WebSphere)

I am using RAD 7 with WebSphere 6.1, after creating a new profile and a new server I am unable to start the server. The server fails to start with this error:
ADMU0128I: Starting tool with the AppSrv03 profile ADMU3100I: Reading
configuration for server: newserver
ADMU0111E: Program exiting with
error:
com.ibm.websphere.management.exception.NoServerDefinedException: No
configuration defined for server: newserver
This implies that there is no server with the name newserver.
How did you create the profiles? If i recall correctly, if you create a standalone server profile in WAS 6.1 the name of the server is a sacred "server1".
You have to run scripts to change the name of the server from "server1" to anything meaningful. I am guessing you haven't done that.
Go to the runtimes directory of your RAD and run the command serverstatus.bat and this would list the server names for that profile (run it froom your profile's bin directory).
This should tell you the server names. Run start server from within the command line and ensure that the server runs's properly.
This is what I would do for a start to move forward
HTH
Manglu
What command are you using to start the server here? I am assuming "newserver" is the name of profile here, so you can start the server using the following command
startServer server1 -profileName newserver
If you have only one profile then you don't need to specify profile name
startServer server1

Resources