Difficulties with running the B2C Accelerator Web Front Ends - sap-commerce-cloud

I have another problem:
1 I have configured and initialised the B2C Accelerator
2. I am running the B2C Accelerator, and I can run:
The MCC;
The PCM;
The hMC;
The WCMS;
The CS Cockpit;
The Admin Cockpit;
The Report Cockpit;
The Admin Console.
3. I cannot run however, the web store front-ends for:
Apparel Site DE : http://apparel-de.local:9001/yacceleratorstorefront/
Apparel Site UK :
http://apparel-uk.local:9001/yacceleratorstorefront/
Electronics Site :
http://electronics.local:9001/yacceleratorstorefront/
For each Google Chrome returns:
“This webpage is not available
ERR_CONNECTION_TIMED_OUT”
4. Chcking my hosts file:
##
# BEGIN section for OpenVPN Client SSL sites
127.94.0.1 client.openvpn.net
127.94.0.2 openvpn-client.vpn.contiigo.net
# END section for OpenVPN Client SSL sites
# This is the DNS for apparel-de.local
127.0.0.2 apparel-de.local
127.0.0.3 apparel-uk.local
127.0.0.4 electronics.local
5. Checking my /hybris/config/localextensions.xml file…*
<hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>
<extensions>
<path dir='${HYBRIS_BIN_DIR}' autoload='false' />
<extension name='mcc' />
<extension name='backoffice' />
<extension name='commercesearchbackoffice' />
<extension name='commerceservicesbackoffice' />
<extension name='solrfacetsearchbackoffice' />
<extension name='solrserver' />
<extension name='yacceleratorcockpits' />
<extension name='yacceleratorinitialdata' />
<extension name='yacceleratorfulfilmentprocess' />
<extension name='yacceleratorstorefront' />
<extension name='yaddon' />
<extension name='ycommercewebservices' />
<extension name='electronicsstore' />
<extension name='apparelstore' />
<extension name='liveeditaddon' />
<extension name='acceleratorwebservicesaddon' />
</extensions>
</hybrisconfig>
6.Clearly there is a mis-configuration: what do I need to do configure the web store front-ends correctly?

