Tuesday, October 15, 2013

Adobe Illustrator CS5 stopped working. Reason: ScriptingSupport.aip

I just recently encountered this error "ScriptingSupport.aip" when I tried to open my Illustrator CS5. It was working before and the only changes that I've made was adding a 4th monitor in replacement of my built-in laptop display.

The previous setup:
One monitor connected in DVI DELL M4600 docking station
Two monitor connected in Toshiba Dynadock and Dynadock was connected in USB of DELL M4600 docking station
One built-in DELL M4600 laptop display
Note: On this setup, the Illustrator CS5 was working fine

The current setup:
One monitor connected in DVI DELL M4600 docking station
Two monitor connected in Toshiba Dynadock and Dynadock was connected in USB of DELL M4600 docking station
One monitor connected in VGA DELL M4600 docking station
Built-in DEll M4600 laptop display is closed
Note: On this setup, the Illustrator CS5 has stopped working

To solve the error:
Close Illustrator CS5 if it still open
Disconnect one of the monitor, in my case I disconnected the 3rd monitor because it was my new additional monitor in replacement of my built DELL M4600 monitor
Apply the settings
Open Illustrator CS5 now and it will open successfully

Monday, July 22, 2013

How to fix the vFabric Web Server Error - Permission denied: access to / because search permission are missing - Linux

Permission denied: access to /favicon.ico denied (filesystem path '/opt/myserver/vfabricws') because search permissions are missing on a component of the path

[Mon Jul 22 16:08:30 2013] [crit] [client 10.1.1.88] (13)Permission denied: DBM failure while logging transaction in mod_bmx_vhost
[Mon Jul 22 16:08:31 2013] [error] [client 10.1.1.88] (13)Permission denied: access to /index.html denied (filesystem path '/opt/myserver/vfabricws') because search permissions are missing on a component of the path
[Mon Jul 22 16:08:31 2013] [crit] [client 10.1.1.88] (13)Permission denied: DBM failure while logging transaction in mod_bmx_vhost

I noticed that after I upgrade the server from ERS to vFabric WS, I encountered an error which I stated above. I listed below on how to fix it.

How to fix the error:

Step 1) Check the user and group owner of the folder where you install the vFabric Web Server (i.e. ls -l ).
            Example:
[rhserver]$ ls –l /opt/myserver/vfabricws
drwxrwxr-x. 2 wadmin wsgrp 4096 Jul 22 17:02 vfabricws
            The vabfricws user owner is wadmin and groupowner is wsgrp

Step 2) Open your file conf/httpd.conf and look for the text User vfhttpd and Group vfhttpd or sometimes User nobody or Group nobody
            Example:
User vfhttpd
Group vfhttpd
Or
User nobody
Group nobody

Step 3) Change User for vfhttpd or nobody to wadmin, and change Group owner from vfhttpd or nobody to wsgrp
Example:
User wadmin
Group wsgrp

Step 4) Save the httpd.conf file.

Step 5) Restart your vfabric WS (i.e. sudo ./httpdctl stop; sudo ./httpdctl start;)

Now verify if you still getting an error in you error.log

Sunday, April 14, 2013

VirtualBox VDI - Compacting to save space

For Windows Only: Easy way to compact or remove your unused space of VDI and free some space in your host drive.

Do this in your VDI Guest
Step 1: Defragmenter your disk drive. Use the simple Windows Disk Defragmenter. (Be patience coz this will take a while, it probably be finished after Pass 7 or 8)

Step 2: Execute "sdelete -c " example "sdelete -c C:". If you don't have sdelete, download it from Windows Sysinternals http://technet.microsoft.com/en-us/sysinternals/bb897443 and extract it.

Step 3: Shutdown your VDI and close VirtualBox
  Note: Before going to Step 4, make sure that your VDI is shutdown

Do this in your Host
Step 4: Open a command prompt

Step 5: Change your directory to where you install VirtualBox

Step 6: Type the command "VBoxManage modifyhd --compact" example: VBoxManage modifyhd "C:\VirtualBox VDIs\MyGuest.vdi" --compact.

