SM30 Uploader

You can use the below VBA code in Excel to upload data to the SAP SM30 Maintenance View.

You need to follow below rules:

  • Sheet name must be the same as the maintenance view name.
  • Column names must be the technical fields in the same order.
  • No data duplicates.

My Kubernetes Notes

Restart a statefulset:

kubectl rollout restart statefulset mystatefulset -n mynamespace

Scale stateful

kubectl scale statefulsets mystatefulset --replicas=2 -n mynamespace

Scale deployment

kubectl scale deployment mydeployment --replicas=2 -n mynamespace

AWS Lambda Internal Server Error

If you are getting below exception for your .Net Core 3.1 Lambda function after deploying it via web page, continue to reading reason.

Could not find the specified handler assembly with the file name ‘LambdaTest, Culture=neutral, PublicKeyToken=null’. The assembly should be located in the root of your uploaded .zip file.: LambdaException

When you create lambda function via aws web ui, it set default handler as LambdaTest::LambdaTest.LambdaHandler::handleRequest. You need to change it as your your code.

Java kullanıcı dilini değiştirmek

Eğer işletim sisteminiz Türkçe ise, java da bu ayarı otomatik olarak okuyacaktır. Özellikle toUpperCase methodunda küçük i harfini büyük İ ve toLowerCase metodunda da büyük I harfini küçük ı yapmaktadır. Reflection youluyla metodlara erişen, dinamik kod çağıran, dosya sistemine erişen kodlarda kullanılan bu metotdar hataya neden olmaktadır.

JVM’i işletim sistemindeki dil ayarından farklı bir dil ile çalıştırmak için JAVA_TOOL_OPTIONS adındaki ortam ya da sistem değişkenine -Duser.language=en değerini ekleyerek java’ın her açılışında dil ayarını değiştirmesini sağlayabilirsiniz.

Ortam değişkenlerini ayarlamak için Bilgisayarım (Thıs PC) içine girin. Boş bır alanda sağ tıklayarak Özellikler (Properties) seçeneğini seçin. Sol tarafta Gelişmiş sistem seçenekleri yer almaktadır. Bu kısma girerseniz Ortam Değişkenleri‘ni (Enviroment Variables) görebilirsiniz.

Komut oturumunda hızlıca test etmek için komut satırında aşağıdakileri uygulayarabilirsiniz. Yapmış olacağınız ayarın sadece içinde olduğunuz komut oturumu için geçerli olacağını unutmayınız. Kalıcı olması için yukarıdaki ayarı yapmalısınız.

set JAVA_TOOL_OPTIONS=-Duser.language=en
java -XshowSettings -version

Aşağıdaki gibi bir çıktı elde etmiş olmalısınız. Çıktıda Picked up bilgisi ile alınan parametreler yazılır, bir hata varsa Unrecognized option ifadesi çıkacaktır.

Picked up JAVA_TOOL_OPTIONS: -Dsuser.language=en
VM settings:
    Max. Heap Size (Estimated): 9.95G
    Using VM: OpenxJDK 64-Bit Server VM
. . .
Locale settings:
    default locale = English (United States)
    default display locale = English (United States)
    default format locale = English (United States)
    available locales = , af, af_NA, af_ZA, agq, agq_CM, ak, ak_GH,
. . .

Linux check list

Install tools for operation.

yum install nano wget epel-release

Update

If you update some packages, your config files override with new ones. You can find old files with rpm extension in same directory.

Latest Packages

Some linux distributions update their package with delay. IUS is good option for using latest package. You can get IUS package list here and install them with below command.

Install ius rpm package first:

yum install https://centos7.iuscommunity.org/ius-release.rpm

Use u suffix for Installing package from ius repo. For example use below for installing git 2.x:

yum install git2u

Postgres

Download rpm package, check this list for other versions.
wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
Install package.
rpm -i pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96-server postgresql96-contrib
/usr/pgsql-9.6/bin/postgresql96-setup initdb

Create db and user.

su postgres
createuser --interactive
createdb -O myuser mydb

Run psql for setting password to new user.

psql
ALTER USER mydbuser WITH PASSWORD 'mynewpass';
\q

Proxy

If you need proxy you can use nginx. You need give permission to nginx for accessing http resources.

setsebool httpd_can_network_connect true -P

Check nginx.log with

tail -10f /var/log/nginx/error.log

php & php-fpm

Use IUS for latest release, php72u.

Permissions overwritten after update, check /var/lib/php/fpm permissions.

Java

JRE

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jre-8u181-linux-x64.rpm"
yum localinstall jre-8u181-linux-x64.rpm

JDK

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.rpm"

Firewall

firewalld

Mount shared folder in VM

You can use below command for mount shared folder to VM guest. You need install vmware tools before use this.

/usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other