I think in your host file all your local "sub domains" should point to the local network device 127.0.0.1 ..
I have it e.g. something like this:
127.0.0.1 b2ctelco.local financialservices.local apparel-uk.local apparel-de.local electronics.local
Another approach (the so called site parameter approach, see e.g. https://wiki.hybris.com/display/pmtelco/Using+Modulegen+to+Create+a+B2C+Telco+Setup#UsingModulegentoCreateaB2CTelcoSetup-AccessingtheStorefront ) would be to have the explicit ?site=electronics parameter at the first request to a storefront present.
This is only needed for the first request of a session (to set the BaseSite into the hybris session).
E.g.:
http://localhost:9001/yacceleratorstorefront?site=electronics
That should work for you now already without any hosts file modifications.
Hope that helps!

127.0.0.1 is always used for localhost
change all .2 .3 .4 to .1 in DNS naming system as above mentioned post.
didn't understand why u write .2 .3 .4 for DNS system

Related

Redirecting Backoffice login page to hac login page

I’m following the SAP Commerce 123 Interactive tutorial. I'm using SAP hybris 19.05.
After adding the platformbackoffice extension and executing:
ant build
ant initialize
hybrisserver.bat start
I tried to open the backoffice with this following https://localhost:9002/backoffice. The page will be redirected to https://localhost:9002/login.jsp of hac.
Can anyone help me on this?
My localextensions.xml looks like:
<!-- Hybris123SnippetStart localextensions.xml_withbackoffice -->
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
<extensions>
<path dir="${HYBRIS_BIN_DIR}" autoload="false"/>
<extension name="concerttours"/>
<extension name="platformbackoffice"/>
<!-- ext-template -->
<extension name="yempty" />
<extension name="yhacext" />
</extensions>
</hybrisconfig>
<!-- Hybris123SnippetEnd -->
I retried with the version 19.05.13, it works. The backoffice login page is displayed properly. This issue is related to 19.05.14 version.

setting and reading environment variables in IIS 10

I can not figure out how to set and read environment variables in Microsoft Internet Information Services (IIS) version 10. I have a Fast CGI app that requires environment variables. In previous versions of IIS I just set system-wide variables in the Windows "System Properties". However in IIS 10 my FCGI app isn't reading them. So my first question is if there are steps that need to be taken so that the IIS process can read system variables?
Alternatively, how do I set environment variables within IIS 10? This Microsoft site explains it but not in enough detail for me to get it working. Specifically, in what file and in which section do you put the <environmentVariables> section? The example XML and the command line example have name="Contoso" (see below) but what is that - the name of the application pool, or my FCGI app, or something else?
<applicationPools>
<add name="Contoso" managedRuntimeVersion="v4.0" managedPipelineMode="Classic">
<environmentVariables>
<add name="foo" value="bar" />
</environmentVariables>
</add>
</applicationPools>
Edit in response to Jokies Ding:
MAP22 and PROJ_LIB are the two environment variables that I need. In C:\Windows\System32\inetsrv\Config\applicationHost.config
I have:
<applicationPools>
<add name="DefaultAppPool" />
<add name=".NET v4.5 Classic" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" />
<add name=".NET v4.5" managedRuntimeVersion="v4.0" />
<add name="ASP.NET v4.0" autoStart="true" managedRuntimeVersion="v4.0" />
<applicationPoolDefaults managedRuntimeVersion="v4.0">
<processModel identityType="ApplicationPoolIdentity" />
<environmentVariables>
<add name="PROJ_LIB" value="/gdal/bin/proj6/SHARE" />
<add name="MAP22" value="/tetonwy/mapserv/main.map" />
</environmentVariables>
</applicationPoolDefaults>
</applicationPools>
and
<fastCgi>
<application fullPath="C:\gdal\bin\ms\apps\mapserv.exe">
<environmentVariables>
<environmentVariable name="MAP22" value="C:\tetonwy\mapserv\main.map" />
<environmentVariable name="PROJ_LIB" value="C:\gdal\bin\proj6\SHARE" />
</environmentVariables>
</application>
</fastCgi>
and in a cmd window the environment variables are visible
C:\>set MAP22
MAP22=C:\tetonwy\mapserv\main.map
C:\>set PROJ_LIB
PROJ_LIB=C:\gdal\bin\proj6\SHARE
So it seems like I've got the variables set all over the place but the app isn't seeing them. C:\gdal\bin\ms\apps\mapserv.exe is the FastCGI app that isn't seeing the environment variables. It's a compiled C program that I have used in previous versions of IIS.
There is an issue with MapServer not reading environment variables on Windows when used through FastCGI.
This is resolved by applying https://github.com/MapServer/MapServer/pull/6304 which will be backported to the 7.x MapServer releases.
See Environment variables ignored using FastCGI and IIS #6289 for more details.
<environmentVariables> section is displayed as a collection under specific application pool.
You could find it in IIS global configuration file C:\Windows\System32\inetsrv\config\applicationhost.config.
"Contoso" is the name of application pool.
I think read system-wide variable is still supported in IIS 10 and PHP FAST-CGI. I can get these configuration by running commandline SET in IIS PHP-CGI.
Could you post the code that you used to read the variable?
In some condition, Your application code require elevated permission. You could try to change application pool identity to local system and set Anonymous authenticated user to Application pool identity

how to configure HMC in Hybris

I am new to Hybris. I am able to configure Hybris Administration Console and access the sections by following wiki.hybris documents.
I dont find a section to configure the Hybris Management Console (HMC). I get 404 error when I access the URL http://localhost:9001/hmc. Please let me know where to find to get this URL working.
UPDATE
I am sorry for not giving enough information in my original post.
I am using Hybris Commerce Suite 5.7.0.8 and followed the steps mentioned in wiki.hybris.
I executed the following commands in CMD.
setantenv.bat
ant clean all
hybrisserver.bat
Then logged into http://localhost:9001/ using admin credentials
Under Platform--> Initialization, I initialized to recreate the new
tables.
Apart from the above, I did not do any other steps. I noticed that the extensions under HMC in Platform-->Extension, are all marked as X. Please refer to the attached image.
You are missing the hmc as part of your localextensions.xml file... see the answer at: https://stackoverflow.com/a/33110971/932201
After adding the hmc extension you have to run an update running system from the hac (or re-initialize).
Note though that the hmc is the old backoffice application, in more recent versions it had first been depracted and finally been removed.
The new backoffice application is called backoffice and its url is by default:
http://localhost:9001/backoffice
(you would also have to add the backoffice extension to your localextensions.xml file to make it available)
Good luck!
Perform the following steps :
Step 1 : Add the following main modules in localextensions.xml
<extension name="admincockpit" />
<extension name="backoffice" />
<extension name="cockpit" />
<extension name="hmc" />
<extension name="mcc" />
<extension name="platformhmc" />
Step 2: Run ant clean all
Step 3 : Run update from HAC
The hMC is usually available on http://localhost:9001/hmc (or /hmc/hybris if you don't want it opening in a pop up).
I'd suggest checking your server logs (~YOUR_HYBRIS_DIR/hybris/log/tomcat/console.log) and seeing if there's any errors in it.
Make sure you have not altered the property hmc.webroot. It should be set to /hmc by default, but you can try explicitly setting it in your local.properties file like this:
hac.webroot=/hac
hmc.webroot=/hmc
Also you need to initialize the system before you can access anything other than the HAC.
You can do this either using your browser via the HAC or using ant:
ant clean all initialize
You can read all about Hybris' initialize and update processes here:
https://wiki.hybris.com/display/release5/Initializing+and+Updating+the+hybris+Commerce+Suite
Hope this helps
In recent versions of Hybris they have introduced an installer script that sets up the basics for you. What this means though is that if you just go right ahead and simply run ant all, you will get a localextensions.xml file with almost everything disabled.
What you should do is install hybris using the installer script and one of the recipies. See here:
https://wiki.hybris.com/display/release5/Sample+Scenarios+Installation
This will generate you a decent starting configuration for what ever you want to do with hybris.
For example, when I install the recipe b2c_acc (B2C Accelerator), I get the following localextensions.xml file generated:
<hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>
<extensions>
<path dir='${HYBRIS_BIN_DIR}' autoload='false' />
<extension name='mcc' />
<extension name='backoffice' />
<extension name='commercesearchbackoffice' />
<extension name='commerceservicesbackoffice' />
<extension name='solrfacetsearchbackoffice' />
<extension name='solrserver' />
<extension name='yacceleratorcockpits' />
<extension name='yacceleratorinitialdata' />
<extension name='yacceleratorfulfilmentprocess' />
<extension name='yacceleratorstorefront' />
<extension name='yaddon' />
<extension name='ycommercewebservices' />
<extension name='electronicsstore' />
<extension name='apparelstore' />
<extension name='liveeditaddon' />
<extension name='acceleratorwebservicesaddon' />
</extensions>
</hybrisconfig>
Once you have done this, I also strongly recommend installing MySQL and using that as your database rather than the default HSQLDB approach as it is much, much faster. See here:
https://wiki.hybris.com/display/release5/MySQL
Hope this helps
Go to http://localhost:9001/mcc (log as an admin) you will find all links of your current Hybris installation.
What version of Hybris are you using ? Do you see the hmc extension when you go to the HAC ?
Edit:
With 5.7 the default localextensions.xml is mostly empty by default, you will need to run an installer like '. install.sh -r b2c_acc_plus' from your installer directory (first level of your Hybris installation)

Why can't Azure find IISConfigurator.exe in my cspkg?

I am using the Azure 2.5 SDK to upload a cspkg + cscfg to create a new web role deployment in Azure. When I do, I see the following error with status BadRequest.
{"BadRequest : The file provided is not a valid service package. Detailed error code: {0} Invalid application runtime - a runtime component is missing:/base/x64/IISConfigurator.exe."}
Where {0} is the role/project name.
However, when I inspect the contents of my cspkg file, the base/x64 directory DOES contain IISConfigurator.exe.
I also notice that the RoleModel.xml file has been modified by packaging to contain an IISConfigurator.exe task as follows:
<RoleModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CacheExtension" version="2.5.6496.10" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<Startup>
<Task commandLine="IISConfigurator.exe" executionContext="elevated" relativePath="base\x64">
<Environment>
<Variable name="_IISCONFIGURATOR_SETUP_URL_REWRITE_" value="true" />
<Variable name="_IISCONFIGURATOR_CLEAN_SERVER_ONSTARTUP_" value="true" />
<Variable name="RdModuleName" value="IISConfigurator" />
</Environment>
</Task>
So my question is: What is the real cause of this error message?
Additional possible clues:
My RoleModel.xml in the cspkg also contains:
<Property name="TargetFrameworkVersion" value="v4.5.1" />
<Property name="RoleType" value="Web" />
<Property name="Configuration" value="Debug" />
<Property name="Platform" value="AnyCPU" />
<Property name="SetConfiguration" value="Configuration=Debug" />
<Property name="SetPlatform" value="Platform=AnyCPU" />
<Property name="RoleTargetFramework" value="v4.5.1" />
<Property name="TargetRuntimeVersion" value="v4.0" />
Tim, we have seen this issue only twice, and it was with developers who had upgraded to SDK 2.5.1. We were never able to reproduce the problem and we didn't find the root cause before those developers uninstalled the Azure SDK and reinstalled SDK 2.5 which caused the issue to go away.
Can you try uninstalling and reinstalling the Azure SDK? You could also try SDK 2.6 which was just released.
I had this issue using the Azure 2.9 SDK.
I started looking in control panel and was seeing what appeared to be some double installs.
I uninstalled all 2.9 Azure components from my PC, and reinstalled the required ones. Then it all worked for me.

IISExpress Log File Location

IISExpress writes log and configuration data to pre-determined location out of the box.
The directory is an "IISExpress" directory stored in a user's Documents directory.
In the directory is stored the following folders files underneath.
Config
Logs
TraceLogFiles
The location of my home directory is on a network share, determined by group policy
Currently we are encountering scenarios where visual studio locks up when stopping debugging Silverlight applications using IIS Express.
I was looking to change the location for the log & configuration data for IISExpress to see if this fixes the problem of visual studio locking up. Is it possible to change the default location of log & config files ?
1 . By default applicationhost.config file defines following two log file locations. Here IIS_USER_HOME would be expanded as %userprofile%\documents\IISExpress\.
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" />
</siteDefaults>
You can update above directory paths to change the log file locations.
2 . If you are running IIS Express from command line, you can use '/config' switch to provide configuration file of your choice. Following link may help you http://learn.iis.net/page.aspx/870/running-iis-express-from-the-command-line/
http://www.iis.net/configreference/system.applicationhost/sites/sitedefaults
<configuration>
<system.applicationHost>
<sites>
<siteDefaults>
<logFile
logFormat="W3C"
directory="%SystemDrive%\inetpub\logs\LogFiles"
enabled="true"
/>
<traceFailedRequestsLogging
enabled="true"
directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles"
maxLogFiles="20"
/>
<limits connectionTimeout="00:01:00" />
<ftpServer serverAutoStart="true" />
<bindings>
<binding
protocol="http"
bindingInformation="127.0.0.1:8080:"
/>
</bindings>
</siteDefaults>
</sites>
</system.applicationHost>
</configuration>
I find web.config documentation is a messy. It is therefore better to provide a complete parent history than a floating snippet with the expectation that the reader naturally knows where it goes.
By default it will be in:
C:\Users\ user_name \Documents\IISExpress\Logs\

Resources