If you noticed that I enclosed the location of my VDI with quote because I have space between VirtualBox and VDI, if you don't have space of the location of your VDI, you can ignore double quote.

Step 7: Wait until it finished the Step 6 then you have regain some disk space.

Enjoy Virtual Box VDI compacting!!

Thursday, February 7, 2013

How to Install NodeJS in Ubuntu 12.10 from package manager?

Instruction on how to install NodeJS in Ubuntu 12.10 64bit Server

Note: Line 2 is required if you encountered an error "Command Not Found" on Line 3.
Line 1: sudo apt-get install python-software-properties python g++ make
Line 2: sudo apt-get install software-properties-common
Line 3: sudo add-apt-repository ppa:chris-lea/node.js
You are about to add the following PPA to your system:Evented I/O for V8 javascript. Node's goal is to provide an easy way to build scalable network programs
More info: https://launchpad.net/~chris-lea/+archive/node.js
Press [ENTER] to continue or ctrl-c to cancel adding it
   gpg: keyring `/tmp/tmp2xgu27/secring.gpg' created
   gpg: keyring `/tmp/tmp2xgu27/pubring.gpg' created
   gpg: requesting key C7917B12 from hkp server keyserver.ubuntu.com
   gpg: /tmp/tmp2xgu27/trustdb.gpg: trustdb created
   gpg: key C7917B12: public key "Launchpad chrislea" imported
   gpg: Total number processed: 1
   gpg:               imported: 1  (RSA: 1)
   OK
Line 4: sudo apt-get update Line 5: sudo apt-get install nodejs npm
Enjoy NodeJS!!!

Friday, December 28, 2012

Maven - How to deploy WAR to vFabric TC Server remotely using Maven build?

Four easy steps on How to deploy the WAR file to vFabric TC 2.8.* server  or Tomcat 7 remotely using Maven build (pom.xml)

Step 1: Open your tomcat-user.xml from your <CATALINA_HOME>/conf folder and insert the code:

Code:
  <?xml version="1.0" encoding="UTF-8"?>
  <tomcat-users>
     <role rolename="manager-gui" />
     <role rolename="manage-script" />
     <role rolename="manager-status" />
     <role rolename="manager-jmx" />
     <user username="adminuser" password="adminpwd" roles="manager-gui" />
  </tomcat-users>

Note: Role name script, status and jmx are optional. In previous version of tomcat, you can use role "manager" but for tomcat 7, it was divided into four role. For depolyment, we need only "manager-gui".

Step 2: Update your Maven settings.xml with the following code. To check where is your maven settings located, just open a command prompt and type maven -X and it will show the global settings and user settings. I choose global settings since I will be allowing other users to use the same settings.

Open <MAVEN_HOME>/conf/settings.xml then insert the code:

Code:
  <?xml version="1.0" encoding="UTF-8"?>
  <settings>
   <servers>
     <server>
        <id>remoteserver</id>
        <username>adminuser</username>
        <password>adminpwd</password>
     </server>
   </servers>
  </settings>


Step 3: Open your pom.xml and insert the following code

  Code:
  <plugin>
      <groupId>org.apache.tomcat.maven</groupId>
      <!-- for tomcat 6 -->
      <!--
      <artifactId>tomcat6-maven-plugin</artifactId>
      -->
      <artifactId>tomcat7-maven-plugin</artifactId>
      <configuration>
         <url>http://<remote_ip_address>:<port>/manager/html</url>
         <server>remoteserver</server>
         <path>/your_web_context_path_here</path>
      </configuration>
  </plugin>


Note: if you have a parent pom.xml you need to insert the following code to your parent pom.xml

Code:
  <plugin>
     <groupId>org.apache.tomcat.maven</groupId>
     <artifactId>tomcat7-maven-plugin</artifactId>
     <version>2.0</version>
  </plugin>


Step 4: Deploy or Redeploy
  Run maven command to deploy
  Code:
   mvn tomcat7:deploy
  For redeploy:
  Code:
   mvn tomcat7:redeploy

Wednesday, December 12, 2012

MuleSoft - Building the JKS for the HTTPS Services for ESB Standalone

