Monday, October 30, 2017

Invalid Planning Version

Now, I've seen a few errors on the SCM systems in my time. But this one really took me around a lot of corners.
It all started with a simple homogenous system copy. We were changing provider, and had to move our systems. After the migration, I did a few spot checks on the Live Cache, was it running, etc. And those simple checks were ok. But when we handed over the system to business, a simple forecasting ended my world. It started with a "livecache not accessible" error. This lead to a slew of missing parameters, missing configuration items, and authorization issues on the host. However, after several days of back-and-forth, the provider finally said "now it's working". So we tested again. Yes, live cache was now available, but the forecasting now gave an "invalid planning version". WTF ?!?


Clicking the error just took me to the S000 menu. So not much was offered in the way of help from SAP.
However, I COULD go to transaction /SAPAPO/MVM, and the planning version this time at least gave me an error:

An application error has occurred in the LiveCache

Message no. /SAPAPO/MVM075

Ok. I had something to go on... I tried to run a consistency check in /SAPAPO/OM17. And I do mean tried. It failed horribly too. Shortdump. What was that about ? So I ran the consistency check without selecting any object to test, and lo and behold, I caught a fish. 


Right, the planning versions. Here they were, plain as day. Clearing inconsistencies, quickly removed the entry not in the database. But why wouldn't the planning version load from the database ? All my checks on the Livecache said it was running ! Various SAP notes suggested restarting. I tried. No help. I even found a note that said to recreate the object manually (note 2419054), if the clearing didn't make the error go away. But I had no clue about how many objects were impacted, as I couldn't run the consistency check in its entirety. It could be a LOT of objects that required manual intervention, so I dismissed that idea for the time being. It had to be something closer to home. I needed to find the cause of the problem, not fix the symptoms.
I finally went back to LC10, and went into the monitoring. Everything looked ok, but something was fishy, it had to be. Something in the back of my head told me to check the datafiles. they were there. so I checked the tables within... And ... CRAP. They were empty.

So no wonder the livecache couldn't write to the database, or read from it. No wonder I got a shotdump when trying to read the data tables. There was just a clean database, with no imported tables. Not a single APO entry in sight. So I had my culprit. Now I just have to find out how the provider could have mucked up the restore. Not to mention, having them restore everything again.

Friday, April 28, 2017

Installing SAP content server on a windows 2012 with IIS 8.5

As I may have said once or twice before. SAP is "old" technology, and things built on legacy technology doesnt always hold up to modern times. A prime example is the Content Server, which certainly works on Windows 2012, and with IIS 8.5 You just can't install it with the installer (!!!)

Now, the problem isn't bigger than you have to do the installation manually (like we did before the installer tried to do everything for us). The major issue is that SAP has removed those installation guides, because the technology is no longer supported (Someone go smack the guy who decided to remove good, working knowledge from a knowledge database). So what you do is follow these simple steps (you may have to change the paths, depending on where you installed):

1. Install with the installer, as you normally would. Everything will look fine. But there will be no websites installed, even though you clicked the "install website".

2. Go to Internet Information Services Manager 

3. Right Click on Sites > "Add Website" to create a new Website.
- Site name  "SAP Content Server"
- port "1090"
- Physical Path "d:\sap\ContentServer"
- Application Pool > Select "DefaultAppPool"
- Click "OK"

4. Right click on the newly created website >> "Add Application"
- Alias "ContentServer"
- Application Pool > Select "AppPool_SAP Content Server"
- Physical Path "d:\sap\ContentServer"
- Click "OK"

5. Double Click on the website > Handler Mappings
- Select "ISAPI.dll" from the list >> Edit Feature Permissions
- Check the tick boxes for "Script" and "Execute"
- Click "OK"

6. Double Click on the website > Authentication
- Enable "Anonymous Authentication" (if it isn't already)
- Enable "Basic Authentication"
- Enable "Windows Authentication"

7. Double Click on the IIS Server name > ISAPI and CGI Restrictions >> Click on "Add"
- ISAPI or CGI Path "d:\sap\ContentServer"  > selecting "ContentServer.dll"
- Description "ContentServer.dll"
- Check the tick box "Allow extension path to execute"
- Click "OK"

8. Add rules to the windows firewall (ingoing port 1090 and 1095 if you are doing cache server too)

Lo and Behold: One running website with Content Server. And DO remember to set the storage somewhere you have enough space :)


As you may be able to imagine, the Cache Server .dll is very much the same steps.

Wednesday, April 26, 2017

Weird connection requests to xxxx.wdf.sap.corp in the ICM trace

Maybe you have seen one or two systems that for whatever reason fills up your wonderful log with totally useless information.
One of the more annoying ones, is when SAP accidentally leave stuff in place that should never have gone into a customer system. One of these is when you see messages like:

[Thr 139801848358656] Sat Nov 19 01:19:34 2016
[Thr 139801848358656] *** WARNING => Connection request from (8/9/0) to host: hs2086.wdf.sap.corp, service: 2000 failed (NIEHOST_UNKNOWN)
[Thr 139801848358656]  {00081aac} [icxxconn_mt.c 2108]
[Thr 139801845188352] Sat Nov 19 01:24:33 2016
[Thr 139801845188352] *** WARNING => Connection request from (7/8/0) to host: arcdev.wdf.sap.corp, service: 1080 failed (NIEHOST_UNKNOWN)
[Thr 139801845188352]  {00081abe} [icxxconn_mt.c 2108]
[Thr 139801845188352] Sat Nov 19 01:29:34 2016

These will populate your ICM logs, and clog them up forever if you dont do something about it.

Now, the smart person might quickly realize that these are http connection requests (why else would they be in the ICM ?), and you may even have guessed (either based on the name or the port) that this is a content service of some kind. But when you go to transaction OAC0, there are tonnes of SAP standard stuff in there. Which one is it that you need to get rid of ?
Well, fortunately, the answer is simple. Go to transaction CSMONITOR, fold out the "ContentServer", and keep folding out, untill you see the names of the archivelinks. (in a netweaver 7.3, it is usually named A2 and B2)
then simply go to transaction OAC0 and mark and delete these two offenders