Friday, March 30, 2018

Setup that helped me test Apple Pay (on the web) from my iPhone

Problem:

I am working on integrating Apple Pay with Oracle Commerce for one of my clients. Understanding all the stuff about ApplePayJS and setting things up and making it work was one of the problems, even though Apple has a rich community and people are more than willing to respond. We always hit one road block which no one has come across and its always a trial and error to fix it. Ok now to the problem. My development was on a CentOS Linux VirtualBox VM on a Windows Machine and my testing was from an iPhone6 I own, as my MacBook was not the latest touch enabled one. The issue is iPhone doesnt allow you to edit the hosts file and there is no way to access the Vhost of the apache inside the linux VM. I tried to read a lot about this issue, and most of the solutions were just not working for me. So here is what I did.


Solution:

I was able to access local.eshop.com (assume thats my vhosts inside the Linux VM) from the Windows box by mapping it on the windows hosts file. I have also enabled http/https (80/443) port redirect configurations on the VirtualBox VM. I couldnt add DNS records on my WIFI router for the vhosts so my iPhone can understand it. So I managed to install the WProxy on my Windows box and started it and configured it to route http traffic. I connected my iPhone and Windows machine to the same WIFI (I had just one) and used the settings option for the WIFI to edit the proxy information. Here I specified the proxy details of WProxy which I started earlier on the Windows box. Now I was successfully able to access the website which was configured to run on a vhosts inside a Virtual box linux VM. There is also one another problem that has been solved by this setup. My client has dev and stage environments which are accessible over VPN but the domain isnt on the VPN DNS, so we used to have hosts entries for those as well on our windows box. Due to the necessity of this host entries it was impossible to access the dev and stage sites on apple devices. This issue is also now solved.

WProxy URL - http://imfirewall.us/WProxy.htm




Thursday, April 27, 2017

JBoss port conflict issue

Problem:

18:05:55,888 INFO  [JMXKernel] Legacy JMX core initialized
18:06:01,661 INFO  [WebService] Using RMI server codebase: http://192.168.0.105:8083/
18:06:01,974 ERROR [Naming] Could not start on port 1099
java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
        at java.net.ServerSocket.bind(ServerSocket.java:328)
        at java.net.ServerSocket.<init>(ServerSocket.java:194)
        at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)
        at org.jnp.server.Main.initBootstrapListener(Main.java:480)
        at org.jnp.server.Main.start(Main.java:427)

Solution:

I got this when I was trying to start my jboss server and in my case it was because Endeca ToolsAndFrameworks seem to have started already and was using the same port, so I just shutdown Endeca, started JBoss and it started ok, then restarted Endeca and Endeca was intelligent enough to pick a different port to avoid conflict. You can always use netstat to find which process is using the port and try and shut it down or start it after jboss. You can also start jboss with a different port - ports-01, ports-02, ports-03 etc., using the following command


run -Djboss.service.binding.set=ports-01


Thursday, January 14, 2016

UI issues with Oracle Endeca Experience Manager

Problem:

I recently fired up an Oracle Linux 6.6 VM with 2.6.32-504.el6.x86_64 kernel. Installed Oracle commerce on the same and a crowd of other necessary software on the same using my custom puppet modules. When I deployed the default CRS endeca application and ran the baseline update and then tried to just browse through experience manager @ localhost:8006 I had trouble seeing contents under the firefox frame except for the application name and home icon header.

Solution:

I knew it was related to flash and so tried to do a lot of things even though my BCC with flash worked like charm - 

1. Uninstalled and installed firefox using YUM - did not work

2. Uninstalled and installed flash plugin using YUM - did not work

3. Restarted firefox, restarted VM after every try of step1 step2 - did not work

4. YUM erase firefox and flash-plugin, restarted VM installed both - did not work

5. Thought may be its an issue with the version of Firefox/Flash plugin, tried to lookup the Oracle Commerce supported environment matrix and validated and installed the exact same versions - did not work

6. With all the above combinations - redeployed and ran baseline almost every time - did not work

7. For one last time, ran YUM erase firefox and flash-plugin, restarted VM, installed firefox and flash-plugin (latest versions - Firefox (38.5 ESR), Flash plugin (11.2.202.559)), went ahead and stopped all endeca processes - PlatformServices, ToolsAndFrameworks, CAS. Renamed the workspace/state folder from all three, and restarted all 3 services again (ToolsAndFrameworks complained about non availability of state - created an empty folder to check - and it started). Ran a fresh new endeca deploy of CRS and ran a baseline and now everything worked as expected. So the issue doesnt seem to be flash but something else but wasnt able to understand as there wasnt much information in the UI.

Monday, April 27, 2015

dgidx: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Problem:

When I tried to fire up a baseline update on my CRS Endeca application, I got the following error in my Dgidx.*.log file inside <ENDECA_BASE>/apps/CRS/logs/dgidx

dgidx: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

Solution:

First as soon as I saw this I tried to install the missing library libaio.so using my package manage (YUM on Oracle Linux)

yum install -y libaio.so

That definitely installed something but the error doesnt seem to have gone yet because I should have installed libaio as a package as against just installing the library file with a .so extension, so tried the following again and the baselineUpdate was able to get past the indexing process to deploying the index to my Authoring and Live MDEXes

yum install -y libaio


Sunday, April 26, 2015

WARNING: Unable to retrieve host 'ITLHost' associated with custom component

Problem:

When I was trying to deploy the CRS app that come with ATG11.1 on my linux box I got the following warning

WARNING: Unable to retrieve host 'ITLHost' associated with custom component 


Solution:

