Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

license error #2

Open
EUConsulting opened this issue Sep 6, 2024 · 35 comments
Open

license error #2

EUConsulting opened this issue Sep 6, 2024 · 35 comments

Comments

@EUConsulting
Copy link

EUConsulting commented Sep 6, 2024

hi
I downloaded the Interbase-Docker image and installed it successfully
I inserted the license that came with my recently purchased copy of Delphi 12 Enterprise and the registration process was completed successfully
I successfully used Interbase on Docker by migrating some databases from the 2020 version of Windows which has the same license
I restarted the container out of necessity and access to Interbase was denied, in the log I find that the product is NOT licensed and to reinstall the license.

d1e58e510664 (Server) Fri Sep 6 14:37:43 2024
NO DATABASE NAME
Product is not registered. Please register and restart
Registration file error: use Registration Code: 7190330

Why does this happen?
How can I reinstall the license without having to destroy the container?
Help, thanks

@EUConsulting
Copy link
Author

this problem is generated by the gds port change
you need to generate a container with the port change by modifying all the references to the 3050 in the various scripts
doing so it works

@lmbelo
Copy link
Member

lmbelo commented Sep 28, 2024

@EUConsulting are you running the container with a volume assigned? I don’t see any apparent reason of licensing problems related to the server port.

@EUConsulting
Copy link
Author

EUConsulting commented Sep 29, 2024

Hi
if you want to reproduce the problem you have to use all your instructions, change only the dockerfile with port 3060 (for example) but do not touch the values.txt (it was a stupid oversight of mine)
the installation works perfectly
you give the license and it responds correctly registered
do a login from the ibconsole on windows
everything ok
restart the container and you will see that it does not work anymore and in the interbase log (interbase.log under /opt/interbase) you will find the corrupt license report
sorry for my english but I use google translate

@lmbelo
Copy link
Member

lmbelo commented Sep 30, 2024

Well, it is not necessary to change the port from container side, you only need to map it to any eternal one. If you change the container port, you also need to update the values.txt file with your new port.

@EUConsulting
Copy link
Author

Thanks for the advice
I needed to change the gds port because on the machine where Docker runs there is also Interbase 2020 on Windows
The other week we transferred with a Backup from the Windows IB Console and a Docker cp a 5 GB Interbase DB and always with the IB console on Windows we did the Restore directly on Linux
Everything works!!!
Also all the DB management on Linux from the IB console on Windows works perfectly.
Our software also seems to work regularly with the DB on Linux.

The only thing is not possible to do a backup and a direct restore with the Windows IB Console but only using a docker cp to transfer the ibk.
It could be an interesting additional feature.
Raffaele
Ciao

@lmbelo
Copy link
Member

lmbelo commented Sep 30, 2024

You can place your database in the volume created for your container in the host machine. Have you tested this approach?

@EUConsulting
Copy link
Author

the databases are on a shared volume between the various containers in this way if I lose the IB container I do not lose the databases. Is this what you meant?

@lmbelo
Copy link
Member

lmbelo commented Sep 30, 2024

Exactly. But you mentioned before that you're sharing your database between environments, right? So you only need to copy the database from origin machine to destination volume.

@EUConsulting
Copy link
Author

ok!!!!!
Grazie!
thank you very much

@EUConsulting
Copy link
Author

Hi
Sorry to bother you but it happened again that the license was canceled.
on September 29th everything was ok
on September 30th it died
I assure you that absolutely nothing has changed except the internal IP that is assigned by the router and it went from 192.168.1.11 to 192.168.1.12 due to the need to restart the router
can you help me?
I'm completely stuck with development and testing.
the interbase log has reached 2GB

/--------------------------------------------------------------------------------------------------------------------/
ec3f61f7759b (Client) Sun Sep 29 09:02:29 2024
/opt/interbase/bin/ibguard: guardian starting bin/ibserver

ec3f61f7759b (Server) Sun Sep 29 09:02:29 2024
Server: Production, version: 14.6.0.899 (64-bit), Licensed CPUs: 8,
ibconfig settings...
SWEEP_QUANTUM: 250, USER_QUANTUM: 1000,
SWEEP_YIELD_TIME: 1 ms, SQL_COMPILER_RECURSION: 2000,
MAX_THREADS: 1000000, MAX_ASSISTANTS: 3

ec3f61f7759b (Client) Mon Sep 30 08:16:02 2024
/opt/interbase/bin/ibguard: guardian starting bin/ibserver

