Archive

Archive for the ‘Uncategorized’ Category

Server FAILED_NOT_RESTARTABLE state in Oracle WebLogic Server 11g.

Today when I have go through my weblogic console I saw my one managed server in FAILED_NOT_RESTARTABLE state.
In my case after checking logs I find the following error message “weblogic.management.ManagementException: Unable to obtain lock on/u01/oid_domain/servers/wls_ods1/tmp/wls_ods1.lok. Server may already be running at weblogic.management. internal.ServerLocks. getServerLock (ServerLocks.java:159)”.

This could be because of two reasons
– WebLogic Server which you are trying to start is already running
– WebLogic Server which you are trying to start did not stop cleanly

Normally when weblogic server starts, it creates two lock files:
– $DOMAIN_HOME/servers//tmp/.lok
– $DOMAIN_HOME/servers//data/ldap/ldapfiles/EmbeddedLDAP.lok

When WebLogic server stops, it removes these two files. If you not stop server properly these lock files remains on that location and creating a problem when you attempt to start a server again and after more than one attempt your server goes in FAILED_NOT_RESTARTABLE state.

If you’ve got this issue, first identify if server is running on port configured for WebLogic Server by using netstat:
for LINUX

netstat -an | grep <WebLogic_Server_Port>

for Windows

netstat -aon | findstr <WebLogic_Server_Port>

If server is running then you should see output like this:

tcp        0      0 ::ffff:<IP>:<weblogic_port>      :::* LISTEN  

Note that there could be other process using this port (and that was my issue).

How to identify which port is configured for weblogic server?
To identify port configured for weblogic server open weblogic configuration file $DOMAIN_HOME/config/config.xml and search for listen-port, you should see entry like this:

<listen-port>7006</listen-port>

If server is not running then you can safely remove these lok files under WebLogic server. And if server is running then trying to stop it from console, backend or by killing the process id of the particular server then remove the .lok files.

Important thing to know – if this is weblogic managed server (not Admin Server) then you can safely remove entire managed server directory (including sub directories) $DOMAIN_HOME/servers/ or rename it as a backup. When you start managed server again, Admin Server will create these directories automatically.

Advertisements

How to directly download shared files from Google Drive.

Although Google Drive lets you download any Google Doc or Google Viewer files with your shared users, it is not very obvious like the Dropbox’s download button. You often have to instruct users to go to the File menu and then click Download As to download the file. This is very frustrating when you email or IM the Google Drive file link. The most common response from a user with whom you have shared a download file link is an email from Google Drive asking the you to change the sharing settings. It would have been useful if Google Drive included a “Download” button next to the “Comments” and “Share” button. Until then you would have be content with this little force download URL hack.
An example of the URL that Google Drive generates for a doc will be something similar to:

https://docs.google.com/document/d/0Ajm8mDIuTqeGdDl6LVdQeWJFTEdQQ2hfa0FXWVk2OUE/edit

To make Google Drive document downloadable you will have to know two things:
1. The file code or id, which is an 44 character alphanumeric value in the shared URL that uniquely identifies that file.
2. The desired file format. These URL and formats are specific to the Google Drive file type document.

Below is a table which show the different documents types, their download URL and their respective formats.

Non-Google doc File: https://docs.google.com/uc?id=[FILE_ID]&export=download
Format: none

Google Document: https://docs.google.com/document/d/[FILE_ID]/export?format=[FORMAT]
FORMAT: docx, odt, rtf, pdf, txt, html

Google Presentation: https://docs.google.com/presentation/d/[FILE_ID]/export?format=[FORMAT]
FORMAT: pptx, pdf, svg, png, jpg 

Google Drawings: https://docs.google.com/drawings/d/[FILE_ID]/export/[FORMAT]
FORMAT: pdf, svg, png, jpg 

Google Spreadsheet: https://docs.google.com/spreadsheet/d/[FILE_ID]/export?format=xlsx
Categories: Uncategorized Tags: ,

Coming soon…

Stay tuned 🙂

Categories: Uncategorized