On looking at the Appconfig.xml and related configuration files, I found out that the warning occurred because the definition of ITLHost was happening in DataIngest.xml but it was used in WorkbenchConfig.xml which was imported before DataIngest.xml in Appconfig.xml, see below the CRS Default definition of Appconfig.xml 

  <spr:import resource="InitialSetup.xml" />
  <spr:import resource="DgraphDefaults.xml" />
  <spr:import resource="AuthoringDgraphCluster.xml" />
  <spr:import resource="LiveDgraphCluster.xml" />
  <spr:import resource="LiveAppServerCluster.xml" />
  <spr:import resource="UsageCollectionConfig.xml" />
  <spr:import resource="WorkbenchConfig.xml" />
  <spr:import resource="ReportGeneration.xml" />
  <spr:import resource="DataIngest.xml" />

  <spr:import resource="AssemblerConfig.xml" />

So changing the order of imports as follows, fixed that warning, when I tried to a new endeca deploy. See updated Appconfig.xml below..

  <spr:import resource="InitialSetup.xml" />
  <spr:import resource="DgraphDefaults.xml" />
  <spr:import resource="AuthoringDgraphCluster.xml" />
  <spr:import resource="LiveDgraphCluster.xml" />
  <spr:import resource="LiveAppServerCluster.xml" />
  <spr:import resource="UsageCollectionConfig.xml" />


  <spr:import resource="DataIngest.xml" />
  <spr:import resource="WorkbenchConfig.xml" />
  <spr:import resource="ReportGeneration.xml" />
  <spr:import resource="AssemblerConfig.xml" />

Friday, April 24, 2015

Error During BCC Deployment :: /atg/dynamo/service/jdbc/JTDataSource_production :: java.lang.IllegalStateException: Cannot delist resource, transaction has been rolled back :: Transaction timed out after 31 seconds

Problem:

I was trying to do a full deployment after setting up CA and got this error. I was using ATG 11.1 on Weblogic 12c connecting to a Oracle 12c Pluggable Database (with ojdbc7.jar) - used FakeXA as against WeblogicDS

**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production --- java.lang.IllegalStateException: Cannot delist resource, transaction has been rolled back. BEA1-346CAD26CDE45A7A06F2. xid=BEA1-346CAD26CDE45A7A06F2, status=Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 31 seconds 
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production BEA1-346CAD26CDE45A7A06F2]
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(TransactionImpl.java:1889)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at weblogic.transaction.internal.ServerTransactionImpl.delistResource(ServerTransactionImpl.java:598)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.dtm.TransactionWrapper.delistResource(TransactionWrapper.java:183)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.service.jdbc.MonitoredDataSource.connectionClosed(MonitoredDataSource.java:1383)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.service.jdbc.PooledXAConnection.close(PooledXAConnection.java:329)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.service.jdbc.PooledMonitoredConnection.close(PooledMonitoredConnection.java:312)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.adapter.gsa.GSATransaction.closeConnection(GSATransaction.java:808)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.adapter.gsa.GSAItemDescriptor.close(GSAItemDescriptor.java:2764)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:7418)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.adapter.gsa.GSARepository.addItem(GSARepository.java:1054)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.deployment.repository.RepositoryWorkerThread.deployItem(RepositoryWorkerThread.java:1128)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.deployment.repository.RepositoryWorkerThread.processMarkerForAddUpdatePhase(RepositoryWorkerThread.java:263)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.deployment.DeploymentWorkerThread.processMarkerPhase(DeploymentWorkerThread.java:562)
**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production at atg.deployment.DeploymentWorkerThread.run(DeploymentWorkerThread.java:335)

**** Error Fri Apr 24 15:30:15 UTC 2015 1429889415294 /atg/dynamo/service/jdbc/JTDataSource_production

Solution:

Changed the JTA transaction timeout from 30 to 200 and the issue got resolved.

Tuesday, April 29, 2014

Installing JDK on Oracle Linux got this error error: Failed dependencies: bin/basename is needed by jdk-2000:1.6.0_38-fcs.x86_64

Problem

I was trying to setup my Oracle Enterprise Linux docker container with JDK and ran into this problem when I tried to execute the rpm.bin file, couldnt figure out the reason after tons of searches on internet and eventually solved it as mentioned in the Solution.

bash-4.1# cp /Software/linux/java/jdk-6u38-linux-x64-rpm.bin .
bash-4.1# chmod 755 jdk-6u38-linux-x64-rpm.bin
bash-4.1# ./jdk-6u38-linux-x64-rpm.bin
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u38-linux-amd64.rpm 
  inflating: sun-javadb-common-10.6.2-1.1.i386.rpm 
  inflating: sun-javadb-core-10.6.2-1.1.i386.rpm 
  inflating: sun-javadb-client-10.6.2-1.1.i386.rpm 
  inflating: sun-javadb-demo-10.6.2-1.1.i386.rpm 
  inflating: sun-javadb-docs-10.6.2-1.1.i386.rpm 
  inflating: sun-javadb-javadoc-10.6.2-1.1.i386.rpm 
error: Failed dependencies:
    /bin/basename is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/cat is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/cp is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/gawk is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/grep is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/ln is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/ls is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/mkdir is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/mv is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/pwd is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/rm is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/sed is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/sort is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/touch is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/cut is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/dirname is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/expr is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/find is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/tail is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/tr is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /usr/bin/wc is needed by jdk-2000:1.6.0_38-fcs.x86_64
    /bin/sh is needed by jdk-2000:1.6.0_38-fcs.x86_64
Installing JavaDB
error: Failed dependencies:
    /bin/sh is needed by sun-javadb-core-10.6.2-1.1.i386

Done.
bash-4.1# 



Solution

Download the .bin file which doesnt say .rpm.bin and follow the same installation process and it just works :)

http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u38-oth-JPR


 Linux x6465.66 MB   jdk-6u38-linux-x64-rpm.bin
 Linux x6468.72 MB   jdk-6u38-linux-x64.bin