ec3f61f7759b (Server) Mon Sep 30 08:16:02 2024
Server: Production, version: 14.6.0.899 (64-bit), Licensed CPUs: 8,
ibconfig settings...
SWEEP_QUANTUM: 250, USER_QUANTUM: 1000,
SWEEP_YIELD_TIME: 1 ms, SQL_COMPILER_RECURSION: 2000,
MAX_THREADS: 1000000, MAX_ASSISTANTS: 3

ec3f61f7759b (Client) Mon Sep 30 08:20:15 2024
/opt/interbase/bin/ibguard: guardian starting bin/ibserver

ec3f61f7759b (Server) Mon Sep 30 08:20:15 2024
Server: Production, version: 14.6.0.899 (64-bit), Licensed CPUs: 8,
ibconfig settings...
SWEEP_QUANTUM: 250, USER_QUANTUM: 1000,
SWEEP_YIELD_TIME: 1 ms, SQL_COMPILER_RECURSION: 2000,
MAX_THREADS: 1000000, MAX_ASSISTANTS: 3

ec3f61f7759b (Client) Mon Sep 30 08:27:33 2024
/opt/interbase/bin/ibguard: guardian starting bin/ibserver

ec3f61f7759b (Server) Mon Sep 30 08:27:33 2024
NO DATABASE NAME
Product is not registered. Please register and restart
Registration file error: use Registration Code: 12897810

ec3f61f7759b (Server) Mon Sep 30 08:27:33 2024
InterBase licensing error.
Please check the interbase.log file for details.
/--------------------------------------------------------------------------------------------------------------------/
where am I going wrong?
Grazie
Ciao
Raffaele

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

Hello @EUConsulting, you're not bothering 💪

Can you share the exactly same command you're using to run your container, please?

@EUConsulting
Copy link
Author

EUConsulting commented Oct 1, 2024

Sorry for delay
docker start
docker inspect.txt
license ib from docker.zip

I use the docker console to start the container
I'm attaching some details for you
in the zip there are the license files downloaded from the iblicense volume
this is the command taken from the docker menu (copy docker run)

/*******************************************/
docker run --hostname=ec3f61f7759b --mac-address=02:42:ac:11:00:03 --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --volume=data-volume:/usr/volume_condiviso --network=bridge -p 3060:3060 -p 3070:3070 -p 8200:8200 --restart=no --label='org.opencontainers.image.ref.name=ubuntu' --label='org.opencontainers.image.version=18.04' --runtime=runc -d docker.io/library/ib2020u6

/*******************************************/
this is the view packages

LABEL org.opencontainers.image.ref.name=ubuntu
LABEL org.opencontainers.image.version=18.04
ADD file:3c74e7e08cbf9a87694ce6fa541af617599680fa54d9e48556fc0fbc120b4a83 in /
CMD ["/bin/bash"]
RUN /bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yy install --no-install-recommends unzip && apt-get -y autoremove && apt-get -y autoclean # buildkit
RUN /bin/sh -c echo "gds-db 3060/tcp gds_db # InterBase server" >> /etc/services echo "gds_db 3060/tcp #InterBase Server" >> /etc/services # buildkit
COPY values.txt ./values.txt # buildkit
ADD https://altd.embarcadero.com/download/interbase/2020/Update6/InterBase_2020_Linux.zip ./ibinstall.zip # buildkit
RUN /bin/sh -c unzip ibinstall.zip # buildkit
RUN /bin/sh -c chmod +x install_linux_x86_64.sh # buildkit
RUN /bin/sh -c sh ./install_linux_x86_64.sh -f values.txt # buildkit
RUN /bin/sh -c rm ibinstall.zip rm ib_install_linux_x86_64.bin rm install_linux_x86_64.sh rm install_linux_x86.sh rm ib_install_linux_x86.bin rm -rf ./setup # buildkit
COPY ibstart.sh ./ibstart.sh # buildkit
RUN /bin/sh -c chmod +x ./ibstart.sh # buildkit
CMD ["/bin/sh" "-c" "./ibstart.sh"]
EXPOSE map[3060/tcp:{}]

if you need anything else let me know

Thank thank thank thank ........
Ciao
Raffaele

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

Try running your container directly with the following command:

docker run -it -p 3050:3050 --name interbase --mount source=iblicense,target=/opt/interbase/license --mount source=interbase,target=/opt/interbase docker.io/library/ib2020u4

I'm not sure if you have configured volumes on Docker Desktop, but try to reproduce your issue running your container like the script above.

@EUConsulting
Copy link
Author

I updated the comment with more data

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

You're not mapping volumes properly. I'm very sure you won't face that again running the script I have shared.
Another question: are you running Docker over WSL?

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

I'd suggest you to rebuild your image locally using the same version here in this repo and also run your containers using the script I've shared, let's see what happens...

