Tuesday, 17 March 2015

Apache error

Network message format error. Unable to parse browser environment or content item. Unable to parse properties. Name-value pair 'GET / HTTP/1.1' is missing an equal sign (=).

This means there are two virtualhost's with the same servername

#bearMan

WLSTException: Error occured while performing nmConnect

Connecting to Node Manager ...
Traceback (innermost last):
  File "<console>", line 1, in ?
  File "<iostream>", line 123, in nmConnect
  File "<iostream>", line 648, in raiseWLSTException
WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Access to domain 'Domain' for user 'user' denied

The solution I have is:
find this file, under your Domain Directory:

locate nm_password.properties

cd to the correct path

then
mv nm_password.properties nm_password.properties.BAK

vi nm_password.properties

username=myAdminUserName
password=MyPassword

eg:
username=weblogic
password=welcome1

This will get encrypted. To force the encryption

use wlst.sh to connect to the Domain with the new credentials.

#bearMan


Friday, 13 March 2015

XATRANS Views are not installed on this Database

Error

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error:  XATRANS Views are not installed on this Database. This is required by the OIM Schema
Action: Install view XAVIEWS as SYS user on this Database.
Refer to the Oracle Database Release Documentation for installation details.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

at oracle.sysman.assistants.rcu.backend.task.PrereqTask.execute(PrereqTask.java:76)
at oracle.sysman.assistants.rcu.backend.task.ActualTask.run(TaskRunner.java:306)
at java.lang.Thread.run(Thread.java:662)

Solution

If you dont know where the install is:

locate xaview.sql

Then:

ssh to the server
cd dbhome_1/rdbms/admin/
sqlplus / as sysdba
@xaview.sql


#bearMan

Tuesday, 10 March 2015

TablespaceFreeMB Prerequisite failure

RCU-6108:DB TablespaceFreeMB Prerequisite failure for: IDMTST_OIM
Current space is 35MB. It should be be greater than 50MB.

There are two solutions:
Set the tablespace to automatically increase in size, or increase the size.

First option:
ALTER DATABASE DATAFILE  AUTOEXTEND ON ;

Second Option:
ALTER TABLESPACE  ADD DATAFILE '' SIZE nG AUTOEXTEND ON MAXSIZE XXG;

#bearMan

Friday, 6 March 2015

Oracle Database TableSpace

View where the tablespaces are located:

select file_name from dba_data_files where tablespace_name='USERS';

View the tablespace size of a tablespace:

select sum(bytes/1024/1024/1024),sum(maxbytes/1024/1024/1024) from dba_data_files where tablespace_name='USERS';

View if the tablespace is auto extendable:

select AUTOEXTENSIBLE from dba_data_files where tablespace_name='USERS';

Explain the Database Table for Tablespace:

desc dba_data_files

#bearMan

Tuesday, 27 January 2015

Apache redirect to HTTPS


Apache redirect to HTTPS from any port / or host


RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] 

#bearMan

Friday, 23 January 2015

OEL Apache SSL

Setting up SSL, with Apache.

On a redhad based distro, we will need

  • apache (httpd)
  • mod_ssl

Getting httpd and mod_ssl 

yum install httpd mod_ssl

Creating Self Signed Certificate

Run:
cd /var/www/; openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout mysitename.key -out mysitename.crt
Generating a 2048 bit RSA private key

results:
writing new private key to 'mysitename.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:

Setting up Apache

if you dont know where your httpd.conf file is. 
locate httpd.conf

go to the directory, or edit the file.
vim /etc/httpd/conf/httpd.conf


php_admin_value engine Off
    ServerAdmin mrAwesomeVic
    DocumentRoot /var/www/html/TeamPass-2.1.22
    ErrorLog logs/test.bjorn.custom-error_log
    CustomLog logs/test.bjorn.access_log common

    SSLEngine on
    SSLCertificateFile /var/www/mysitename.crt
    SSLCertificateKeyFile /var/www/mysitename.key
#    SSLCertificateChainFile /var/www/intermediate.crt #this is only used if you have a certificate chain




   RewriteEngine on
   ReWriteCond %{SERVER_PORT} !^443$
   RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]



   RewriteEngine on
   ReWriteCond %{SERVER_PORT} !^443$
   RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

What I used for the self signed certs




#bearMan

Tuesday, 20 January 2015

Something to try, Learn in the process

XSS Attacks is a real threat.


Here is a site you can learn to do it, and as a result, as a developer, understand the threat better.

Or If you are just interested in learning how it works, learn through a "tutorial".

xss-game.appspot.com

#bearMan