К основному контенту

Weblogic Diagnostic Framework Run Bash Script (reboot managed server) - (bad practices)

Вообщем переодически сервер дохнет по: The WebLogic Server encountered a critical failure java.lang.OutOfMemoryError: Metaspace Reason: There is a panic condition in the server. The server is configured to exit on panic И хотя это гавно пишет типа  Reason: There is a panic condition in the server. The server is configured to exit on panic чёт ни хуя он ни куда не exit.... Вообщем т.к разбираться с тем чем он жрётся нет ни времени ни желания (оно обязательно появится)... как вариант можно приделать костыль... костыль будет заключаться в ребуте сервера при возникновении этой ошибки. Что значит для этого надо... Желания и понимание что так жить нельзя, и вообще... Делаем новый модуль называем скажем:  Reboot-OOMMetaSpace Идём в в новый модуль делаем Policy: Называем его OOM-Metaspace и говорит что это Server log: Жмём next в Configuration Policy пишем: log.logMessage.contains('java.lang.OutOfMemoryError: Metaspace'...

Microsoft Active Directory query return 1000 entries... Size limit exceeded, ldapsearch command

Есть такая херня что AD по умолчанию возвращает максимум 1000 записей.
Что бы обойти это ограничение необходимо задать pagesize для запроса

Например мы хотим вытащить cn всех пользователей т.е (objectClass=user):
ldapsearch -E pr=1000/noprompt -H ldap://lalal:389 -x -D "CN=Hellouser,OU=System Accounts,DC=lalaa,DC=ru" -w Password -b "DC=users,DC=lalaa,DC=ru" -s sub -a always -z 10000 '(objectClass=user)' cn
...........................................
...........................................
...........................................
# numResponses: 105665

# numEntries: 105556

ну соответственно без этого получаем стандартную ошибку:
ldapsearch -H ldap://lalal:389 -x -D "CN=Hellouser,OU=System Accounts,DC=lalaa,DC=ru" -w Password -b "DC=users,DC=lalaa,DC=ru" -s sub -a always -z 10000 '(objectClass=user)' cn
...........................................
...........................................
...........................................
result: 4 Size limit exceeded

# numResponses: 1004
# numEntries: 1000
# numReferences: 3

P.S
http://jeftek.com/219/avoid-changing-the-maxpagesize-ldap-query-policy/

What is MaxPageSize, and how does it affect me?

The problem at hand is, that certain LDAP clients can only receive the first 1,000 results when they make an LDAP query to Active Directory, when more results exist that satisfy the query scope.  If there are 1,200 results to be returned, the client will receive the "Size Limit Exceeded" error when the paging control is not used.
The default LDAP Policy settings for Active Directory limit the amount of results returned in a single page to 1,000 results.  So clients that do not implement paging support, will only be able to retrieve the first page of 1,000 results.
Microsoft lists MaxPageSize as:
MaxPageSize – This value controls the maximum number of objects that are returned in a single search result, independent of how large each returned object is. To perform a search where the result might exceed this number of objects, the client must specify the paged search control. This is to group the returned results in groups that are no larger than the MaxPageSize value. To summarize, MaxPageSize controls the number of objects that are returned in a single search result.
Default value: 1,000

Комментарии

Популярные сообщения из этого блога

От делать нех забавный момент. shopt

Наткнулся тут на вопрос в тесте типа: Using the rsync command, you want to mirror the directories, including any hidden files and directories within /home (not the /home directory itself) to the /backup directory. Which command accomplishes this? A. rsync -a /home /backup B. rsync -a /home/. backup C. rsync -a /home/* /backup D. rsync -a /home/? /backup Правильный ответ: B Ну и стало мне интересно почему же так.... самое забавное что я нашёл это команда shopt . По умолчанию вывод выглядит так: ~]$ shopt autocd         off cdable_vars     off cdspell         off checkhash       off checkjobs       off checkwinsize   on cmdhist         on compat31       off compat32       off compat40       off dirspell       off dotglob         off execfail       off ...

Weblogic Kerberos

Weblogic установлен на сервере budwf Домен контролер wcctst.wcc.local Клиентская винда XZ 1. Генерим keytab ktpass -princ HTTP/srv_budwf@WCC.LOCAL -mapuser srv_budwf -kvno 0 -crypto AES128-SHA1 -ptype KRB5_NT_PRINCIPAL -pass lalal_1 -out c:\temp\budwf.keytab Т.е в данном случае principal name в keytab полностью соответствует ожиданиям... C:\Users\Administrator>ktpass -princ HTTP/srv_budwf@WCC.LOCAL -mapuser srv_budwf -kv no 0 -crypto AES128-SHA1 -ptype KRB5_NT_PRINCIPAL -pass lalal_1 -out c:\temp\b udwf.keytab Targeting domain controller: wcctst.wcc.local Successfully mapped HTTP/budwf to srv_budwf. Password succesfully set! Key created. Output keytab to c:\temp\budwf.keytab: Keytab version: 0x502 keysize 55 HTTP/budwf@WCC.LOCAL ptype 1 (KRB5_NT_PRINCIPAL) vno 0 etype 0x11 (AE S128-SHA1) keylength 16 (0xbf005ae14d58153abe3eab57cf5a8260) C:\Users\Administrator>setspn -L srv_budwf Registered ServicePrincipalNames for CN=srv_budwf,CN=Users,DC=wcc,DC=local: ...

Первое в жизни...

Добрый день! В этом блоге я буду писать всякую херню про оракле... ибо в блокноте уже не помещается...