@EUConsulting
Copy link
Author

i use wsl

@EUConsulting
Copy link
Author

I'd suggest you to rebuild your image locally using the same version here in this repo and also run your containers using the script I've shared, let's see what happens...

OK I'll do as you say the only thing I use is update 6 of ib 2020 and port 3060 for gds
are there any problems?

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

You don't need to change gds port internally, you can change it in the run script, as follows:

docker run -it -p 3060:3050 --name interbase --mount source=iblicense,target=/opt/interbase/license --mount source=interbase,target=/opt/interbase docker.io/library/ib2020u4

This will redirect port 3060 in your host to 3050 in your container.

  • It is very important to keep this instruction as is:
--mount source=iblicense,target=/opt/interbase/license --mount source=interbase,target=/opt/interbase

Regarding update 6, it's all good!

@EUConsulting
Copy link
Author

tomorrow I will do as you told me here it's 8:00 pm and they are walling me up alive in the office

thanks a lot
I'll update you anyway
Bye
Raffaele

@lmbelo
Copy link
Member

lmbelo commented Oct 1, 2024

I'm also providing you access at first hand to the beta version of the new Docker scripts. Checkout the beta branch from this repo and run the [build.sh] and [run.sh].

@EUConsulting
Copy link
Author

Hi Lucas
First of all, thank you very much for the support
Here are the things I did

  1. I downloaded the beta
  2. I modified the run.sh introducing the port 3060 and the volume I wanted to share

/********** RUN.SH MODIFIED ***********************************/
#!/usr/bin/env bash

NAME="interbase"
PORT="3060"
VERSION="latest"
DETACH=false

while [ $# -gt 0 ]; do
case "$1" in
--name|-n)
if [[ "$1" != = ]]; then shift; fi
NAME="${1#=}"
;;
--port|-p)
if [[ "$1" != = ]]; then shift; fi
PORT="${1#
=}"
;;
--version|-v)
if [[ "$1" != = ]]; then shift; fi
VERSION="${1#*=}"
;;
--detach|-d)
DETACH=true
;;
--help|-h)
printf "Usage: run.sh [OPTIONS]\n\n"
printf "Example 1: run.sh --detach --name my_database --port 3050 --version latest\n\n"
printf "Example 1: run.sh -d -n my_database -p 3050 -v latest\n\n"
printf "Options:\n"
printf " --name, -n NAME\tSpecify the name of the container - default: ${NAME}\n"
printf " --port, -p PORT\tSpecify the port to be used by InterBase - default: ${PORT}\n"
printf " --version, -v VERSION\tSpecify the InterBase tag to be used as image - default: ${VERSION}\n"
printf " --detach, -d\t\tRun in detached mode - default: ${DETACH}\n"
printf " --help, -h\t\tDisplay this help and exit\n"
exit 0
;;
*)
>&2 printf "Error: Invalid argument\n"
exit 1
;;
esac
shift
done

if [ "$DETACH" = true ]; then
DETACH_ARG="-d"
else
DETACH_ARG="-it"
fi

docker run $DETACH_ARG
-p $PORT:3050
--name $NAME
--mount type=volume,source=iblicense,target=/opt/interbase/license
--mount type=volume,source=interbase,target=/opt/interbase
--mount type=volume,source=data_volume,target=/usr/shared_volume
radstudio/interbase:$VERSION

/************************************************/

  1. I launched the build.sh
  2. I launched the run.sh but it failed, that is, it exited without running the container and without messages
  3. I used the docker run manually

//
docker run -it -p 3060:3050 --name interbase --mount source=iblicense,target=/opt/interbase/license --mount source=interbase,target=/opt/interbase --mount type=volume,source=data_volume,target=/usr/shared_volume radstudio/interbase:latest
/
/

this worked correctly
I entered the license and started the container from docker and i connected from ib console on windows successfully
There is only one problem:
the --mount of my volume created a new data_volume (now I have 2 with the same name)
and the folder /usr/shared_volume is linked to the new data_volume which is obviously empty

the instruction I used mounted the right volume
//
-v data-volume:/usr/shared_volume
/
/
in the --mounth maybe I should have used the type=bind

And I should study DOCKER more!

but this is not a problem we solve it differently for now

I have a BIG question for you
But if I uninstall the ib container is the license installation counter restored or do we have to open a ticket to have it restored?
We should do several tests before establishing the right strategy

Thank you so much
Ciao
Raffaele

@lmbelo
Copy link
Member

lmbelo commented Oct 2, 2024

Raffaele, some considerations:

  1. Don't change the run.sh script: you can set the port as an argument, for instance:
