Azure-Samples / Azure-Samples/azure-data-factory-runtime-app-service

"The Workstation service has not been started"

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
11
Forks
11
PR merge metrics
No merged PRs in 30d

Description

### This issue is for a: (mark with an `x`)
```
- [ X] bug report
```

### Minimal steps to reproduce
> - Build the docker container
> - Deploy to App Service

### Any log messages given by the failure
> Site: app-adf-xxxx-14-dev-1 - Purging after container failed to start 21/09/2023 13:05:36.858 ERROR - Site: app-adf-xxxx-14-dev-1 - Unable to start container. Error message: The Workstation service has not been started.

### OS and Version?
> servercore:ltsc2019

### Versions
> SHIR: 5.34.8675.1 (latest)
> Server Core image: servercore:ltsc2019 (latest)
> To get the dockerfile, please scroll down

Hey,

First of all, thanks a lot for your work!
SHIR instances in Apps Services worked perfectly for long months.

Since the update of Server Core image (servercore:ltsc2019) and Integration Runtimes on September,
start of the Windows Container in App Service failing with error of Workstation Windows Service:
`Error message: The Workstation service has not been started.`
Getting same error when the the SHIR removed from the container.

Microsoft Support informed us that running SHIR instances in App Services NOT supported by Microsoft.

```
Please find the below document which confirm it is not recommended to host self-hosted IR in App Service:
https://learn.microsoft.com/en-us/azure/data-factory/how-to-run-self-hosted-integration-runtime-in-windows-container#limitations
"There is a known issue when hosting an Azure Data Factory self-hosted integration runtime in Azure App Service. Azure App Service creates a new container instead of reusing existing container after restarting. This may cause self-hosted integration runtime node leak problem."
The web apps ( App services ) are not recommended to run background tasks the web app purpose is to serve HTTP requests.
```

Regards,
Gabor Bernics
Allianz Technology

```
FROM mcr.microsoft.com/windows/servercore:ltsc2019
ARG FEATURE_LARGE_OBJECTS=false
ARG FEATURE_JRE=false
ARG FEATURE_SNOWFLAKE=false
ARG FEATURE_SAS_DRIVER=false
ARG FEATURE_CLOUDFOUNDRY=false

ARG FILE_LOCATION_SHIR=""
ARG FILE_LOCATION_JRE="https://xxxx.blob.core.windows.net/xxxx/jre-8u341-windows-x64.exe"
ARG JRE_VERSION="1.8.0_341"

# Download the latest self-hosted integration runtime installer into the SHIR/INSTALL folder
COPY SHIR/INSTALL C:/SHIR/INSTALL

# Use powershell as the default shell environment
SHELL ["powershell", "-command"]

# Install Tibco ODBC Driver
RUN cd "C:\SHIR\INSTALL"; .\CsOdbcInstall83_x64.exe -install

# Install the Self-hosted Integration Runtime in the Windows container
COPY SHIR/build.ps1 C:/SHIR
RUN ["powershell", "C:/SHIR/build.ps1"]

# Install Dependencies of Self-hosted Integration Runtime in the Windows container
COPY SHIR/build-dependencies.ps1 SHIR/export-logs.ps1 C:/SHIR/
RUN ["powershell", "C:/SHIR/build-dependencies.ps1"]

# Install Customer-specific Features for Self-hosted Integration Runtime in the Windows container
COPY SHIR/build-features.ps1 C:/SHIR/
RUN ["powershell", "C:/SHIR/build-features.ps1"]

# Install Az powershell module
RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
RUN Install-Module -Name Az.Accounts -RequiredVersion 2.9.1 -Scope CurrentUser -Repository PSGallery -Force
RUN Install-Module -Name Az.Datafactory -RequiredVersion 1.16.8 -Scope CurrentUser -Repository PSGallery -Force

RUN sc stop LanmanWorkstation
RUN Set-Service -Name LanmanWorkstation -StartupType Disabled
# Add remaining scripts
COPY SHIR/health-check.ps1 SHIR/setup.ps1 C:/SHIR/

ENV SHIR_WINDOWS_CONTAINER_ENV True

HEALTHCHECK --start-period=120s CMD ["powershell", "C:/SHIR/health-check.ps1"]

# Set up and run the Self-hosted Integration Runtime
ENTRYPOINT ["powershell", "C:/SHIR/setup.ps1"]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.