After following this instruction https://docs.mulesoft.com/cloudhub/building-an-https-service to build a sample hello application. We need to replace the JKS file. Follow the instruction below:

1) Generate key with AES256
openssl genrsa -aes256 -out server.key 1024
2) Generate a Certificate Request for CA
openssl req -x509 -sha256 -new -key server.key -out server.csr
Enter pass phrase for server.key: <ENTER_YOUR_PASSWORD_YOU'VE_CREATED on STEP 1>
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) [AU]:<ENTER THE COUNTRY 2 LETTER CODE i.e. US>
State or Province Name (full name) [Some-State]:<ENTER YOUR STATE IN FULL i.e. KANSAS>
Locality Name (eg, city) []:<ENTER YOUR CITY i.e. KANSAS CITY>
Organization Name (eg, company) [Internet Widgits Pty Ltd]:<ENTER YOUR COMPANY NAME i.e. MyCompany>
Organizational Unit Name (eg, section) []:<ENTER YOUR DEPARMENT i.e. Research>
Common Name (e.g. server FQDN or YOUR name) []:<ENTER YOUR DOMAIN NAME i.e. www.mywebsite.com or localhost>
Email Address []:<LEAVE IT BLANK just PRESS ENTER>

3) Generate a self signed certificate that will expire for 360 days
openssl x509 -sha256 -days 360 -in server.csr -signkey server.key -out selfsigned.crt
Getting Private key
Enter pass phrase for server.key:<ENTER_YOUR_PASSWORD_YOU'VE CREATED on STEP 1>

4) Create PKCS12 keystore from private key and public certificate
openssl pkcs12 -export -name servercert -in selfsigned.crt -inkey server.key -out keystore.p12
Enter pass phrase for server.key:
Enter Export Password:
Verifying - Enter Export Password:

5) Convert PKCS12 keystone into a JKS Keystore
keytool -importkeystore -destkeystore keystore.jks -srckeystore keystore.p12 -srcstoretype pkcs12 -alias servercert
Enter destination keystore password:  
Re-enter new password: 
Enter source keystore password:  

6) Verify the content of the JKS
keytool -list -v -keystore keystore.jks
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: servercert
Creation date: Mar 15, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: O=Internet Widgits Pty Ltd, ST=Some-State, C=US
Issuer: O=Internet Widgits Pty Ltd, ST=Some-State, C=US
Serial number: a829076439b2c11f
Valid from: Tue Mar 15 08:31:22 CDT 2016 until: Fri Mar 10 07:31:22 CST 2017
Certificate fingerprints:
MD5:  0B:F0:2C:64:86:50:80:29:3F:41:09:80:9C:F0:FF:CA
SHA1: 8C:26:4A:4B:FA:55:49:B7:4E:FE:33:13:90:AA:6F:15:B7:A3:E6:DE
SHA256: BB:B2:7C:A2:A8:EF:F5:AE:E8:F1:2D:13:15:ED:46:F5:16:21:AF:18:9D:74:A0:AA:BE:2A:D2:55:68:27:68:D5
Signature algorithm name: SHA256withRSA
Version: 3

Extensions: 

#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 2B C6 1B 1C 65 24 F4 95   F2 46 E0 1F 07 94 B8 C9  +...e$...F......
0010: F4 25 F0 1C                                        .%..
]
[O=Internet Widgits Pty Ltd, ST=Some-State, C=US]
SerialNumber: [    a8290764 39b2c11f]
]

#2: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:2147483647
]

#3: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 2B C6 1B 1C 65 24 F4 95   F2 46 E0 1F 07 94 B8 C9  +...e$...F......
0010: F4 25 F0 1C                                        .%..
]
]
*******************************************

7) Copy the keystore.jks file to MuleSoft Project /<PROJECT>/src/main/resources

8) Run the application and invoke your HTTPS://<IP>:<PORT> using browser

Tuesday, October 30, 2012

Tips and trick

My common unix command while administering a server:

How to find text in a file:
find . -type f -exec grep -i "my string to find" {} \; -print

Find and replace text inside the file using unix
sed -e 's/OLD TEXT/NEW TEXT/' -i myfiles*