./run.sh -d --name YOUR_CONTAINER_NAME --port YOUR_PORT_NUMBER --version latest
  1. Do not use binds: binds are slower and more error prone than volumes. Consider using the default volumes as defined in the run.sh script. It will create two volumes: 1) For InterBase license 2) For InterBase installation.

You only need to run the run.sh script as described above, It will work perfectly fine for you. There are further instructions in the readme.md file as well.

@lmbelo
Copy link
Member

lmbelo commented Oct 2, 2024

I have a BIG question for you
But if I uninstall the ib container is the license installation counter restored or do we have to open a ticket to have it restored?
We should do several tests before establishing the right strategy

Hmmm... I didn't get it, can you try to explain again, please?

@EUConsulting
Copy link
Author

EUConsulting commented Oct 2, 2024

Raffaele, some considerations:

  1. Don't change the run.sh script: you can set the port as an argument, for instance:
./run.sh -d --name YOUR_CONTAINER_NAME --port YOUR_PORT_NUMBER --version latest
  1. Do not use binds: binds are slower and more error prone than volumes. Consider using the default volumes as defined in the run.sh script. It will create two volumes: 1) For InterBase license 2) For InterBase installation.

You only need to run the run.sh script as described above, It will work perfectly fine for you. There are further instructions in the readme.md file as well.

ok
you're right, I rushed things and didn't see that it was a topic to give to run.sh
i'll be more careful in the future
GRAZIE!
will i also find instructions to mount another volume shared by other containers?

@EUConsulting
Copy link
Author

I have a BIG question for you
But if I uninstall the ib container is the license installation counter restored or do we have to open a ticket to have it restored?
We should do several tests before establishing the right strategy

Hmmm... I didn't get it, can you try to explain again, please?
let me explain better
each installation is linked to my Delphi license (5000 euros) and allows up to a maximum of 5 installations then it stops
this is the 4th (1 Delphi and 3 Interbase containers)
If I now reinstall interbase to use the run.sh correctly and to connect my shared volume I will reach the limit of the license counter
I hope I explained myself better

@EUConsulting
Copy link
Author

EUConsulting commented Oct 7, 2024

Good morning Lucas
I'm sorry....
I inform you that the Interbase license has become corrupted again.
It seems that the weekend is hurting it
The log always seems the same to me.
I'll tell you exactly what I did:

  1. I started the Interbase container
  2. I started the PAServer container
  3. PAServer raised an exception on port 64211 (this often happens when there are Microsoft updates)
  4. I waited for the Microsoft updates to finish
  5. I closed Docker (I can't tell you if I had stopped the containers, I'm not sure)
  6. I restarted the PC
  7. I started the PAServer container (Everything ok)
  8. I started the Interbase container and the license no longer worked.
    It could be that this sequence causes the license to become corrupted.

I honestly think that Embarcadero should review the logic on how the license should be corrupted.
In my opinion, it is normal that various types of tests are done before arriving at a correct planning and the fact that the license is corrupted so easily is a significant waste of time.

I will try to install it again today hoping that it does not block due to the limit of the Embacadero license plan, using all your advice and without changing anything.

I ask you a question to see if I understood what you wrote to me:
I need the databases to be on a shared volume, is it appropriate to use one of the volumes that are created in the interbase installation and not add one of our own?
If I must necessarily use the volumes created in the installation, can I then share them with other containers or will I have problems?
if we wanted to use docker compose to manage volumes could it have problems?

I attach the corrupted license and part of the log

I thank you if you can give me support if necessary
Ciao Raffaele
/***********************************************************************/
15eab3b2707b (Server) Mon Oct 7 08:58:58 2024
InterBase licensing error.
Please check the interbase.log file for details.

15eab3b2707b (Client) Mon Oct 7 08:58:58 2024
/opt/interbase/bin/ibguard: bin/ibserver [ instance: gds_db ] terminated abnormally (-1)

15eab3b2707b (Client) Mon Oct 7 08:58:58 2024
/opt/interbase/bin/ibguard: guardian starting bin/ibserver

15eab3b2707b (Server) Mon Oct 7 08:58:58 2024
NO DATABASE NAME
Product is not registered. Please register and restart
Registration file error: use Registration Code: 7160274

15eab3b2707b (Server) Mon Oct 7 08:58:58 2024
InterBase licensing error.
Please check the interbase.log file for details.

license corrupted.zip

@EUConsulting
Copy link
Author

Hi Lucas
I saw that you posted some updates on the beta
I'll download it and try it hoping that the license doesn't get corrupted on this one too
I asked you some questions in the previous comment if by chance you have the desire and time let me know
sorry for the inconvenience
Ciao Raffaele

