| | |
| | | |
| | | on: |
| | | push: |
| | | pull_request: |
| | | branches: [ 'sustaining/4.10.x','master' ] |
| | | pull_request: |
| | | |
| | | jobs: |
| | | build-maven: |
| | |
| | | wine --version |
| | | version="9.4.0"; sudo wget "https://dl.winehq.org/wine/wine-mono/$version/wine-mono-$version-x86.msi" -O /tmp/wine-mono.msi |
| | | wine msiexec /i /tmp/wine-mono.msi |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | with: |
| | | fetch-depth: 0 |
| | | submodules: recursive |
| | | - name: Java ${{ matrix.Java }} (${{ matrix.os }}) |
| | | uses: actions/setup-java@v4 |
| | | uses: actions/setup-java@v5 |
| | | with: |
| | | java-version: ${{ matrix.java }} |
| | | distribution: 'zulu' |
| | | - name: Cache Maven packages |
| | | uses: actions/cache@v4 |
| | | uses: actions/cache@v5 |
| | | with: |
| | | path: ~/.m2/repository |
| | | key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }} |
| | |
| | | opendj-server-legacy\target\package\opendj\bat\stop-ds.bat |
| | | opendj-server-legacy\target\package\opendj\bat\windows-service.bat --enableService |
| | | net start "OpenDJ Server" |
| | | if ($LASTEXITCODE -ne 0) { throw "net start 'OpenDJ Server' failed with exit code $LASTEXITCODE" } |
| | | for ($i=0; $i -lt 12; $i++) { try { $c = New-Object System.Net.Sockets.TcpClient('localhost', 1636); $c.Close(); break } catch { Start-Sleep -Seconds 5 } } |
| | | opendj-server-legacy\target\package\opendj\bat\ldapsearch.bat --hostname localhost --port 1636 --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll --baseDN "dc=example2,dc=com" --searchScope sub "(uid=user.*)" dn | find /c '"dn:"' | findstr "10000" |
| | | net stop "OpenDJ Server" |
| | | if ($LASTEXITCODE -ne 0) { throw "net stop 'OpenDJ Server' failed with exit code $LASTEXITCODE" } |
| | | opendj-server-legacy\target\package\opendj\bat\windows-service.bat --disableService |
| | | |
| | | - name: Upload Windows exe artifacts |
| | | if: runner.os == 'Windows' |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: windows-exe-${{ matrix.java }} |
| | | retention-days: 5 |
| | | path: opendj-server-legacy/src/build-tools/windows/*.exe |
| | | |
| | | - name: Upload artifacts OpenDJ Server |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: ${{ matrix.os }}-${{ matrix.java }} |
| | | retention-days: 5 |
| | |
| | | - 5000:5000 |
| | | steps: |
| | | - name: Download artifacts |
| | | uses: actions/download-artifact@v4 |
| | | uses: actions/download-artifact@v8 |
| | | with: |
| | | name: ubuntu-latest-11 |
| | | - name: Get latest release version |
| | |
| | | echo "release_version=$git_version_last" >> $GITHUB_ENV |
| | | - name: Docker meta |
| | | id: meta |
| | | uses: docker/metadata-action@v5 |
| | | uses: docker/metadata-action@v6 |
| | | with: |
| | | images: | |
| | | localhost:5000/${{ github.repository }} |
| | | tags: | |
| | | type=raw,value=${{ env.release_version }} |
| | | - name: Set up QEMU |
| | | uses: docker/setup-qemu-action@v3 |
| | | uses: docker/setup-qemu-action@v4 |
| | | - name: Set up Docker Buildx |
| | | uses: docker/setup-buildx-action@v3 |
| | | uses: docker/setup-buildx-action@v4 |
| | | with: |
| | | driver-opts: network=host |
| | | - name: Prepare Dockerfile |
| | |
| | | cp ./opendj-server-legacy/target/package/opendj-*.zip ./opendj-packages/opendj-docker |
| | | sed -i -E '/^#COPY opendj/s/^#//' ./opendj-packages/opendj-docker/Dockerfile |
| | | - name: Build image (default) |
| | | uses: docker/build-push-action@v5 |
| | | uses: docker/build-push-action@v7 |
| | | with: |
| | | context: ./opendj-packages/opendj-docker |
| | | file: ./opendj-packages/opendj-docker/Dockerfile |
| | |
| | | - 5000:5000 |
| | | steps: |
| | | - name: Download artifacts |
| | | uses: actions/download-artifact@v4 |
| | | uses: actions/download-artifact@v8 |
| | | with: |
| | | name: ubuntu-latest-11 |
| | | - name: Get latest release version |
| | |
| | | echo "release_version=$git_version_last" >> $GITHUB_ENV |
| | | - name: Docker meta |
| | | id: meta |
| | | uses: docker/metadata-action@v5 |
| | | uses: docker/metadata-action@v6 |
| | | with: |
| | | images: | |
| | | localhost:5000/${{ github.repository }} |
| | |
| | | type=raw,value=alpine |
| | | type=raw,value=${{ env.release_version }}-alpine |
| | | - name: Set up QEMU |
| | | uses: docker/setup-qemu-action@v3 |
| | | uses: docker/setup-qemu-action@v4 |
| | | - name: Set up Docker Buildx |
| | | uses: docker/setup-buildx-action@v3 |
| | | uses: docker/setup-buildx-action@v4 |
| | | with: |
| | | driver-opts: network=host |
| | | - name: Prepare Dockerfile |
| | |
| | | cp ./opendj-server-legacy/target/package/opendj-*.zip ./opendj-packages/opendj-docker |
| | | sed -i -E '/^#COPY opendj/s/^#//' ./opendj-packages/opendj-docker/Dockerfile-alpine |
| | | - name: Build image |
| | | uses: docker/build-push-action@v5 |
| | | uses: docker/build-push-action@v7 |
| | | with: |
| | | context: ./opendj-packages/opendj-docker |
| | | file: ./opendj-packages/opendj-docker/Dockerfile-alpine |
| | |
| | | wine --version |
| | | version="9.4.0"; sudo wget "https://dl.winehq.org/wine/wine-mono/$version/wine-mono-$version-x86.msi" -O /tmp/wine-mono.msi |
| | | wine msiexec /i /tmp/wine-mono.msi |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | with: |
| | | fetch-depth: 0 |
| | | submodules: recursive |
| | | ref: ${{ github.event.workflow_run.head_branch }} |
| | | - name: Set up Java for publishing to Maven Central Repository OSS |
| | | uses: actions/setup-java@v4 |
| | | uses: actions/setup-java@v5 |
| | | with: |
| | | java-version: ${{ github.event.workflow_run.head_branch == 'sustaining/4.10.x' && '8' || '11'}} |
| | | distribution: 'temurin' |
| | |
| | | server-username: MAVEN_USERNAME |
| | | server-password: MAVEN_PASSWORD |
| | | - name: Cache Maven packages |
| | | uses: actions/cache@v4 |
| | | uses: actions/cache@v5 |
| | | with: |
| | | path: ~/.m2/repository |
| | | key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }} |
| | |
| | | continue-on-error: true |
| | | run: mvn javadoc:aggregate |
| | | - name: Upload artifacts OpenDJ Server |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Server |
| | | path: opendj-server-legacy/target/package/*.zip |
| | | - name: Upload artifacts OpenDJ SDK Toolkit |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ SDK Toolkit |
| | | path: opendj-ldap-toolkit/target/*.zip |
| | | - name: Upload artifacts OpenDJ Debian Package |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Debian Package |
| | | path: opendj-packages/opendj-deb/opendj-deb-standard/target/*.deb |
| | | - name: Upload artifacts OpenDJ RPM Package |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ RPM Package |
| | | path: opendj-packages/opendj-rpm/opendj-rpm-standard/target/rpm/opendj/RPMS/noarch/*.rpm |
| | | - name: Upload artifacts OpenDJ MSI Package |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ MSI Package |
| | | path: opendj-packages/opendj-msi/opendj-msi-standard/target/*.msi |
| | | - name: Upload artifacts OpenDJ Docker Packages |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Docker Packages |
| | | path: opendj-packages/opendj-docker/target/Dockerfile.zip |
| | | - name: Upload artifacts OpenDJ Openshift template |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Openshift template |
| | | path: opendj-packages/opendj-openshift-template/*.yaml |
| | | - name: Upload artifacts OpenDJ Doc Generated Reference |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Doc Generated References |
| | | path: opendj-doc-generated-ref/target/*.zip |
| | | - name: Upload artifacts OpenDJ DSML Gateway |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ DSML Gateway |
| | | path: opendj-dsml-servlet/target/*.war |
| | | - name: Upload artifacts OpenDJ Commons REST LDAP Gateway |
| | | uses: actions/upload-artifact@v4 |
| | | uses: actions/upload-artifact@v7 |
| | | with: |
| | | name: OpenDJ Commons REST LDAP Gateway |
| | | path: opendj-rest2ldap-servlet/target/*.war |
| | |
| | | git config --global user.name "Open Identity Platform Community" |
| | | git config --global user.email "open-identity-platform-opendj@googlegroups.com" |
| | | cd .. |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | continue-on-error: true |
| | | with: |
| | | repository: ${{ github.repository }}.wiki |
| | |
| | | git commit -a -m "upload docs after deploy ${{ github.sha }}" |
| | | git push --quiet --force |
| | | |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | continue-on-error: true |
| | | with: |
| | | repository: OpenIdentityPlatform/doc.openidentityplatform.org |
| | |
| | | wine --version |
| | | version="9.4.0"; sudo wget "https://dl.winehq.org/wine/wine-mono/$version/wine-mono-$version-x86.msi" -O /tmp/wine-mono.msi |
| | | wine msiexec /i /tmp/wine-mono.msi |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | with: |
| | | fetch-depth: 0 |
| | | submodules: recursive |
| | | - name: Set up Java for publishing to Maven Central Repository OSS |
| | | uses: actions/setup-java@v4 |
| | | uses: actions/setup-java@v5 |
| | | with: |
| | | java-version: ${{ github.event.workflow_run.head_branch == 'sustaining/4.10.x' && '8' || '11'}} |
| | | distribution: 'temurin' |
| | |
| | | server-username: MAVEN_USERNAME |
| | | server-password: MAVEN_PASSWORD |
| | | - name: Cache Maven packages |
| | | uses: actions/cache@v4 |
| | | uses: actions/cache@v5 |
| | | with: |
| | | path: ~/.m2/repository |
| | | key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }} |
| | |
| | | target/checkout/opendj-doc-generated-ref/target/*.zip |
| | | target/checkout/opendj-dsml-servlet/target/*.war |
| | | target/checkout/opendj-rest2ldap-servlet/target/*.war |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | continue-on-error: true |
| | | with: |
| | | repository: ${{ github.repository }}.wiki |
| | |
| | | git push --quiet --force |
| | | git push --quiet --force origin ${{ github.event.inputs.releaseVersion }} |
| | | |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | continue-on-error: true |
| | | with: |
| | | repository: OpenIdentityPlatform/doc.openidentityplatform.org |
| | |
| | | needs: |
| | | - release-maven |
| | | steps: |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | with: |
| | | ref: ${{ github.event.inputs.releaseVersion }} |
| | | fetch-depth: 1 |
| | | submodules: recursive |
| | | - name: Docker meta |
| | | id: meta |
| | | uses: docker/metadata-action@v5 |
| | | uses: docker/metadata-action@v6 |
| | | with: |
| | | images: | |
| | | ${{ github.repository }} |
| | |
| | | type=raw,value=latest |
| | | type=raw,value=${{ github.event.inputs.releaseVersion }} |
| | | - name: Set up QEMU |
| | | uses: docker/setup-qemu-action@v3 |
| | | uses: docker/setup-qemu-action@v4 |
| | | - name: Set up Docker Buildx |
| | | uses: docker/setup-buildx-action@v3 |
| | | uses: docker/setup-buildx-action@v4 |
| | | - name: Login to DockerHub |
| | | uses: docker/login-action@v3 |
| | | uses: docker/login-action@v4 |
| | | with: |
| | | username: ${{ secrets.DOCKER_USERNAME }} |
| | | password: ${{ secrets.DOCKER_PASSWORD }} |
| | | - name: Login to GHCR |
| | | uses: docker/login-action@v3 |
| | | uses: docker/login-action@v4 |
| | | with: |
| | | registry: ghcr.io |
| | | username: ${{ github.repository_owner }} |
| | | password: ${{ secrets.GITHUB_TOKEN }} |
| | | - name: Build and push image |
| | | uses: docker/build-push-action@v5 |
| | | uses: docker/build-push-action@v7 |
| | | continue-on-error: true |
| | | with: |
| | | context: ./opendj-packages/opendj-docker |
| | |
| | | needs: |
| | | - release-maven |
| | | steps: |
| | | - uses: actions/checkout@v4 |
| | | - uses: actions/checkout@v6 |
| | | with: |
| | | ref: ${{ github.event.inputs.releaseVersion }} |
| | | fetch-depth: 1 |
| | | submodules: recursive |
| | | - name: Docker meta |
| | | id: meta |
| | | uses: docker/metadata-action@v5 |
| | | uses: docker/metadata-action@v6 |
| | | with: |
| | | images: | |
| | | ${{ github.repository }} |
| | |
| | | type=raw,value=alpine |
| | | type=raw,value=${{ github.event.inputs.releaseVersion }}-alpine |
| | | - name: Set up QEMU |
| | | uses: docker/setup-qemu-action@v3 |
| | | uses: docker/setup-qemu-action@v4 |
| | | - name: Set up Docker Buildx |
| | | uses: docker/setup-buildx-action@v3 |
| | | uses: docker/setup-buildx-action@v4 |
| | | - name: Login to DockerHub |
| | | uses: docker/login-action@v3 |
| | | uses: docker/login-action@v4 |
| | | with: |
| | | username: ${{ secrets.DOCKER_USERNAME }} |
| | | password: ${{ secrets.DOCKER_PASSWORD }} |
| | | - name: Login to GHCR |
| | | uses: docker/login-action@v3 |
| | | uses: docker/login-action@v4 |
| | | with: |
| | | registry: ghcr.io |
| | | username: ${{ github.repository_owner }} |
| | | password: ${{ secrets.GITHUB_TOKEN }} |
| | | - name: Build and push image |
| | | continue-on-error: true |
| | | uses: docker/build-push-action@v5 |
| | | uses: docker/build-push-action@v7 |
| | | with: |
| | | context: ./opendj-packages/opendj-docker |
| | | file: ./opendj-packages/opendj-docker/Dockerfile-alpine |
| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2016 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.forgerock.opendj.ldap.spi; |
| | | |
| | |
| | | private LdapResponseMessage(final byte messageType, final int messageId, final Response content) { |
| | | super(messageType, messageId, content); |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "LdapResponseMessage(messageType=" + getMessageType() |
| | | + ", messageId=" + getMessageId() |
| | | + ", content=" + getContent() + ")"; |
| | | } |
| | | } |
| | | |
| | | private static abstract class LdapMessageEnvelope<T> { |
| | |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS. |
| | | * Portions copyright 2026 3A Systems, LLC |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | |
| | | #include "service.h" |
| | |
| | | // The functions returns SERVICE_RETURN_OK if we could start the server |
| | | // and SERVICE_RETURN_ERROR otherwise. |
| | | // ---------------------------------------------------- |
| | | ServiceReturnCode doStartApplication() |
| | | ServiceReturnCode doStartApplication(SERVICE_STATUS_HANDLE *serviceStatusHandle, DWORD *checkPoint) |
| | | { |
| | | ServiceReturnCode returnValue; |
| | | // init out params |
| | |
| | | debug("doStartApplication: OPENDJ_WINDOWS_SERVICE_STARTDS_WAIT is not set. Using default %d milliseconds.", |
| | | STARTDS_WAIT_DEFAULT_VALUE); |
| | | } |
| | | if (serviceStatusHandle != NULL && checkPoint != NULL) |
| | | { |
| | | updateServiceStatus(SERVICE_START_PENDING, NO_ERROR, 0, |
| | | (*checkPoint)++, wait + 30000, serviceStatusHandle); |
| | | } |
| | | waitOk = waitForProcess(&procInfo, wait, &startDSExit); |
| | | if (waitOk) |
| | | { |
| | |
| | | |
| | | if (createOk && waitOk) |
| | | { |
| | | BOOL running; |
| | | // Just check once if the server is running or not: since the wait |
| | | // wait was successful, if the server is getting the lock, it already |
| | | // got it. |
| | | isServerRunning(&running, TRUE); |
| | | if (running) |
| | | // The batch file process completed successfully, but the Java server |
| | | // process may not have acquired the lock file yet (especially on |
| | | // Windows 11 where JVM startup can be slower). Retry with a loop |
| | | // similar to the else-if branch below. |
| | | // See: https://github.com/OpenIdentityPlatform/OpenDJ/issues/259 |
| | | const DWORD DEFAULT_TRIES = 100; |
| | | int nTries = DEFAULT_TRIES; |
| | | char * nTriesEnv = getenv("OPENDJ_WINDOWS_SERVICE_START_NTRIES"); |
| | | BOOL running = FALSE; |
| | | if (nTriesEnv != NULL) |
| | | { |
| | | debug("OPENDJ_WINDOWS_SERVICE_START_NTRIES env var set to %s", nTriesEnv); |
| | | nTries = (int)strtol(nTriesEnv, (char **)NULL, 10); |
| | | if (nTries <= 0) |
| | | { |
| | | nTries = DEFAULT_TRIES; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | debug("OPENDJ_WINDOWS_SERVICE_START_NTRIES is not set. Using default %d tries.", nTries); |
| | | } |
| | | |
| | | while ((nTries > 0) && !running) |
| | | { |
| | | nTries--; |
| | | if (serviceStatusHandle != NULL && checkPoint != NULL) |
| | | { |
| | | updateServiceStatus(SERVICE_START_PENDING, NO_ERROR, 0, |
| | | (*checkPoint)++, 10000, serviceStatusHandle); |
| | | } |
| | | if (isServerRunning(&running, TRUE) != SERVICE_RETURN_OK) |
| | | { |
| | | break; |
| | | } |
| | | if (!running) |
| | | { |
| | | debug("Sleeping for 5 seconds to allow the process to get the lock. %d tries remaining.", |
| | | nTries); |
| | | Sleep(5000); |
| | | } |
| | | } |
| | | if (running) |
| | | { |
| | | returnValue = SERVICE_RETURN_OK; |
| | | debug("doStartApplication: server running."); |
| | |
| | | while ((nTries > 0) && !running) |
| | | { |
| | | nTries--; |
| | | if (serviceStatusHandle != NULL && checkPoint != NULL) |
| | | { |
| | | updateServiceStatus(SERVICE_START_PENDING, NO_ERROR, 0, |
| | | (*checkPoint)++, 10000, serviceStatusHandle); |
| | | } |
| | | if (isServerRunning(&running, TRUE) != SERVICE_RETURN_OK) |
| | | { |
| | | break; |
| | |
| | | if (spawn(command, FALSE) != -1) |
| | | { |
| | | // Try to see if server is really stopped |
| | | int nTries = 10; |
| | | int nTries = 30; |
| | | BOOL running = TRUE; |
| | | |
| | | debug("doStopApplication: the spawn of the process worked."); |
| | |
| | | { |
| | | WORD argCount = 1; |
| | | const char *argc[] = {_instanceDir}; |
| | | code = doStartApplication(); |
| | | code = doStartApplication(_serviceStatusHandle, &checkPoint); |
| | | |
| | | switch (code) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | // Check current Status |
| | | DWORD state; |
| | | BOOL success = getServiceStatus(serviceName, &state); |
| | | if (!(success && |
| | | ((state == SERVICE_STOPPED) || |
| | | (state == SERVICE_STOP_PENDING)))) |
| | | // Server appears not running - retry a few times before concluding |
| | | // it has actually stopped (the lock file check can be transient, |
| | | // e.g. during JVM GC pressure or heavy I/O after a large ldapsearch). |
| | | // 3 retries × 2 seconds gives up to 6 extra seconds of tolerance. |
| | | int retryCount = 3; |
| | | BOOL confirmedStopped = TRUE; |
| | | while (retryCount > 0) |
| | | { |
| | | WORD argCount = 1; |
| | | const char *argc[] = {_instanceDir}; |
| | | _serviceCurStatus = SERVICE_STOPPED; |
| | | debug("checking in serviceMain serviceHandler: service stopped with error."); |
| | | retryCount--; |
| | | Sleep(2000); // wait 2 seconds between retries before re-checking |
| | | code = isServerRunning(&running, TRUE); |
| | | if (code == SERVICE_RETURN_OK && running) |
| | | { |
| | | confirmedStopped = FALSE; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | updateServiceStatus ( |
| | | _serviceCurStatus, |
| | | ERROR_SERVICE_SPECIFIC_ERROR, |
| | | -1, |
| | | CHECKPOINT_NO_ONGOING_OPERATION, |
| | | TIMEOUT_NONE, |
| | | _serviceStatusHandle); |
| | | reportLogEvent( |
| | | EVENTLOG_ERROR_TYPE, |
| | | WIN_EVENT_ID_SERVER_STOPPED_OUTSIDE_SCM, |
| | | argCount, argc); |
| | | } |
| | | break; |
| | | if (confirmedStopped) |
| | | { |
| | | // Check current Status |
| | | DWORD state; |
| | | BOOL success = getServiceStatus(serviceName, &state); |
| | | if (!(success && |
| | | ((state == SERVICE_STOPPED) || |
| | | (state == SERVICE_STOP_PENDING)))) |
| | | { |
| | | WORD argCount = 1; |
| | | const char *argc[] = {_instanceDir}; |
| | | _serviceCurStatus = SERVICE_STOPPED; |
| | | debug("checking in serviceMain serviceHandler: service stopped with error."); |
| | | |
| | | updateServiceStatus ( |
| | | _serviceCurStatus, |
| | | ERROR_SERVICE_SPECIFIC_ERROR, |
| | | -1, |
| | | CHECKPOINT_NO_ONGOING_OPERATION, |
| | | TIMEOUT_NONE, |
| | | _serviceStatusHandle); |
| | | reportLogEvent( |
| | | EVENTLOG_ERROR_TYPE, |
| | | WIN_EVENT_ID_SERVER_STOPPED_OUTSIDE_SCM, |
| | | argCount, argc); |
| | | } |
| | | break; |
| | | } |
| | | // else: server is actually still running, continue monitoring |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | |
| | | #include "common.h" |
| | |
| | | DWORD waitHint, |
| | | SERVICE_STATUS_HANDLE *serviceStatusHandle |
| | | ); |
| | | ServiceReturnCode doStartApplication(SERVICE_STATUS_HANDLE *serviceStatusHandle, DWORD *checkPoint); |
| | | void serviceHandler(DWORD controlCode); |
| | | BOOL getServiceStatus(char *serviceName, LPDWORD returnState); |
| | | |
| | |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013-2016 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | { |
| | | SLF4JBridgeHandler.removeHandlersForRootLogger(); |
| | | // This is needed to avoid major performance issue. See: http://www.slf4j.org/legacy.html#jul-to-slf4j |
| | | // Limit Grizzly JUL logging to FINE to prevent a ClassCastException in |
| | | // FilterChainContext.toString() (Grizzly bug) when debug logging is enabled. |
| | | // Grizzly 3.0.1 DefaultFilterChain.executeFilter() checks isLoggable(FINEST) but |
| | | // its FilterChainContext.toString() incorrectly casts the message to char[]. |
| | | LogManager.getLogManager().readConfiguration( |
| | | new ByteArrayInputStream((".level=" + newLevel).getBytes())); |
| | | new ByteArrayInputStream( |
| | | (".level=" + newLevel + "\norg.glassfish.grizzly.level=FINE").getBytes())); |
| | | SLF4JBridgeHandler.install(); |
| | | currentJulLogLevel = newLevel; |
| | | } |
| | |
| | | // write 4 more changes starting from changenumber 5, and search them |
| | | testName = "Multiple/5"; |
| | | csns = generateAndPublishUpdateMsgForEachOperationType(testName, false); |
| | | // Wait until all 8 changes are indexed before searching |
| | | assertChangelogAttributesInRootDSE(1, 8); |
| | | searchChangesForEachOperationTypeUsingChangeNumberMode(5, csns, testName); |
| | | |
| | | // search from the provided change number: 6 (should be the add msg) |
| | |
| | | final ResultCode expectedResultCode, String testName) throws Exception |
| | | { |
| | | TestTimer timer = new TestTimer.Builder() |
| | | .maxSleep(10, SECONDS) |
| | | .sleepTimes(10, MILLISECONDS) |
| | | .maxSleep(30, SECONDS) |
| | | .sleepTimes(100, MILLISECONDS) |
| | | .toTimer(); |
| | | InternalSearchOperation searchOp = timer.repeatUntilSuccess(new Callable<InternalSearchOperation>() |
| | | { |
| | |
| | | replServer3 = createReplicationServer(replServerId3, true, testCase); |
| | | |
| | | connectServer1ToReplServer(replServer1); |
| | | Thread.sleep(2000); //wait for all RS handshakes to complete |
| | | waitForDomainsOnAllReplicationServers(); |
| | | |
| | | debugInfo("Expect genId are set in all replServers."); |
| | | waitForStableGenerationId(EMPTY_DN_GENID); |
| | |
| | | } |
| | | } |
| | | |
| | | private void waitForStableGenerationId(final long expectedGenId) throws Exception |
| | | private void waitForDomainsOnAllReplicationServers() throws Exception |
| | | { |
| | | TestTimer timer = new TestTimer.Builder() |
| | | .maxSleep(30, SECONDS) |
| | |
| | | @Override |
| | | public void call() throws Exception |
| | | { |
| | | assertNotNull(replServer1.getReplicationServerDomain(baseDN), "domain missing on replServer1"); |
| | | assertNotNull(replServer2.getReplicationServerDomain(baseDN), "domain missing on replServer2"); |
| | | assertNotNull(replServer3.getReplicationServerDomain(baseDN), "domain missing on replServer3"); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void waitForStableGenerationId(final long expectedGenId) throws Exception |
| | | { |
| | | TestTimer timer = new TestTimer.Builder() |
| | | .maxSleep(60, SECONDS) |
| | | .sleepTimes(100, MILLISECONDS) |
| | | .toTimer(); |
| | | timer.repeatUntilSuccess(new CallableVoid() |
| | | { |
| | | @Override |
| | | public void call() throws Exception |
| | | { |
| | | assertGenIdEquals(expectedGenId); |
| | | } |
| | | }); |
| | |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014-2016 ForgeRock AS. |
| | | * Portions copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.opends.server.tasks; |
| | | |
| | |
| | | boolean isLoopback = localAddress.isLoopbackAddress(); |
| | | String[] args = |
| | | { |
| | | "-h", localIP, |
| | | "-h", "127.0.0.1", |
| | | "-p", String.valueOf(TestCaseUtils.getServerLdapPort()), |
| | | "-b", "", |
| | | "-s", "base", |
| | |
| | | // anonymous connection. |
| | | args = new String[] |
| | | { |
| | | "-h", localIP, |
| | | "-h", "127.0.0.1", |
| | | "-p", String.valueOf(TestCaseUtils.getServerLdapPort()), |
| | | "-b", "", |
| | | "-s", "base", |
| | |
| | | # information: "Portions Copyright [year] [name of copyright owner]". |
| | | # |
| | | # Copyright 2016 ForgeRock AS. |
| | | # Portions Copyright 2026 3A Systems LLC. |
| | | dn: cn=config |
| | | changetype: modify |
| | | replace: ds-cfg-notify-abandoned-operations |
| | |
| | | - |
| | | replace: ds-cfg-default-throwable-stack-frames |
| | | ds-cfg-default-throwable-stack-frames: 500 |
| | | |
| | | dn: cn=Multimaster Synchronization,cn=Synchronization Providers,cn=config |
| | | changetype: modify |
| | | replace: ds-cfg-connection-timeout |
| | | ds-cfg-connection-timeout: 30000 ms |