poo poo poo… everywhere

Permanent link to this article: http://devnumbertwo.com/poo-poo-poo-everywhere/

create windows service weblogic admin server

installation notes and $h!t on how to create windows service weblogic admin server…

this has been verified on weblogic 10.3.6 but i believe it will work for any 10.3.x version of weblogic.

 *** CHANGE ANY VALUES IN BLUE TO MATCH YOUR OWN VALUES

 

  1. Create a folder to keep all your windows service related files in, i created a winservices folder in my domain
    C:\oracle\user_projects\domains\devtwo_domain\winservices
  2. Create a cmd file named createAdminWinService.cmd in the winservices folder with the following contents
    echo off
    SETLOCAL
    set DOMAIN_NAME=devtwo_domain
    set USERDOMAIN_HOME=c:\oracle\user_projects\domains\devtwo_domain
    set SERVER_NAME=AdminServer
    call "c:\oracle\wlserver_10.3\server\bin\installSvc.cmd"
    ENDLOCAL
    
  3. Go to the WL_HOME\server\bin directory – in my case it’s c:\oracle\wlserver_10.3\server\bin
    Backup installSvc.cmd
    Then edit installSvc.cmd to contain the following changes

    ...
    set WL_HOME=C:\app\oracle\product\fmw\wlserver_10.3
    @rem call "%WL_HOME%\common\bin\commEnv.cmd"
    call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
    ...
    set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%;C:\oracle\user_projects\domains\devtwo_domain\winservices
    ...
    rem *** Install the service
    "%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -stopclass:ServerStopper -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%  -log:"c:\oracle\user_projects\domains\devtwo_domain\servers\AdminServer\logs\AdminServer-stdout.log"
    
  4. Create ServerStopper.java with the following contents in your winservices folder
    import java.io.File;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.Set;
    import java.util.Iterator;
    import java.rmi.RemoteException;
    import javax.naming.Context;
    import javax.management.ObjectName;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.WebLogicMBean;
    import weblogic.management.configuration.ServerMBean;
    import weblogic.management.runtime.ServerRuntimeMBean;
    import weblogic.management.runtime.ServerStates;
    import weblogic.management.WebLogicObjectName;
    public class ServerStopper {
      public static void stop() throws Exception {
        MBeanHome home = null;
        \\url of the Admin server
        String url = "t3:\\localhost:7001";
        String username = "weblogic";
        String password = "password";
        ServerRuntimeMBean serverRuntime = null;
        Set mbeanSet = null;
        Iterator mbeanIterator = null;
        try {
          \\ Set ContextClassloader to prevent assertions
          URL[] urls = { new File("\").toURL() };
          Thread.currentThread().setContextClassLoader(new
             URLClassLoader(urls));
          Environment env = new Environment();
          env.setProviderUrl(url);
          env.setSecurityPrincipal(username);
          env.setSecurityCredentials(password);
          Context ctx = env.getInitialContext();
          home = (MBeanHome)
               ctx.lookup("weblogic.management.adminhome");
          mbeanSet = home.getMBeansByType("ServerRuntime");
          mbeanIterator = mbeanSet.iterator();
          while(mbeanIterator.hasNext()) {
            serverRuntime = (ServerRuntimeMBean)mbeanIterator.next();
            if(serverRuntime.getState().equals(ServerStates.RUNNING)){
                serverRuntime.shutdown();
            }
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
    
  5. Compile the class file by opening a command prompt and performing the following
    cd C:\oracle\user_projects\domains\devtwo_domain\winservices
    set CLASSPATH=c:\wlserver_10.3\server\lib\weblogic.jar
    javac ServerStopper.java
    

    If you are working with Weblogic 12c, your weblogic.jar will be in a location something like:
    C:\wlserver_12.1\server\lib\weblogic.jar

    Note: the java class file contains some deprecated items. so you will see some warnings but it should be OK for now:
    serverstopper_deprecated

  6. Run createAdminWinService.cmd, open a command prompt as Administrator and run the file – example:
    cd c:\oracle\user_projects\domains\devtwo_domain\winservices
    createAdminWinService.cmd
  7. You should now have a service in your Windows Services a service called “beasvc domainname_AdminServer” (in later versions of Weblogic like 12c it will start with something like wlsvc – see image below)
    create windows service weblogic admin server
  8. Test the service by starting it and accessing the Weblogic Administration Console.
    Also test stopping the service through Windows Services.

Permanent link to this article: http://devnumbertwo.com/create-windows-service-weblogic-admin-server/

install ohs 12c on windows

installation notes and $h!t on how to install ohs 12c on windows

Oracle HTTP Server 12.1.2.0 (64-bit) on Windows

these steps are a compressed, much easier version of Oracle’s documentation – if you’d like to see Oracle’s version, check it out here. also note that this covers JUST the installation. for configuration of the domain, see the Oracle documentation.

 

  1. Download the OHS from http://www.oracle.com/technetwork/middleware/ias/index-091236.html
    download ohs 12c 64-bit for windows
  2. Put the downloaded zip file somewhere and unzip it. I put mines in c:\softwaretmp – you should now have a file named ohs_1212000_win64.exe
  3. Open a command prompt as Administrator
  4. Execute the exe file
    cd c:\softwaretmp
    ohs_1212000_win64.exe
  5. Feel free to change any of the inputs you see in the screenshots that follow… 
  6. Oracle HTTP Server Install
    install ohs 12c on windows
    install ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows

Permanent link to this article: http://devnumbertwo.com/install-ohs-12c-on-windows/

vaccine that fights severe doodoo

that’s right, there’s a vaccine that fights severe doodoo and even bill gates knows how important it is to get that info out there in a twitter pic. right on brotha, right on…

Permanent link to this article: http://devnumbertwo.com/vaccine-that-fights-severe-doodoo/

siebel Failed to start Core Services, Failed to create watchdog termination file

siebel Failed to start Core Services – This can occur when sourcing the siebenv.sh as root then trying as the oracle user:

[oracle@devtwo siebsrvr]$ . ./siebenv.sh
Failed to start Core Services: Failed to create watchdog termination file.
Aborted

It may be best to reboot the VM prior to doing the steps below.

  1. Backup the regss15: files in the /tmp directory, Example:
    cd /tmp
    mv regss15:123483357904896 regss15:123483357904896.bak
    mv regss15:123483357904896.pid regss15:123483357904896.pid.bak
    
  2. Login as root, change the ownership of watchdog.keepalive (or just do the entire directory)
    cd /u01/app/ses/siebsrvr/mw/.mw/core_data/devtwosblsrvr/
    chown -R oracle:oinstall .
    
  3. Try to source siebenv.sh again as oracle
    [oracle@devtwo siebsrvr]# . ./siebenv.sh

Permanent link to this article: http://devnumbertwo.com/siebel-failed-to-start-core-services/

too many open files weblogic

too many open files weblogic

too many open files weblogic

by default webLogic configures 1024 file descriptors. webLogic limits the number of open file descriptors by checking the OS limit in a shell script. 

use the following to check or increase the file descriptor limit;

get the weblogic process id

ps –ef |grep java

display the current file desc limit

pfiles processId | grep rlimit

display the hard limit (i.e. cannot be exceeded)

ulimit -Hn

display the soft limit (this can be increased up to the hard limit)

ulimit -Sn

the following can be used to increase the soft limit.

ulimit -S -n 4096

what’s weird is this doesn’t always work for me – alternatively, you can increase the soft (and hard) limit by just editing the file /etc/security/limits.conf
might look something like this

*               soft    core            4096
*               hard    nofile          4096
@student        hard    nproc           20
@faculty        soft    nproc           20
@faculty        hard    nproc           50
ftp             hard    nproc           0
@student        -       maxlogins       4
:123            hard    cpu             5000
@500:           soft    cpu             10000
600:700         hard    locks           10

Permanent link to this article: http://devnumbertwo.com/too-many-open-files-weblogic/

log your @$$ off

 

Permanent link to this article: http://devnumbertwo.com/log/

wholly cow… this skit is genius

this skit describes how i feel 5 days a week…

Permanent link to this article: http://devnumbertwo.com/wholly-cow-skit-genius/

coding drunk

it’s thursday and i’m tempted to get a head start on this practice…

 

Permanent link to this article: http://devnumbertwo.com/coding-drunk/

php…

 

Permanent link to this article: http://devnumbertwo.com/944/

Older posts «

» Newer posts