wtorek, grudnia 31, 2013
niedziela, grudnia 22, 2013
Konfiguracja CRM 2011 przez dbo.ServerSettingsProperties i dbo.DeploymentProperties
ColumnName Value
AcceptInvitationEnabled 1
ActivateNowFlyOutCookieExpireInHours 24
ActiveUserTimeWindowMinutes 60
AddLicensesEnabled 1
AddStorageEnabled 1
AggregationDataExporterDiskSpaceErrorThreshold 500
AggregationDataExporterDiskSpaceWarningThreshold 1000
AggregationDataExporterSqlCommandTimeout 600
AllowDeclarativeWorkflows 0
AllowExternalCode 1
AuthExpirationReminderEnabled 1
AuthExpirationReminderTimeInMinutes 20
BillingCallbackThresholdInMinutes 30
CrmKeyArchivalPollingIntervalInSeconds 43200
CrmKeyGeneratorPollingIntervalInSeconds 60
DbDnsEnabled 0
DifferentialDatabaseBackupIntervalInHours 3
DisableUserInfoClaim 0
EnableTwoDnsRecordsForWebApp 0
ExpireInvitationThresholdInDays 14
ExpireLoginThresholdInMinutes 30
ExpireSignupTokenThresholdInDays 365
FailoverAvailable 0
FileGrowthSize 32
FipsEnabled 0
ForceDirectWebAppDomain 0
ForceDisablePrimarySdk 0
ForceDisableSecondarySdk 0
ForceSecondaryWebAppDomain 0
FullDatabaseBackupExpirationInDays 7
FullDatabaseBackupIntervalInDays 1
GladosThrottleLimit 100
HardLimitBufferSize 5
HardLimitPercentage 150
ImportMaxAllowedFileSizeInMB 8
ImportMaxIISThreadsForUnzip 4
ImportMaxUnzipProcess 50
ImportTimeLimitOnUnzipProcessInSeconds 300
LastAccessTimeCacheFlushMinutes 60
LegacySiteAvailable 0
LicenseIdCountCheckIntervalInMinutes 5
LicenseIdCountHighWaterMark 5000
LicenseIdCountLowWaterMark 2500
LogBackupIntervalInMinutes 10
LongQueryThresholdInSeconds 15
MaxExpandCount 6
MaxNumberOfTaskPerResource 10
MaxReservedNameResetCount 5
MaxResultsPerCollection 50
MaxWaitTimeForAsyncJobsInMinutes 10
MBI_SSL_TimeToLive 24
MetadataCacheSlidingExpirationMinutes 20
MirroringPort -1
MonitoringTimerIntervalInSeconds 300
NFS_2HR_0_COMPACT_TimeToLive 2
NlbEnabled 0
NotificationsPageSize 1000
OrganizationReadyThresholdInHours 6
OrgMirroringEnabled 0
PerformanceAuditEnabled 1
PerformanceDataToKeepInDays 30
PostponeAppFabricRequestsInMinutes 0
PostViaExternalRouter 0
ProvisioningCompletionThresholdInMinutes 30
ProvisioningPollingIntervalInMinutes 1
RequestCompletionAggregationPeriodHours 24
ReservationTimeoutInMinutes 30
ReservedNamesCacheExpiryInMinutes 30
RetrievalUpperLimitWithoutPagingCookie 5000
RouterConnectionLimit 100
SecondaryDnsFailoverUpdateDelayInHours 6
ShowAuthenticationErrors 0
SignInEnabled 1
SignUpEnabled 0
SmtpPort 25
SqlErrorRetryInSeconds 10
StatisticsEnabled 0
StatisticsServiceCacheFlushInterval 4
StatisticsServiceWaitTimeMillis 300000
StorageCalculationEnabled 0
StorageNotificationThresholdPercentage 90
TraceCallStack 1
TraceEnabled 0
TraceFileSize 10
TraceRefresh -1
UpdateWaitingTasksIntervalInSeconds 30
UserInviteEnabled 1
WaitTimeForWebStoreInSeconds 25
ColumnName Value
ActivityFeedFollowLimit 100
AggregateQueryRecordLimit 500
AppUseInProcessSdk 1
AsyncItemsInMemoryHigh 50
AsyncItemsInMemoryLow 20
AsyncJobMaxExecutionTime 60
AsyncJobOrgDatabaseMaintenanceInterval 5
AsyncJobsModuloForNewJobRetrieval 8
AsyncJobsTimerFrequencyMultiplier 2
AsyncJobsToProcessAtOnce 1
AsyncJobsToReturnInSql 10
AsyncJobTimeoutLockedInterval 40
AsyncKeepAliveInterval 60
AsyncMaximumOrganizationConcurrentJobs 2
AsyncMaximumPriority 10
AsyncMaximumRetries 10
AsyncMaximumSelectInterval 60
AsyncMaximumServerConcurrentJobs 5
AsyncMaximumThreadsPercent NULL
AsyncMaximumThreadsPerCPU 5
AsyncMoveToReadyInterval 10
AsyncOverdueCoefficient 2
AsyncPriorityCoefficient 3
AsyncRetryBackoffRate NULL
AsyncScaleGroupDatabaseCleanupInterval 12
AsyncSelectInterval 5
AsyncSelectParallelism 4
AsyncStateStatusUpdateInterval 5
AsyncStateStatusUpdateMaxRetryCount 12
AsyncTimeBetweenRetries 10
AsyncTimeoutLockedInterval 30
AsyncTimeUntilLockExpires 30
AsyncUseInProcessSdk 1
AsyncWaitSubscriptionInterval 1800
AttributeValidationEnabled 1
AutomaticallyInstallDatabaseUpdates 1
AutomaticallyReprovisionLanguagePacks 1
ClaimsEnabled 0
ClaimsSessionSecurityTokenLifetime 24
CustomerUpgradeEnabled 0
DashboardMaximumControlsLimit 6
DumpChartXmlInResponse 0
DupBulkDetectBatchSize 1000
DupMatchcodeLength 1000
DupMatchcodePersistenceInterval 5
DupMaxPublishedRules 5
DupPublishAsyncPollingInterval 100
DupPublishPageSize 250
ETMAsyncCollectInterval 30
ETMEnabled 0
ETMStatisticsUpdateEnabled 0
ETMThrottlingEnabled 0
ExecuteMultipleMaxBatchSize 50
ExecuteMultipleMaxConnectionsPerServer -1
ExecuteMultiplePerOrgMaxConnectionsPerServer -1
IfdInternetAccessEnabled 0
IfdIntranetAccessEnabled 0
ImportBatchSize 1000
ImportBatchTime 1000
ImportContentBufferSize 16384
ImportCountUpdateBatchSize 10
ImportMaxColumnsAllowed 1022
ImportMaxRetryCountForDataTruncation 5
ImportParsedColumnDefaultSize 500
ImportPickListBatchSize 100
IncludeSQLParameterDataInEventLog 1
IsBeta 0
MaintenanceWindowEndTime NULL
MaintenanceWindowStartTime NULL
MapiSyncMaxConnectionsPerServer -1
MapiSyncPerOrgMaxConnectionsPerServer -1
MaxBackgroundSendEmailRequestsPerOrgPerServer -1
MaxBackgroundSendEmailRequestsPerServer -1
MessageProcessorMaximumDepth 4
MessageProcessorMinimumInactiveSeconds 3600
MetadataQueryMaxDepthOfNestedFilters 0
MinFrequencyForGoalRollupJob 24
OfflineSyncMaxConnectionsPerServer -1
OfflineSyncPerOrgMaxConnectionsPerServer -1
OnDemandRollupTimeout 10
OutlookSyncMaxConnectionsPerServer -1
OutlookSyncPerOrgMaxConnectionsPerServer -1
PagingLimit 200
RunAsyncServiceInSafeMode 0
SetMaxBufferPoolSize 1
ShowAuthenticationErrors 1
SolutionsMarketplaceEnabled 1
SqlCommandTimeout 40
SqlConnectTimeout 30
SQMEnabled 0
SystemFilterLimit -1
TotalRecordCountLimit 500
TraceCallStack 1
TraceEnabled 0
TraceFileSize 10
UserFilterLimit -1
AcceptInvitationEnabled 1
ActivateNowFlyOutCookieExpireInHours 24
ActiveUserTimeWindowMinutes 60
AddLicensesEnabled 1
AddStorageEnabled 1
AggregationDataExporterDiskSpaceErrorThreshold 500
AggregationDataExporterDiskSpaceWarningThreshold 1000
AggregationDataExporterSqlCommandTimeout 600
AllowDeclarativeWorkflows 0
AllowExternalCode 1
AuthExpirationReminderEnabled 1
AuthExpirationReminderTimeInMinutes 20
BillingCallbackThresholdInMinutes 30
CrmKeyArchivalPollingIntervalInSeconds 43200
CrmKeyGeneratorPollingIntervalInSeconds 60
DbDnsEnabled 0
DifferentialDatabaseBackupIntervalInHours 3
DisableUserInfoClaim 0
EnableTwoDnsRecordsForWebApp 0
ExpireInvitationThresholdInDays 14
ExpireLoginThresholdInMinutes 30
ExpireSignupTokenThresholdInDays 365
FailoverAvailable 0
FileGrowthSize 32
FipsEnabled 0
ForceDirectWebAppDomain 0
ForceDisablePrimarySdk 0
ForceDisableSecondarySdk 0
ForceSecondaryWebAppDomain 0
FullDatabaseBackupExpirationInDays 7
FullDatabaseBackupIntervalInDays 1
GladosThrottleLimit 100
HardLimitBufferSize 5
HardLimitPercentage 150
ImportMaxAllowedFileSizeInMB 8
ImportMaxIISThreadsForUnzip 4
ImportMaxUnzipProcess 50
ImportTimeLimitOnUnzipProcessInSeconds 300
LastAccessTimeCacheFlushMinutes 60
LegacySiteAvailable 0
LicenseIdCountCheckIntervalInMinutes 5
LicenseIdCountHighWaterMark 5000
LicenseIdCountLowWaterMark 2500
LogBackupIntervalInMinutes 10
LongQueryThresholdInSeconds 15
MaxExpandCount 6
MaxNumberOfTaskPerResource 10
MaxReservedNameResetCount 5
MaxResultsPerCollection 50
MaxWaitTimeForAsyncJobsInMinutes 10
MBI_SSL_TimeToLive 24
MetadataCacheSlidingExpirationMinutes 20
MirroringPort -1
MonitoringTimerIntervalInSeconds 300
NFS_2HR_0_COMPACT_TimeToLive 2
NlbEnabled 0
NotificationsPageSize 1000
OrganizationReadyThresholdInHours 6
OrgMirroringEnabled 0
PerformanceAuditEnabled 1
PerformanceDataToKeepInDays 30
PostponeAppFabricRequestsInMinutes 0
PostViaExternalRouter 0
ProvisioningCompletionThresholdInMinutes 30
ProvisioningPollingIntervalInMinutes 1
RequestCompletionAggregationPeriodHours 24
ReservationTimeoutInMinutes 30
ReservedNamesCacheExpiryInMinutes 30
RetrievalUpperLimitWithoutPagingCookie 5000
RouterConnectionLimit 100
SecondaryDnsFailoverUpdateDelayInHours 6
ShowAuthenticationErrors 0
SignInEnabled 1
SignUpEnabled 0
SmtpPort 25
SqlErrorRetryInSeconds 10
StatisticsEnabled 0
StatisticsServiceCacheFlushInterval 4
StatisticsServiceWaitTimeMillis 300000
StorageCalculationEnabled 0
StorageNotificationThresholdPercentage 90
TraceCallStack 1
TraceEnabled 0
TraceFileSize 10
TraceRefresh -1
UpdateWaitingTasksIntervalInSeconds 30
UserInviteEnabled 1
WaitTimeForWebStoreInSeconds 25
ColumnName Value
ActivityFeedFollowLimit 100
AggregateQueryRecordLimit 500
AppUseInProcessSdk 1
AsyncItemsInMemoryHigh 50
AsyncItemsInMemoryLow 20
AsyncJobMaxExecutionTime 60
AsyncJobOrgDatabaseMaintenanceInterval 5
AsyncJobsModuloForNewJobRetrieval 8
AsyncJobsTimerFrequencyMultiplier 2
AsyncJobsToProcessAtOnce 1
AsyncJobsToReturnInSql 10
AsyncJobTimeoutLockedInterval 40
AsyncKeepAliveInterval 60
AsyncMaximumOrganizationConcurrentJobs 2
AsyncMaximumPriority 10
AsyncMaximumRetries 10
AsyncMaximumSelectInterval 60
AsyncMaximumServerConcurrentJobs 5
AsyncMaximumThreadsPercent NULL
AsyncMaximumThreadsPerCPU 5
AsyncMoveToReadyInterval 10
AsyncOverdueCoefficient 2
AsyncPriorityCoefficient 3
AsyncRetryBackoffRate NULL
AsyncScaleGroupDatabaseCleanupInterval 12
AsyncSelectInterval 5
AsyncSelectParallelism 4
AsyncStateStatusUpdateInterval 5
AsyncStateStatusUpdateMaxRetryCount 12
AsyncTimeBetweenRetries 10
AsyncTimeoutLockedInterval 30
AsyncTimeUntilLockExpires 30
AsyncUseInProcessSdk 1
AsyncWaitSubscriptionInterval 1800
AttributeValidationEnabled 1
AutomaticallyInstallDatabaseUpdates 1
AutomaticallyReprovisionLanguagePacks 1
ClaimsEnabled 0
ClaimsSessionSecurityTokenLifetime 24
CustomerUpgradeEnabled 0
DashboardMaximumControlsLimit 6
DumpChartXmlInResponse 0
DupBulkDetectBatchSize 1000
DupMatchcodeLength 1000
DupMatchcodePersistenceInterval 5
DupMaxPublishedRules 5
DupPublishAsyncPollingInterval 100
DupPublishPageSize 250
ETMAsyncCollectInterval 30
ETMEnabled 0
ETMStatisticsUpdateEnabled 0
ETMThrottlingEnabled 0
ExecuteMultipleMaxBatchSize 50
ExecuteMultipleMaxConnectionsPerServer -1
ExecuteMultiplePerOrgMaxConnectionsPerServer -1
IfdInternetAccessEnabled 0
IfdIntranetAccessEnabled 0
ImportBatchSize 1000
ImportBatchTime 1000
ImportContentBufferSize 16384
ImportCountUpdateBatchSize 10
ImportMaxColumnsAllowed 1022
ImportMaxRetryCountForDataTruncation 5
ImportParsedColumnDefaultSize 500
ImportPickListBatchSize 100
IncludeSQLParameterDataInEventLog 1
IsBeta 0
MaintenanceWindowEndTime NULL
MaintenanceWindowStartTime NULL
MapiSyncMaxConnectionsPerServer -1
MapiSyncPerOrgMaxConnectionsPerServer -1
MaxBackgroundSendEmailRequestsPerOrgPerServer -1
MaxBackgroundSendEmailRequestsPerServer -1
MessageProcessorMaximumDepth 4
MessageProcessorMinimumInactiveSeconds 3600
MetadataQueryMaxDepthOfNestedFilters 0
MinFrequencyForGoalRollupJob 24
OfflineSyncMaxConnectionsPerServer -1
OfflineSyncPerOrgMaxConnectionsPerServer -1
OnDemandRollupTimeout 10
OutlookSyncMaxConnectionsPerServer -1
OutlookSyncPerOrgMaxConnectionsPerServer -1
PagingLimit 200
RunAsyncServiceInSafeMode 0
SetMaxBufferPoolSize 1
ShowAuthenticationErrors 1
SolutionsMarketplaceEnabled 1
SqlCommandTimeout 40
SqlConnectTimeout 30
SQMEnabled 0
SystemFilterLimit -1
TotalRecordCountLimit 500
TraceCallStack 1
TraceEnabled 0
TraceFileSize 10
UserFilterLimit -1
czwartek, grudnia 19, 2013
Wielowątkowość MS CRM Web
Po ustawieniu liczby wątków roboczych dla endpointu HTTP > 1 zaczynają pojawiać się błędy typu:
The Sandbox SDK Listener failed to start.
Source: w3wp.exe (19396)
Endpoint: net.tcp://localhost/CrmSandboxSdkListener-w3wp
Error: System.ServiceModel.AddressAlreadyInUseException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the URI is already registered with the service.
Wyjaśnienia Microsoftu są dwa:
http://support.microsoft.com/kb/2785590
http://support.microsoft.com/kb/2833575,
jedno przeczące drugiemu. Albo usługa .NET jest wielowątkowa albo nie jest. W praktyce wygląda to tak, że CRM Web nie jest napisane w sposób bezpieczny dla wielu wątków i przy używaniu wielu workerów co jakiś czas jeden z nich przestaje komunikować się z IIS-em i zostaje zabity. Widać to po stronie klienta jako reset połączenia TCP/IP.
The Sandbox SDK Listener failed to start.
Source: w3wp.exe (19396)
Endpoint: net.tcp://localhost/CrmSandboxSdkListener-w3wp
Error: System.ServiceModel.AddressAlreadyInUseException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the URI is already registered with the service.
Wyjaśnienia Microsoftu są dwa:
http://support.microsoft.com/kb/2785590
http://support.microsoft.com/kb/2833575,
jedno przeczące drugiemu. Albo usługa .NET jest wielowątkowa albo nie jest. W praktyce wygląda to tak, że CRM Web nie jest napisane w sposób bezpieczny dla wielu wątków i przy używaniu wielu workerów co jakiś czas jeden z nich przestaje komunikować się z IIS-em i zostaje zabity. Widać to po stronie klienta jako reset połączenia TCP/IP.
środa, grudnia 11, 2013
Call external BW process in mapper
Problem: Consider many records of entity A where enrichment needs process call for every record, decomposition before call and composition after call. This may impose serious performance hit.
Solution: Construct Java Custom Function calling Java Event Starter using LinkedBlockingQueue. Static XPath function pushes container with String argument and another LinkedBlockingQueue for response. Java Event Starter receives container, executes actions using argument and pushes response to container's LinkedBlockingQueue.
Solution: Construct Java Custom Function calling Java Event Starter using LinkedBlockingQueue. Static XPath function pushes container with String argument and another LinkedBlockingQueue for response. Java Event Starter receives container, executes actions using argument and pushes response to container's LinkedBlockingQueue.
BW Smart KeyValue Cache pattern
Problem: Consider entity A with field codeName and A' with fields codeName, name. Between A and A' there is key-value enrichment for codeName-name using dictionary D. Map Data activity for 1000+ A records using D with 1000+ records is very slow due to sequential scan on D.codeName. For-each mapping uses non-indexed access to D.codeName.
Solution: Create Java Custom Function control with functions: addMapping(String container, String key, String value), String getMapping(String container, String key), clearMapping. They will use private final static ConcurrentHashMap<String,ConcurrentHashMap<String,String>> for storing key-value associations.
Solution: Create Java Custom Function control with functions: addMapping(String container, String key, String value), String getMapping(String container, String key), clearMapping. They will use private final static ConcurrentHashMap<String,ConcurrentHashMap<String,String>> for storing key-value associations.
poniedziałek, grudnia 09, 2013
Apache HTTPClient 4.3 + NTLM
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import org.apache.http.Header; import org.apache.http.auth.AuthScope; import org.apache.http.auth.NTCredentials; import org.apache.http.client.AuthCache; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.CredentialsProvider; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.client.BasicAuthCache; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy; import org.apache.http.impl.client.DefaultServiceUnavailableRetryStrategy; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicHeader; public class HttpClientWrapper { private static HttpClientBuilder cb = null; public final static synchronized void initClientBuilder(int requestTimeout, int retryCount, int retryTimeout) { if (cb==null) { cb = HttpClientBuilder.create(); cb.setConnectionReuseStrategy(DefaultConnectionReuseStrategy.INSTANCE); cb.setKeepAliveStrategy(DefaultConnectionKeepAliveStrategy.INSTANCE); cb.setServiceUnavailableRetryStrategy(new DefaultServiceUnavailableRetryStrategy(retryCount, retryTimeout)); RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(requestTimeout) .setConnectionRequestTimeout(requestTimeout).build(); cb.setDefaultRequestConfig(requestConfig); } } private static HashMap<String,HttpClientContext> contextCache = new HashMap<String, HttpClientContext>(); private static HashMap<String,CloseableHttpClient> clientCache = new HashMap<String, CloseableHttpClient>(); public static synchronized void setAuthContext(String cookie, String user, String pass, String domain) { if (contextCache.get(cookie) == null) { CredentialsProvider credsProvider = new BasicCredentialsProvider(); credsProvider.setCredentials( new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM, "ntlm"), new NTCredentials(user, pass, "localhost", domain)); AuthCache authCache = new BasicAuthCache(); HttpClientContext context = HttpClientContext.create(); context.setCredentialsProvider(credsProvider); context.setAuthCache(authCache); contextCache.put(cookie, context); } } public static synchronized CloseableHttpClient getClient(String cookie) { CloseableHttpClient cli = clientCache.get(cookie); if (cli==null) { cli = cb.build(); clientCache.put(cookie, cli); } return cli; } public final static String requestReply(String cookie, String fullUrl, final String verb, String payload, final String payloadType) throws ClientProtocolException, IOException { CloseableHttpClient cli = getClient(cookie); HttpUriRequest httpRequest = null; if ("GET".equalsIgnoreCase(verb)) { httpRequest = new HttpGet(fullUrl); } else { HttpPost post = new HttpPost(fullUrl) { @Override public String getMethod() { return verb; } }; if (payload != null) { final byte[] content = payload.getBytes("UTF-8"); post.setEntity(new AbstractHttpEntity() { @Override public void writeTo(OutputStream outputstream) throws IOException { outputstream.write(content); } @Override public boolean isStreaming() { return false; } @Override public boolean isRepeatable() { return false; } @Override public long getContentLength() { return content.length; } @Override public Header getContentType() { return new BasicHeader("Content-Type", payloadType); } @Override public InputStream getContent() throws IOException, IllegalStateException { return new ByteArrayInputStream(content); } }); } httpRequest = post; } CloseableHttpResponse response = cli.execute(httpRequest, contextCache.get(cookie)); ByteArrayOutputStream baos = new ByteArrayOutputStream(); response.getEntity().writeTo(baos); return baos.toString("UTF-8"); } public final static void main(String[] args) throws Exception, Exception { initClientBuilder(60000, 3, 3000); setAuthContext("GET", "jan.kowalski", "passw0rd", "ENTERPRISE"); System.out.println(requestReply("GET", "https://crm-test/XRMServices/2011/OrganizationData.svc/AccountSet", "GET", null, null) ); } }
Server certificate 33:65:50:08:79:ad:73:e2:30:b9:e0:1d:0d:7f:ac:91 rejected
Certyfikat Thawte DV SSL CA (36:12:22:96:c5:e3:38:a5:20:a1:d2:5f:4c:d7:09:54) wystawiony jest przez:
E = premium-server@thawte.com
CN = Thawte Premium Server CA
OU = Certification Services Division
O = Thawte Consulting cc
L = Cape Town
S = Western Cape
C = ZA
A ten z kolei przez:
CN = thawte Primary Root CA
OU = (c) 2006 thawte, Inc. - For authorized use only
OU = Certification Services Division
O = thawte, Inc.
C = US
Ten drugi jest w dwóch wersjach z tym samym DN ale o różnych numerach seryjnych:
34:4e:d5:57:20:d5:ed:ec:49:f4:2f:ce:37:db:2b:6d (self signed) i 33:65:50:08:79:ad:73:e2:30:b9:e0:1d:0d:7f:ac:91 (podpisany przez Thawte Premium Server CA).
Pierwsza wersja jest w zaufanych certyfikatach Windows, druga nie. Jakim cudem komunikacja SSL w Windows się waliduje względem złego certyfikatu nadrzędnego? Nie powinna. Tymczasem w Javie słusznie nie działa i trzeba zaimportować prawidłowy certyfikat.
E = premium-server@thawte.com
CN = Thawte Premium Server CA
OU = Certification Services Division
O = Thawte Consulting cc
L = Cape Town
S = Western Cape
C = ZA
A ten z kolei przez:
CN = thawte Primary Root CA
OU = (c) 2006 thawte, Inc. - For authorized use only
OU = Certification Services Division
O = thawte, Inc.
C = US
Ten drugi jest w dwóch wersjach z tym samym DN ale o różnych numerach seryjnych:
34:4e:d5:57:20:d5:ed:ec:49:f4:2f:ce:37:db:2b:6d (self signed) i 33:65:50:08:79:ad:73:e2:30:b9:e0:1d:0d:7f:ac:91 (podpisany przez Thawte Premium Server CA).
Pierwsza wersja jest w zaufanych certyfikatach Windows, druga nie. Jakim cudem komunikacja SSL w Windows się waliduje względem złego certyfikatu nadrzędnego? Nie powinna. Tymczasem w Javie słusznie nie działa i trzeba zaimportować prawidłowy certyfikat.
Kernel 3.8.13 od Oracle-a dla RHEL 6.5
http://public-yum.oracle.com/public-yum-ol6.repo
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/
Btrfs send-receive wreszcie dostępne.
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/
Btrfs send-receive wreszcie dostępne.
Ubuntu 13.10 sleep vs hibernation
vi /etc/pm/config.d/00-use-suspend-hybrid
--Insert--
if [ "$METHOD" = "suspend" ]; then
METHOD="hibernate"
fi
HIBERNATE_MODE=suspend
SLEEP_MODULE=uswsusp
PM_HIBERNATE_DELAY=210
HIBERNATE_RESUME_POST_VIDEO=yes
vi /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
--Edit--
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
--Insert--
if [ "$METHOD" = "suspend" ]; then
METHOD="hibernate"
fi
HIBERNATE_MODE=suspend
SLEEP_MODULE=uswsusp
PM_HIBERNATE_DELAY=210
HIBERNATE_RESUME_POST_VIDEO=yes
vi /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
--Edit--
[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
niedziela, grudnia 08, 2013
Jak działa kryzys
Zmniejszenie obrotów, pogorszenie płynności finansowej, a przez to zmniejszenie dostępności towarów i tak cyklicznie w dół. Dlatego ważne jest bieżące prowadzenie raportów i odpowiednie reagowanie. Jednak niektóre przedsięwzięcia daje się uratować.
W okresie największej świetności warszawski oddział Znaku mieścił się na Poznańskiej :) a kolejki na parterze były tak duże że trzeba było otworzyć dla klientów pierwsze piętro.
piątek, listopada 22, 2013
Promieniowanie kosmiczne i temperatura
Promieniowanie kosmiczne i temperatura mają wpływ na błędy w komórkach pamięci RAM i pamięci podręcznej procesora. Rzecz oczywista, teraz zmierzona.
Configure Tibco EMS provider for JBoss EAP 5.x
Put jms.jar and tibjms.jar to lib/endorsed.
Add into server/default/deploy/messaging/jms-ds.xml:
Write MDB:
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName = "destination", propertyValue = "testQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "java:/DefaultEMSProvider"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "user"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "pass"),
@ActivationConfigProperty(propertyName = "DLQUser", propertyValue = "user"),
@ActivationConfigProperty(propertyName = "DLQPassword", propertyValue = "pass")
},
mappedName = "testQueue")
public class TestQueue implements MessageListener {
public TestQueue() {}
public void onMessage(Message message) {
System.out.println(message+"");
}
}
/** see org.jboss.resource.adapter.jms.inflow.JmsActivationSpec for all properties **/
And you've got it:
10:39:37,064 INFO [STDOUT] TextMessage={ Header={ JMSMessageID={ID:EMS-TEST.D965 28614F411790C:7} JMSDestination={Queue[testQueue]} JMSReplyTo={null} JMSDelivery Mode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Fri Nov 22 10:39:36 CET 2013} JMSExpiration={0} JMSPriority={4} } Properties={ } Text={2013-11-22T10:39:37.028+01:00} }
Add into server/default/deploy/messaging/jms-ds.xml:
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.messaging:service=JMSProviderLoader,name=EMSProvider">
<attribute name="ProviderName">DefaultEMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<attribute name="FactoryRef">ConnectionFactory</attribute>
<attribute name="QueueFactoryRef">QueueConnectionFactory</attribute>
<attribute name="TopicFactoryRef">TopicConnectionFactory</attribute>
<attribute name="Properties">
java.naming.security.principal=admin
java.naming.security.credentials=Adm1n
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
java.naming.factory.url.pkgs=com.tibco.tibjms.naming
java.naming.provider.url=tibjmsnaming://tb-dev2.dc2:7222
</attribute>
</mbean>
In tibemsadmin execute:create queue queue/DLQ create queue testQueue commit
Write MDB:
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;
@MessageDriven(
activationConfig = {
@ActivationConfigProperty(propertyName = "destination", propertyValue = "testQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "java:/DefaultEMSProvider"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "user"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "pass"),
@ActivationConfigProperty(propertyName = "DLQUser", propertyValue = "user"),
@ActivationConfigProperty(propertyName = "DLQPassword", propertyValue = "pass")
},
mappedName = "testQueue")
public class TestQueue implements MessageListener {
public TestQueue() {}
public void onMessage(Message message) {
System.out.println(message+"");
}
}
/** see org.jboss.resource.adapter.jms.inflow.JmsActivationSpec for all properties **/
And you've got it:
10:39:37,064 INFO [STDOUT] TextMessage={ Header={ JMSMessageID={ID:EMS-TEST.D965 28614F411790C:7} JMSDestination={Queue[testQueue]} JMSReplyTo={null} JMSDelivery Mode={PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Fri Nov 22 10:39:36 CET 2013} JMSExpiration={0} JMSPriority={4} } Properties={ } Text={2013-11-22T10:39:37.028+01:00} }
środa, listopada 20, 2013
Standalone JBoss Messaging JMS client with EAP 5.1.0 jars
commons-logging.jar
concurrent.jar
javassist.jar
jboss-aop-client.jar
jboss-client.jar
jboss-common-core.jar
jboss-ha-client.jar
jboss-ha-legacy-client.jar
jboss-javaee.jar
jboss-logging-jdk.jar
jboss-logging-log4j.jar
jboss-logging-spi.jar
jboss-main-client.jar
jboss-messaging-client.jar
jboss-metadata.jar
jboss-mdr.jar
jboss-remoting.jar
jboss-security-spi.jar
jboss-serialization.jar
jbossall-client.jar
jbosscx-client.jar
jbossjts-integration.jar
jbossjts.jar
jnp-client.jar
log4j.jar
logkit.jar
policy.jar
scout.jar
slf4j-api.jar
slf4j-jboss-logging.jar
trove.jar
concurrent.jar
javassist.jar
jboss-aop-client.jar
jboss-client.jar
jboss-common-core.jar
jboss-ha-client.jar
jboss-ha-legacy-client.jar
jboss-javaee.jar
jboss-logging-jdk.jar
jboss-logging-log4j.jar
jboss-logging-spi.jar
jboss-main-client.jar
jboss-messaging-client.jar
jboss-metadata.jar
jboss-mdr.jar
jboss-remoting.jar
jboss-security-spi.jar
jboss-serialization.jar
jbossall-client.jar
jbosscx-client.jar
jbossjts-integration.jar
jbossjts.jar
jnp-client.jar
log4j.jar
logkit.jar
policy.jar
scout.jar
slf4j-api.jar
slf4j-jboss-logging.jar
trove.jar
wtorek, listopada 19, 2013
TDI can measure XML tree creation times per node
New build of TDI in profiler mode measures creation times per XML tree node. Presented time is an average with nanosecond accuracy, with given nesting level in XML tree.
środa, listopada 06, 2013
Tibco flow tuning for high throughput
The most important settings are RAM, MaxJobs/FlowLimit, Engine.ThreadCount, HTTP Response Thread Pool size (type can be set to single for savings) and JMS MaxSessions (in client ack mode).
MaxSessions and MaxJobs should be equal per process, the same is true for correlated MaxJobs and HTTP Thread Pool. Engine.ThreadCount should be 10-20% greater than sum of FlowLimits, HTTP threads. When components are stacked every following should have FlowLimit exceeding previous by at least 20% (consider BW engine restarts and backlog). You can decrease RAM usage by tweaking XML namespaces usage (prefixes defined in process namespace registry should match prefixes used in activities, to get rid of redundant namespace declarations on every node you can 'exclude prefixes' from XML roots).
Interesting case is with huge volume of large messages (~1000 per second, > 100KB) handled by different processes of various duration: resource utilization is high and every process starter is flow controlled. When flow control kicks in it closes JMS receiver, it usually has got prefetched messages inside a session and all work for fetching them is lost and repeated by other receiver. Now, the default receive time unit is 1 second, which is not enough under heavy load. So, we've got the same messages floating and stuck between server and BW process. Overall performance is degraded very much. The solution is to disable prefetch and increase JMS receiver timeout. Described case can be traced with 'show consumers full' within tibemsadmin console.
MaxSessions and MaxJobs should be equal per process, the same is true for correlated MaxJobs and HTTP Thread Pool. Engine.ThreadCount should be 10-20% greater than sum of FlowLimits, HTTP threads. When components are stacked every following should have FlowLimit exceeding previous by at least 20% (consider BW engine restarts and backlog). You can decrease RAM usage by tweaking XML namespaces usage (prefixes defined in process namespace registry should match prefixes used in activities, to get rid of redundant namespace declarations on every node you can 'exclude prefixes' from XML roots).
Interesting case is with huge volume of large messages (~1000 per second, > 100KB) handled by different processes of various duration: resource utilization is high and every process starter is flow controlled. When flow control kicks in it closes JMS receiver, it usually has got prefetched messages inside a session and all work for fetching them is lost and repeated by other receiver. Now, the default receive time unit is 1 second, which is not enough under heavy load. So, we've got the same messages floating and stuck between server and BW process. Overall performance is degraded very much. The solution is to disable prefetch and increase JMS receiver timeout. Described case can be traced with 'show consumers full' within tibemsadmin console.
wtorek, października 29, 2013
A jednak bug w oprogramowaniu Toyoty
Trzy lata temu przewidywałem, że problemy z pedałem przyśpieszenia w Toyotach to błąd w firmware. Niestety z teoretycznymi liczbami miałem rację. Strach jeździć z takim oprogramowaniem silnika. Ze skryptu sądowego: Toyota Camry 2005 poruszająca się z prędkością ok. 100 km/h potrzebuje mniej więcej 3,5 metra na zresetowanie komputera (125 milisekund). Żeby zresetować komputer bez watchdoga trzeba wyłączyć i włączyć stacyjkę, a w przypadku keyless-go wyjąć pilota z samochodu (sic!!!), włożyć go ponownie i nacisnąć przycisk startu. 11 000 zmiennych globalnych, funkcje o cyklomatycznej złożoności powyżej 50, stosowanie rekurencji przy za małym stosie. Żeby zadziałał watchdog od hamowania trzeba najpierw zdjąć nogę z hamulca a potem wcisnąć mocno. Watchdogi w ESP nie monitorują głównego procesora.
sobota, października 26, 2013
Ambassada
Na koniec w paru momentach widzimy Warszawę jaką mogła by być, z nowoczesnymi wieżowcami, z żydowskimi handlarzami na ulicach, Marszałkowską bazującą na zabudowanie z początku dwudziestego wieku. Ile to miasto straciło kulturowo i cywilizacyjnie przez taki a nie inny bieg historii.
Darski gra trochę drętwo, ale z subtelnym kawałkiem na gitarze jest mocny. Więckiewicz jest jak zawsze dobry.
Darski gra trochę drętwo, ale z subtelnym kawałkiem na gitarze jest mocny. Więckiewicz jest jak zawsze dobry.
poniedziałek, października 21, 2013
Kwarcogranit
Kwarcogranit albo kwarc techniczny to materiał powstały przez uwibrowanie pod wysokim ciśnieniem i temperaturą zmielonego kwarcu, żywic, pigmentów i innych dodatków odpowiadających za unikalność wzoru (np. odłami szkła, lustra, porcelany itp.). Z płyt produktu można tworzyć blaty kuchenne, podłogi, elewacje. Produceni oferują też tworzenie prawie dowolnych obiektów z tego materiału np. zlewozmywaków - te są szlifowane wraz z blatem pod kątem 45 stopi i spajane silikonem tworząc ładną jednolitą powierzchnię kuchenną. Kwarcogranit przy średnio intensywnym użytkowaniu odporny jest na zadrapania. W przypadku ustawicznego rzucania/drapania sztućcami, stawiania gorącej patelni lepiej sprawdzi się zlew standardowy podwieszany ceramiczny/granitowy np. Franke, Blanco. Kwarcogranit (Technistone, Silestone) nie jest odporny na nagłą zmianę temperatury i w miejscu zestawienia gorącej blachy do pieczenia może popękać. Nie zacznie się jednak topić/zmieniać kształt jak konglomerat z rudą aluminium i akrylem (Corian, Staron, Kerrock).
czwartek, października 17, 2013
NestedJarClassLoader
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.InputStream;
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class NestedJarClassLoader extends URLClassLoader {
private HashMap jarCache = new HashMap();
@Override
public InputStream getResourceAsStream(String s) {
byte[] data = jarCache.get(s);
if (data==null)
data = jarCache.get("/"+s);
return (data!=null) ? new ByteArrayInputStream(data) : null;
}
@Override
public URL findResource(String name) {
return null; // not supported
}
@Override
public Class loadClass(String s) throws ClassNotFoundException {
byte[] bc = jarCache.get(s+".class");
if (bc!=null)
return super.defineClass(s, bc, 0, bc.length);
return super.loadClass(s);
}
public NestedJarClassLoader(URL url) throws Exception {
super(new URL[] {}, NestedJarClassLoader.class.getClassLoader());
String sURL = url.toString();
String u = url.toString().substring(4);
String name = new File(u.substring(9)).getName();
URL firstJarUrl = new URL(sURL.substring(0, sURL.lastIndexOf("/")+1));
JarFile jf = ((JarURLConnection)firstJarUrl.openConnection()).getJarFile();
InputStream is = jf.getInputStream(jf.getEntry(name));
byte[] binaryJar = new byte[is.available()];
/* read through compressed stream is tricky */
int n = 0;
int cnt = 0;
do {
n = is.read(binaryJar, cnt, binaryJar.length - cnt);
if (n>0)
cnt += n;
}
while (n > 0);
ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(binaryJar));
ZipEntry ze = null;
while ((ze = zis.getNextEntry()) != null) {
byte[] buff = new byte[4096];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int s = 0;
do {
s = zis.read(buff);
if (s>0)
baos.write(buff, 0, s);
}
while (s > 0);
if (baos.size() > 0 && ze.getName() != null) {
jarCache.put(ze.getName(), baos.toByteArray());
if (ze.getName().endsWith(".class")) {
String className = ze.getName().replace('$', '.').replace('/', '.');
jarCache.put(className, baos.toByteArray());
}
}
}
}
public static void main(String[] args) throws Exception {
URL url = new URL("jar:file:C://tibco/bw/5.10/hotfix/lib/tibcoverage.jar!/tdi.jar");
NestedJarClassLoader ucl = new NestedJarClassLoader(url);
ucl.loadClass("tdi.com.tibco.pe.Logger");
}
}
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.InputStream;
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class NestedJarClassLoader extends URLClassLoader {
private HashMap
@Override
public InputStream getResourceAsStream(String s) {
byte[] data = jarCache.get(s);
if (data==null)
data = jarCache.get("/"+s);
return (data!=null) ? new ByteArrayInputStream(data) : null;
}
@Override
public URL findResource(String name) {
return null; // not supported
}
@Override
public Class loadClass(String s) throws ClassNotFoundException {
byte[] bc = jarCache.get(s+".class");
if (bc!=null)
return super.defineClass(s, bc, 0, bc.length);
return super.loadClass(s);
}
public NestedJarClassLoader(URL url) throws Exception {
super(new URL[] {}, NestedJarClassLoader.class.getClassLoader());
String sURL = url.toString();
String u = url.toString().substring(4);
String name = new File(u.substring(9)).getName();
URL firstJarUrl = new URL(sURL.substring(0, sURL.lastIndexOf("/")+1));
JarFile jf = ((JarURLConnection)firstJarUrl.openConnection()).getJarFile();
InputStream is = jf.getInputStream(jf.getEntry(name));
byte[] binaryJar = new byte[is.available()];
/* read through compressed stream is tricky */
int n = 0;
int cnt = 0;
do {
n = is.read(binaryJar, cnt, binaryJar.length - cnt);
if (n>0)
cnt += n;
}
while (n > 0);
ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(binaryJar));
ZipEntry ze = null;
while ((ze = zis.getNextEntry()) != null) {
byte[] buff = new byte[4096];
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int s = 0;
do {
s = zis.read(buff);
if (s>0)
baos.write(buff, 0, s);
}
while (s > 0);
if (baos.size() > 0 && ze.getName() != null) {
jarCache.put(ze.getName(), baos.toByteArray());
if (ze.getName().endsWith(".class")) {
String className = ze.getName().replace('$', '.').replace('/', '.');
jarCache.put(className, baos.toByteArray());
}
}
}
}
public static void main(String[] args) throws Exception {
URL url = new URL("jar:file:C://tibco/bw/5.10/hotfix/lib/tibcoverage.jar!/tdi.jar");
NestedJarClassLoader ucl = new NestedJarClassLoader(url);
ucl.loadClass("tdi.com.tibco.pe.Logger");
}
}
poniedziałek, października 07, 2013
Beckers
Testery Beckers można kupić w Leroy Merlin Strefa Wnętrza (Ostrobramska) - 4,95 zł za 50 ml. Teoretyczna wydajność to 0,75m^2. Przy surowej ścianie spada do 0,3m^2. Na zdjęciu pistacja, aqua i lawenda. Światło wpadające do pomieszczenia w różnych porach dnia i o różnej pogodzie ma inne temperatury barwowe - przykładowo: w ciepły dzień po południu do koloru ściany będzie dodawany beżowy i pistacja będzie miejscami wyglądać jak banan. Im mniej światła tym kolory farby są bardziej wyraziste - aqua i lavender bardziej przypominają zwykły niebieski i fioletowy.
Zarządzanie zasobami w projekcie
Przełączanie się między kontekstami/zadaniami jest kosztowne nie tylko w przypadku systemu operacyjnego ale też w przypadku pracujących ludzi. Jak zatem pogodzić N projektów i jednego pracownika? Jeden projekt na dzień - dana osoba jest przydzielona do projektu na 100% w ten sam cyklicznie powtarzający się dzień tygodnia np. poniedziałek. W innym projekcie uczestniczy we wtorki. Jeśli projekt jest ważny/priorytetowy to osoba jest przydzielona do niego w piątki i poniedziałki. Co jeśli nie można zebrać danego zespołu w dany dzień/spełnić warunków brzegowych niezbędnych do startu kolejnej iteracji? Ludzie czekają na zaistnienie sprzyjających okoliczności za sprawą kierownika projektu, a jeśli po dwóch godzinach stan się nie zmieni to przechodzą do swoich bieżących nieprojektowych zadań. Dzień taki z punktu widzenia kierownika projektu jest zmarnowany - z tak odebranej kary powinien wyciągnąć wnioski. Jeżeli nie starcza dni tygodnia do podziału, to w oczywisty sposób brakuje ludzi do wykonywania pracy.
piątek, września 13, 2013
Grails authentication using ActiveDirectory + remember me
// LDAP config
grails.plugins.springsecurity.ldap.context.managerDn = 'domain\\ldapbind'
grails.plugins.springsecurity.ldap.context.managerPassword = 'password'
grails.plugins.springsecurity.ldap.context.server = 'ldap://domain:389/'
grails.plugins.springsecurity.ldap.authorities.ignorePartialResultException = true
grails.plugins.springsecurity.ldap.search.base = 'dc=domain'
grails.plugins.springsecurity.ldap.search.filter="sAMAccountName={0}"
grails.plugins.springsecurity.ldap.search.searchSubtree = true
grails.plugins.springsecurity.ldap.auth.hideUserNotFoundExceptions = false
grails.plugins.springsecurity.ldap.search.attributesToReturn = ['mail', 'displayName', 'title']
grails.plugins.springsecurity.providerNames = ['rememberMeAuthenticationProvider', 'daoAuthenticationProvider', 'ldapAuthProvider', 'anonymousAuthenticationProvider']
grails.plugins.springsecurity.ldap.useRememberMe = false
grails.plugins.springsecurity.ldap.authorities.retrieveGroupRoles = true
grails.plugins.springsecurity.ldap.authorities.retrieveDatabaseRoles = true
grails.plugins.springsecurity.ldap.authorities.groupSearchBase ='dc=domain'
grails.plugins.springsecurity.ldap.authorities.groupSearchFilter = 'member={0}'
//grails.plugins.springsecurity.ldap.authorities.groupSearchFilter = '(member:1.2.840.113556.1.4.1941:={0})'
grails.plugins.springsecurity.rememberMe.persistent = true
grails.plugins.springsecurity.rememberMe.persistentToken.domainClassName = 'security.PersistentLogin'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.groupMemberAttributeName = 'member'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.groupSearchBase = 'dc=domain'
grails.plugins.springsecurity.ldap.rememberMe.usernameMapper.userDnBase = 'domain'
grails.plugins.springsecurity.ldap.rememberMe.usernameMapper.usernameAttribute = 'cn'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.attributesToRetrieve = null
//grails.plugins.springsecurity.ldap.context.baseEnvironmentProperties = [ 'java.naming.ldap.factory.socket' : //'org.springframework.ldap.extras.ad.access.TolerantSSLSocketFactory' ]
grails.plugins.springsecurity.ldap.authorities.clean.uppercase = true
grails.plugins.springsecurity.cacheUsers = true
grails.plugins.springsecurity.apf.continueChainBeforeSuccessfulAuthentication = false
grails.plugins.springsecurity.apf.allowSessionCreation = false
grails.plugins.springsecurity.useSessionFixationPrevention = true
grails.plugins.springsecurity.rememberMe.alwaysRemember = true
grails.plugins.springsecurity.rememberMe.persistent = true
grails.plugins.springsecurity.securityConfigType = "InterceptUrlMap"
grails.plugins.springsecurity.interceptUrlMap = [
'/user/**': ['ROLE_ADMIN'],
'/role/**': ['ROLE_ADMIN'],
'/registrationcode/**': ['ROLE_ADMIN'],
'/acl*/**': ['ROLE_ADMIN'],
'/securityinfo/usercache': ['ROLE_NO_ACCESS'],
'/security*/**': ['ROLE_ADMIN'],
'/processing*/**': ['ROLE_ADMIN'],
'/js/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/css/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/images/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/login/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/logout/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/*/**': ['IS_AUTHENTICATED_REMEMBERED']
]
grails.plugins.springsecurity.ldap.context.managerDn = 'domain\\ldapbind'
grails.plugins.springsecurity.ldap.context.managerPassword = 'password'
grails.plugins.springsecurity.ldap.context.server = 'ldap://domain:389/'
grails.plugins.springsecurity.ldap.authorities.ignorePartialResultException = true
grails.plugins.springsecurity.ldap.search.base = 'dc=domain'
grails.plugins.springsecurity.ldap.search.filter="sAMAccountName={0}"
grails.plugins.springsecurity.ldap.search.searchSubtree = true
grails.plugins.springsecurity.ldap.auth.hideUserNotFoundExceptions = false
grails.plugins.springsecurity.ldap.search.attributesToReturn = ['mail', 'displayName', 'title']
grails.plugins.springsecurity.providerNames = ['rememberMeAuthenticationProvider', 'daoAuthenticationProvider', 'ldapAuthProvider', 'anonymousAuthenticationProvider']
grails.plugins.springsecurity.ldap.useRememberMe = false
grails.plugins.springsecurity.ldap.authorities.retrieveGroupRoles = true
grails.plugins.springsecurity.ldap.authorities.retrieveDatabaseRoles = true
grails.plugins.springsecurity.ldap.authorities.groupSearchBase ='dc=domain'
grails.plugins.springsecurity.ldap.authorities.groupSearchFilter = 'member={0}'
//grails.plugins.springsecurity.ldap.authorities.groupSearchFilter = '(member:1.2.840.113556.1.4.1941:={0})'
grails.plugins.springsecurity.rememberMe.persistent = true
grails.plugins.springsecurity.rememberMe.persistentToken.domainClassName = 'security.PersistentLogin'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.groupMemberAttributeName = 'member'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.groupSearchBase = 'dc=domain'
grails.plugins.springsecurity.ldap.rememberMe.usernameMapper.userDnBase = 'domain'
grails.plugins.springsecurity.ldap.rememberMe.usernameMapper.usernameAttribute = 'cn'
grails.plugins.springsecurity.ldap.rememberMe.detailsManager.attributesToRetrieve = null
//grails.plugins.springsecurity.ldap.context.baseEnvironmentProperties = [ 'java.naming.ldap.factory.socket' : //'org.springframework.ldap.extras.ad.access.TolerantSSLSocketFactory' ]
grails.plugins.springsecurity.ldap.authorities.clean.uppercase = true
grails.plugins.springsecurity.cacheUsers = true
grails.plugins.springsecurity.apf.continueChainBeforeSuccessfulAuthentication = false
grails.plugins.springsecurity.apf.allowSessionCreation = false
grails.plugins.springsecurity.useSessionFixationPrevention = true
grails.plugins.springsecurity.rememberMe.alwaysRemember = true
grails.plugins.springsecurity.rememberMe.persistent = true
grails.plugins.springsecurity.securityConfigType = "InterceptUrlMap"
grails.plugins.springsecurity.interceptUrlMap = [
'/user/**': ['ROLE_ADMIN'],
'/role/**': ['ROLE_ADMIN'],
'/registrationcode/**': ['ROLE_ADMIN'],
'/acl*/**': ['ROLE_ADMIN'],
'/securityinfo/usercache': ['ROLE_NO_ACCESS'],
'/security*/**': ['ROLE_ADMIN'],
'/processing*/**': ['ROLE_ADMIN'],
'/js/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/css/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/images/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/login/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/logout/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/*/**': ['IS_AUTHENTICATED_REMEMBERED']
]
czwartek, września 12, 2013
Logowanie EAI
Logowanie EAI powinno być wieloaspektowe:
- wszystkie akcje w ramach jednego logicznego przepływu oznaczone tą samą instancją identyfikatora przepływu
- te same logicznie dane w ramach dowolnej akcji oznaczone tym samym użytecznym biznesowo identyfikatorem
- stan zakończenia procesu biznesowego: sukces, błąd biznesowy, błąd techniczny
- statystyki wydajnościowe liczone w czasie wykonania lub surowe dane przetwarzane i raportowane offline
- błędy analizowane w wąskim oknie czasowym raportowane w czasie zbliżonym do rzeczywistego, co pozwala na łatwe zauważenie awarii w powiązanych ze sobą komponentach
środa, września 11, 2013
Protesty w Warszawie
18 tys. ludzi. Władza ma ich gdzieś, napuszcza jednych na drugich, robiąc ze związkowców wroga klasowego. Ten rząd oszustów i magików od PR trzeba jak najszybciej wymienić.
środa, sierpnia 28, 2013
Tracing Oracle connectivity problem (connection timed out on socket)
tcpdump -nnvvXS host oracle-db-prd
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:33:13.433097 IP (tos 0x0, ttl 64, id 36655, offset 0, flags [DF], proto TCP (6), length 60)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [S], cksum 0x7cab (correct), seq 3238343368, win 14600, options [mss 1460,sackOK,TS val 678084071 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c 8f2f 4000 4006 870c 0af3 025e E..<./@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c8 0000 0000 ...e......2.....
0x0020: a002 3908 7cab 0000 0204 05b4 0402 080a ..9.|...........
0x0030: 286a bde7 0000 0000 0103 0307 (j..........
11:33:13.434046 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [S.], cksum 0xacc3 (correct), seq 4037414683, ack 3238343369, win 5840, options [mss 1380,nop,nop,sackOK,nop,wscale 7], length 0
0x0000: 4500 0034 0000 4000 3f06 1744 0acb 0c65 E..4..@.?..D...e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1b c105 32c9 ...^..........2.
0x0020: 8012 16d0 acc3 0000 0204 0564 0101 0402 ...........d....
0x0030: 0103 0307 ....
11:33:13.434153 IP (tos 0x0, ttl 64, id 36656, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [.], cksum 0x03a3 (correct), seq 3238343369, ack 4037414684, win 115, length 0
0x0000: 4500 0028 8f30 4000 4006 871f 0af3 025e E..(.0@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c9 f0a6 0f1c ...e......2.....
0x0020: 5010 0073 03a3 0000 P..s....
11:33:13.434506 IP (tos 0x0, ttl 64, id 36657, offset 0, flags [DF], proto TCP (6), length 321)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [P.], cksum 0x25b4 (incorrect -> 0x00d9), seq 3238343369:3238343650, ack 4037414684, win 115, length 281
0x0000: 4500 0141 8f31 4000 4006 8605 0af3 025e E..A.1@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c9 f0a6 0f1c ...e......2.....
0x0020: 5018 0073 25b4 0000 0119 0000 0100 0000 P..s%...........
0x0030: 0136 012c 0e41 2000 7fff 4f98 0000 0001 .6.,.A....O.....
0x0040: 00df 003a 0000 0000 8181 0000 0000 0000 ...:............
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 2844 4553 4352 4950 5449 4f4e 3d28 ..(DESCRIPTION=(
0x0070: 4144 4452 4553 533d 2850 524f 544f 434f ADDRESS=(PROTOCO
0x0080: 4c3d 5443 5029 2848 4f53 543d 3130 2e32 L=TCP)(HOST=orac
0x0090: 3033 2e31 322e 3130 3129 2850 4f52 543d le-db-prd)(PORT=
0x00a0: 3135 3231 2929 2843 4f4e 4e45 4354 5f44 1521))(CONNECT_D
0x00b0: 4154 413d 2843 4944 3d28 5052 4f47 5241 ATA=(CID=(PROGRA
0x00c0: 4d3d 4a44 4243 2054 6869 6e20 436c 6965 M=JDBC.Thin.Clie
0x00d0: 6e74 2928 484f 5354 3d5f 5f6a 6462 635f nt)(HOST=__jdbc_
0x00e0: 5f29 2855 5345 523d 7469 6263 6f29 2928 _)(USER=tibco))(
0x00f0: 5345 5256 4943 455f 4e41 4d45 3d71 786c SERVICE_NAME=crm
0x0100: 6477 6829 2843 4944 3d28 5052 4f47 5241 001)(CID=(PROGRA
0x0110: 4d3d 4a44 4243 2054 6869 6e20 436c 6965 M=JDBC.Thin.Clie
0x0120: 6e74 2928 484f 5354 3d5f 5f6a 6462 635f nt)(HOST=__jdbc_
0x0130: 5f29 2855 5345 523d 7469 6263 6f29 2929 _)(USER=tibco)))
0x0140: 29 )
11:33:13.435530 IP (tos 0x0, ttl 63, id 15716, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [.], cksum 0x02c7 (correct), seq 4037414684, ack 3238343650, win 54, length 0
0x0000: 4500 0028 3d64 4000 3f06 d9eb 0acb 0c65 E..(=d@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1c c105 33e2 ...^..........3.
0x0020: 5010 0036 02c7 0000 0000 0000 0000 P..6..........
11:33:13.435660 IP (tos 0x0, ttl 63, id 15717, offset 0, flags [DF], proto TCP (6), length 117)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [P.], cksum 0x8f72 (correct), seq 4037414684:4037414761, ack 3238343650, win 54, length 77
0x0000: 4500 0075 3d65 4000 3f06 d99d 0acb 0c65 E..u=e@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1c c105 33e2 ...^..........3.
0x0020: 5018 0036 8f72 0000 004d 0000 0500 0000 P..6.r...M......
0x0030: 0043 2844 4553 4352 4950 5449 4f4e 3d28 .C(DESCRIPTION=(
0x0040: 4144 4452 4553 533d 2850 524f 544f 434f ADDRESS=(PROTOCO
0x0050: 4c3d 5443 5029 2848 4f53 543d 3130 2e32 L=TCP)(HOST=orac
0x0060: 3033 2e31 322e 3429 2850 4f52 543d 3135 le-prd1)(PORT=15
0x0070: 3231 2929 29 21)))
11:33:13.435682 IP (tos 0x0, ttl 64, id 36658, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [.], cksum 0x023d (correct), seq 3238343650, ack 4037414761, win 115, length 0
0x0000: 4500 0028 8f32 4000 4006 871d 0af3 025e E..(.2@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 33e2 f0a6 0f69 ...e......3....i
0x0020: 5010 0073 023d 0000 P..s.=..
11:33:13.435700 IP (tos 0x0, ttl 63, id 15718, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [F.], cksum 0x0279 (correct), seq 4037414761, ack 3238343650, win 54, length 0
0x0000: 4500 0028 3d66 4000 3f06 d9e9 0acb 0c65 E..(=f@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f69 c105 33e2 ...^.......i..3.
0x0020: 5011 0036 0279 0000 0000 0000 0000 P..6.y........
11:33:13.436176 IP (tos 0x0, ttl 64, id 36659, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [F.], cksum 0x023b (correct), seq 3238343650, ack 4037414762, win 115, length 0
0x0000: 4500 0028 8f33 4000 4006 871c 0af3 025e E..(.3@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 33e2 f0a6 0f6a ...e......3....j
0x0020: 5011 0073 023b 0000 P..s.;..
11:33:13.437033 IP (tos 0x0, ttl 63, id 15719, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [.], cksum 0x0278 (correct), seq 4037414762, ack 3238343651, win 54, length 0
0x0000: 4500 0028 3d67 4000 3f06 d9e8 0acb 0c65 E..(=g@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f6a c105 33e3 ...^.......j..3.
0x0020: 5010 0036 0278 0000 0000 0000 0000 P..6.x........
caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
at oracle.jdbc.driver.PhysicalConnection.
at oracle.jdbc.driver.T4CConnection.
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.tibco.pe.core.JDBCPool.getConnectionEntry(Unknown Source)
at com.tibco.pe.core.JDBCPool.getConnectionEntry(Unknown Source)
at com.tibco.pe.core.JDBCPoolManager.getConnectionEntry(Unknown Source)
at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
at com.tibco.pe.core.Job.a(Unknown Source)
at com.tibco.pe.core.Job.k(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:343)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
... 16 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
wtorek, sierpnia 27, 2013
niedziela, sierpnia 25, 2013
sobota, sierpnia 24, 2013
Subskrybuj:
Posty (Atom)