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

Could not connect in container because "The evaluation period has expired"

Open sanxera opened this issue 2 years ago • 7 comments

I need help with a situation:

I have the following image installed on my Docker: mcr.microsoft.com/mssql/server:2022-latest

And from it I created a container, and in that container I created my database, but today I received the following error when trying to start the container:

2022-11-21 21:02:47 Error: The evaluation period has expired.
2022-11-21 21:02:47 /opt/mssql/bin/sqlservr: PAL initialization failed. Error: 104

I understand that it may be a license related problem, but I don't know how to solve it. And if it is the case that I need to update my image, is it possible to do this without losing my entire database?

I'm using Windows 11 with docker desktop

sanxera avatar Nov 22 '22 00:11 sanxera

Facing the same issue from MacOS

develanton avatar Nov 22 '22 19:11 develanton

Same here! I switched to mcr.microsoft.com/mssql/server:2019-latest to work around it. I am using MSSQL_PID: "Developer" and ACCEPT_EULA: "Y".

aristotelos avatar Nov 23 '22 07:11 aristotelos

(Warning: RANT) This will never be fixed as Microsoft doesn't seem to care about people using their db engines in containers

paoliniluis avatar Mar 04 '23 21:03 paoliniluis

I have exactly the same problem, and I can't backup my database because I can't start the container. I lost all database information?

israelcasado avatar Mar 04 '23 23:03 israelcasado

@israelcasado, yes, congrats for choosing Microsoft SQL server as your database engine

paoliniluis avatar Mar 04 '23 23:03 paoliniluis

@paoliniluis the same kind of data loss can happen with any database running in a container without proper volume configuration.

As for responsiveness... MS really isn't all that responsive to this repository on Github, and I'm pretty sure it isn't a priority. Might be worth messaging on twitter and/or raising the issue on the new go based cli client repo. I follow all issues in this repo, and help when/where I can. I'm not an MS employee and have no internal contacts with MS. I will say, the Azure SQL team is very responsive to issues and will help a lot in that space, if you're writing TDS client drivers, for example.

IMO, I wouldn't run MS-SQL if I wasn't tethered to it... I'd reach for PostgreSQL first and most often, which is pretty well supported as a service from most cloud providers, and runs containerized for development with lower overhead. Not to mention actual first class JSON support among others. But that's just my take.

tracker1 avatar Mar 08 '23 18:03 tracker1

@sanxera , Can I assume that original container that you were running was a preview build of SQL 2022 and you started having issues running it after GA release of SQL 2022? It appears that preview bits had expired and you couldn't start the container. Now typically our recommendation for SQL containers is to use host directory or a volume or some other persistent storage to host your database files. We provide this guidance at following.

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver16&pivots=cs1-bash#persist

This would allow you to deploy a new container with the existing persisted storage/volumes and start your container easily. That's how containers can make upgrade experience simple in many cases provided its planned properly.

Just in case you were running it as a test and created database within container itself, you could potentially copy out the database files from container, but that's a stretch and it may not work. It is still highly recommended to use some persistent storage device for hosting your data files.

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-configure?view=sql-server-ver16&pivots=cs1-bash#copy-files-from-a-container

tejasaks avatar Mar 08 '23 20:03 tejasaks