@lmbelo
Copy link
Member

lmbelo commented Oct 9, 2024

@EUConsulting sorry for the delay. You need to set the same volumes every time you start a container. Changes applied in your container are not persistent, that's why you need to store them in your local machine. Supposedly you've registered IB using volume IBLicense, you'll need to point to this volume every time you start your container.

@lmbelo
Copy link
Member

lmbelo commented Oct 9, 2024

@EUConsulting what is your Skype?

@EUConsulting
Copy link
Author

EUConsulting commented Oct 10, 2024

@EUConsulting sorry for the delay. You need to set the same volumes every time you start a container. Changes applied in your container are not persistent, that's why you need to store them in your local machine. Supposedly you've registered IB using volume IBLicense, you'll need to point to this volume every time you start your container.

Hi Lucas
I haven't tried to install the IB container you modified 5 days ago, the previous one is dead as I already told you.
Anyway ...
I'll point out that I'm not a DOCKER expert, I've been studying it for a couple of months
I'll give you a little summary of what's on the PC:
-Windows 10
-Delphi 12.1 (we'll wait a little longer to install 12.2, first we'll monitor the reports on the Embarcadero quality portal)
-Interbase Server 2020 update 6
-Docker Desktop 4.33.1 (161083)

For now the containers are on this machine and not distributed in the cloud (We still have to decide if we'll use AWS, Azure or something else).

I read what you told me and I hope I understood

I tell you that to your RUN.sh I only added the mount of a volume where there are DBs in addition to the use of port 3060:3050 instead of 3050:3050 for the gds, this to avoid it clashing with the 3050 of Windows Interbase.
The mount was appended to your mount statements during the container creation phase (DOCKER RUN)

docker run $DETACH_ARG
-p $PORT:3050
--name $NAME
--mount type=volume,source=iblicense,target=/opt/interbase/license
--mount type=volume,source=interbase,target=/opt/interbase
--mount type=volume,source=data-volume,target=/usr/shared-volume
radstudio/interbase:$VERSION

As you can read I use an absolute path to mount my volume

You have to think that I could have two containers with Interbase Server (Primary and Backup) and if one container does not work the other one, that's why we think of the Databases on a shared volume.

If you see it is the same thing you did in the beta version 5 days ago (I saw that you added a mount volume ibdata).
Logically, at every DOCKER START that volume should be consistent and mounted on the container like the other 2 volumes that your RUN.sh creates
The IBlicence volume is mounted in RUN as expected by your RUN.sh and is not touched at all during the START
Volumes created for Interbase are not shared or used by other containers
The peculiarity in all 3 times that the license got corrupted is the number of days, more or less 5/6 of use and then it gets corrupted
I think the problem could be in how the DOCKER Console restarts a Container or if it is closed without stopping the container
Could it be? Or am I unpleasant to them at Interbase
Ciao Raffaele

@EUConsulting
Copy link
Author

EUConsulting commented Oct 10, 2024

@EUConsulting what is your Skype?

Lucas I speak very little English, just to survive when I go abroad, but I read it fairly well.

https://join.skype.com/invite/OWOcIg9J43dk

Skype name : live:33738c375279d6e2

@EUConsulting
Copy link
Author

EUConsulting commented Oct 11, 2024

Hi Lucas
Embarcadero has granted us 6 more installations to do the tests
I will be out of the office for work from Monday to Thursday, in any case I will be able to read any news from you but I will not be able to do the tests.

@lmbelo
Copy link
Member

lmbelo commented Oct 22, 2024

Hello @EUConsulting,

It appears that the issue you're facing may be related to a change in your host system's network ID, which can unfortunately corrupt the license in our Docker container. We are actively exploring solutions to simplify and improve the reliability of the registration process for Docker environments.

I will keep you updated with any progress or news on this matter.

Thank you for your patience, and please feel free to reach out if you have any further questions or concerns.

@EUConsulting
Copy link
Author

Good morning Lucas
That's what I suspected
This week we are scheduled to install the new beta you released and start reliability tests in the Docker Desktop environment
We will let you know if we encounter any problems
For the second half of November we plan to repeat the tests in the Docker Enterprise environment to simulate as close as possible to the reality of the Cloud (internal network, minikube to simulate kubernetes, replicas and so on)
If all goes well we will transfer everything to AWS at the beginning of the year
Our two applications will be released with both Interbase and MySql
If you have any reports or advice on this matter they will be greatly appreciated by us.
Greetings from Italy
Ciao Raffaele

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants