mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

Issue Full-Text Search is not installed, or a full-text component cannot be loaded. on windows container

Open pbunluesin opened this issue 7 years ago • 27 comments

Hey Guy, I found this error when I added full-text search to my container. How can I solve it ??

Thank you in advance.

pbunluesin avatar Sep 25 '17 09:09 pbunluesin

I found this error when I added full-text search to my container.

How did you add the full-text feature to your container? I am using image "microsoft/mssql-server-windows-developer" and this feature is not installed out of the box. I am struggling now on how I can add this feature for an existing instance. I know via GUI this can be done. There might be also some ways to install a new instance from command line whith specific options. But I don't know a way to add features from command line to an existing instance (installation).

pulla2908 avatar Oct 13 '17 09:10 pulla2908

You would need to use the published Dockerfile and change the command line parameters to include the features you want and then build your own image. Dockerfile: https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile Command line parameters (look for FEATURES parameter): https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt#Feature

twright-msft avatar Oct 13 '17 22:10 twright-msft

@twright-msft I managed to successfully change the command line parameters to include FullText for the Developer version. However, this does not work for the SQL Server Express version. Example Docker file: https://github.com/robinho81/mssql-server-windows-express-fts

Any reason why this is? I had assumed that SQL Server Express supported Full Text search...

robinho81 avatar Oct 27 '17 13:10 robinho81

Glad to hear that you got FTS working in the Developer Edition. Sorry, Express Edition doesnt have FTS in it. https://docs.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2017

twright-msft avatar Oct 30 '17 04:10 twright-msft

If anyone else ends up here, adding FTS to SQL Server on Linux seems a little easier as there's no need to edit and rebuild the Dockerfile as you can base your work on microsoft/mssql-server-linux. These are the key bits for installing FTS (taken from here):

apt install -y curl
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
apt update
apt install -y mssql-server-fts

I guess you can do the same and modify the previous installation on Windows with the downloaded SQL.exe.

ljani avatar Dec 14 '17 12:12 ljani

I tried adding FTS on Linux using the dockerfile mentioned above but its not as straight forward as it sounds. See the issue here.

fhilton avatar Jan 09 '18 21:01 fhilton

If you are trying to do this on Linux please use the full dockerfile example here: https://github.com/Microsoft/mssql-docker/blob/master/linux/preview/examples/mssql-agent-fts-ha-tools/Dockerfile

twright-msft avatar Jan 10 '18 16:01 twright-msft

Express Edition doesnt have FTS in it

is this new for 2017? i'm pretty sure previous releases of express had fts.

EDIT: yeah, the above quote from the Microsoft SQL Server program manager is clearly wrong: SQL Server with Advanced Services does include FTS.

Spongman avatar Feb 22 '18 02:02 Spongman

@twright-msft Would it be possible to tweak your Dockerfile with FTS to use SQL Server 2014 instead of 2017? I'm not sure what I should change!

EDIT : Oh well... If I understand properly, only >= 2017 is supported...

electrotype avatar Mar 22 '18 23:03 electrotype

@electrotype - the Dockerfile you pointed to is only for SQL Server on Linux. SQL Server on Linux was first released in SQL Server 2017.

You could try to tweak this Dockerfile and get FTS running on Windows containers. https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows/dockerfile

You would need to change the URL for the .box and .exe in the ENV variables at the top of the Dockerfile to point to the SQL Server 2014 versions of those files.

twright-msft avatar Mar 22 '18 23:03 twright-msft

I've revised the steps I posted above:

apt-get update
apt-get install --yes curl apt-transport-https
curl --fail --silent --show-error --location https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /usr/share/keyrings/microsoft-archive-keyring.gpg > /dev/null
curl --fail --silent --show-error --location https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sed "s@arch=amd64@arch=amd64 signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg@" | tee /etc/apt/sources.list.d/mssql-server.list > /dev/null
apt-get update
apt-get install --yes mssql-server-fts

The difference between this and the mssql-agent-fts-ha-tools example is that as per Debian's guidelines, the third-party key is not loaded via apt-key add.

ljani avatar Apr 19 '18 09:04 ljani

Regarding the Linux image: Since Microsoft has changed how the Docker images are build, installing mssql-server-fts does not work anymore (it'll warn about missing dependency of mssql-server). However, you can just extract the .deb and it should work:

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server-preview/pool/main/m/mssql-server-fts/mssql-server-fts_15.0.1500.28-1_amd64.deb
dpkg --extract mssql-server-fts_15.0.1500.28-1_amd64.deb /

And then docker restart the container.

root@c5b9f4b5b88c:/# /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P pa -Q "SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')"

-----------
          1

(1 rows affected)

ljani avatar May 08 '19 06:05 ljani

I've just added the full text search feature to the docker file install step, but then I had to follow these instructions: https://social.technet.microsoft.com/wiki/contents/articles/31786.sql-server-not-starting-after-fresh-installation.aspx

JesseKPhillips avatar Jul 10 '19 15:07 JesseKPhillips

I created a fork a while ago. Maybe this helps you: https://github.com/pulla2908/docker-mssql-server-windows-developer-fti

pulla2908 avatar Jul 10 '19 16:07 pulla2908

@pulla2908, it is interesting that you don't add the additional steps noted by the article. I wonder if it has to do with your use of server 2019 instead of 2016.

JesseKPhillips avatar Jul 10 '19 21:07 JesseKPhillips

@JesseKPhillips I immediately moved to 2019 because I wanted to have the latest version. Then I modified the setup to get full text index feature. Maybe this issue is connected to the windows server version but I have no further information about this.

pulla2908 avatar Jul 11 '19 17:07 pulla2908

I am having the same problem with RHEL 7 and SQL Server 2019. fts is installed yet SQL Server doesn't recognize it:

Full-Text Search is not installed, or a full-text component cannot be loaded.

skinfrakkijm avatar Dec 27 '19 18:12 skinfrakkijm

1> select @@version 2> go


Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Linux (Red Hat Enterprise Linux Server 7.6 (Maipo)) <X64>

(1 rows affected) 1>

skinfrakkijm avatar Dec 27 '19 18:12 skinfrakkijm

@skinfrakkijm To check if FTS is installed execute:

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')) print 'INSTALLED' else print 'NOT INSTALLED'
go

jmesa-sistel avatar Mar 18 '21 10:03 jmesa-sistel

SQL version:~ image

Trying to deploy a WINDOWS based 2019 SQL Express docker container with FTS. https://github.com/raviumishra/windows-sql2019-express-fts/blob/main/Dockerfile

Post-installation:~ image

raviumishra avatar Mar 23 '22 16:03 raviumishra

@raviumishra don't know why it is not working for you but in case SQL Server 2017 is also an option for you then you can use my docker definition which you can find here.

pulla2908 avatar Mar 23 '22 19:03 pulla2908

@pulla2908 Need to use SQL 2019 Is there a docker image available that configures: Express Edition with 'Advanced Services' . To use FTS we need to have 'Express Edition with Advanced Services' SELECT SERVERPROPERTY('Edition') shud return 'Express Edition with Advanced Services' instead of image

raviumishra avatar Mar 24 '22 09:03 raviumishra

@raviumishra About express edition I have no idea.

A while ago I was searching for box and env download URLs in order to move from SQL Server 2017 (Developer) to 2019 but I did not find them. If something can tell me how to get these URLs then I could update my docker definition. @raviumishra for you I don't know if e.g. Developer Edition is an option at all. However, I struggle with getting the URLs.

pulla2908 avatar Mar 24 '22 16:03 pulla2908

Here is my solution with docker compose and sql 2019 express. I'm using the official image from ms (mcr.microsoft.com/mssql/server:2019-latest) and install mssql-server-fts by the Dockerfile. Works perfectly.

docker-compose.yml: 'version: "3.3" services: mssql: container_name: mssql build: . # Dockerfile restart: always ports: - 50003:1433 dns: - 8.8.8.8 expose: - 1433 environment: # .env - ACCEPT_EULA=${ACCEPT_EULA} - MSSQL_PID=${MSSQL_PID} - SA_PASSWORD=${SA_PASSWORD} - TZ=${TZ} volumes: - type: volume source: data target: /var/opt/mssql

volumes: data:

networks: default: external: name: jobportal_network'

Dockerfile: ';# Source: https://hub.docker.com/r/johnfarnea/mssql-server-linux-fts ;# 20220408 modified by Christof Wiegand

FROM mcr.microsoft.com/mssql/server:2019-latest

USER root

;# Install curl since it is needed to get repo config ;# install gnupg2 (not installed in the image) ;# see also workaround curl with | tac | tac | : https://syntaxfix.com/question/16804/why-does-curl-return-error-23-failed-writing-body

RUN export DEBIAN_FRONTEND=noninteractive &&
apt-get update --fix-missing &&
apt-get install -y gnupg2 &&
apt-get install -yq curl apt-transport-https &&
curl https://packages.microsoft.com/keys/microsoft.asc | tac | tac | apt-key add - &&
curl https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list | tac | tac | tee /etc/apt/sources.list.d/mssql-server.list &&
apt-get update

;# Install optional packages. Comment out the ones you don't need ;# RUN apt-get install -y mssql-server-agent ;# RUN apt-get install -y mssql-server-ha RUN apt-get install -y mssql-server-fts

;# Run SQL Server process CMD /opt/mssql/bin/sqlservr'

ChrWieg avatar Apr 11 '22 09:04 ChrWieg