Why does my IRIS container exit on creation after adding additional varibles in the cmd

When I run the following cmd in Ubuntu 18.04

the container is created and stays running

But when I run this cmd, the container is created but exits immediately

Not sure why it is doing this.  if anyone can shed some light, it would be most appreciated.

  • 0
  • 0
  • 105
  • 15
  • 2

Answers

Have you checked the logs?  i.e. "docker logs iristest2"  Also it looks like when you are defining your ICM_SENTINEL_DIR environment variable you are using "--e" and not "-e".  I'm pretty sure you need to use either "-e" or "--env"

Hi Jim

updated the cmd to include --env, but still the same issue

checked the logs and the error is coming up as the following

PARSE ERROR: Argument: --volume

                               Couldn't find match for argument

Looks like I got my volume parameters wrong

if you run "sudo docker logs iristest2" do you have any logs?  Also I notice that you are running your docker commands via sudo...  Have you thought about adding the docker group (if you don't have one) and adding your user to the docker group, and then restarting your session, so that you don't have to use sudo (see below).  I'm wondering if you are having a permission issue with the volume

  1. sudo groupadd docker
  2. sudo usermod -aG docker $USER

Just a thought really not saying that definitively....

The --volume and --env switches are handled by the docker command. They should come before the image name.

HI jon

re jigged the script as you have suggested, it than creates the container but status isn't up and I get the error seen below

When I tweak the script slightly I get the following error, putting both --env options before the image name.

It looks like you're trying to run an image identified as efca5c59cbb7, but in this segment of the command line, iris is taken as the image name:

    --env ICM_SENTINEL_DIR=/license iris

You're sort of back to where you were before, with Docker switches occurring after the image name, although you now have the image name in there twice. I don't have your environment, so I can't test this exact command, but I think you want something like this:

    docker run -d --privileged -v /nfs/IRIS:/IRIS \
    --env ISC_DATA_DIRECTORY=/IRIS/iconfig \
    --env ICM_SENTINEL_DIR=/license \
    -p 52774:52774 --name IRIS4 efca5c59cbb7 \
    --key /IRIS/iris.key ...

If you're still having trouble, back up and build the command line incrementally. Start simple:

    docker run -d --name IRIS4 efca5c59cbb7

Then add in your Docker switches (-v, -e, -p, etc.), and finally add in the IRIS arguments (--key, etc.). That way you can tell which switch or argument is causing a problem.

Hi Jon

1.  docker run -d --name IRIS2 efca5c59cbb7

2.  docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774

3. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS

4. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig

5.  docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS

6. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS --key /IRIS/iris.key

7. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

All created fine but all exit on creation

So have also tried.

8. docker run -d --privileged -v /nfs/IRIS:/IRIS --env ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license iris --name IRIS4 efca5c59cbb7 -p 52774:52774 --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

than tried this --env ICM_SENTINEL_DIR=/license instead of --env ICM_SENTINEL_DIR=/license iris

9. docker run -d --privileged -v /nfs/IRIS:/IRIS --env ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license --name IRIS4 efca5c59cbb7 -p 52774:52774 --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

Done a few runs, but keep getting the following error highlighted in yellow

this is where the volume is located

And this is whats located on the share 

I'm finding it hard to read the output images, but every one of the commands that you listed has a Docker option after the image name. The form of the command should be:

    docker run <Docker opts> image_name <IRIS args>

To be clear, the -e (--env), -p (--publish), and -v (--volume) switches are Docker options; they go before the image name. The --key and --before switches are IRIS arguments; they go after the image name.

Take heart, I think you're getting close. I think all you need now is to quote the arguments to the --before switch, as shown in the documentation:

    --before "/usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/pwd.txt"

If you're still having trouble, build up the command incrementally, as I previously suggested, being careful to follow the correct form of the command.

Dmitry's answer about looking at log files will also give you more information than simply noticing in docker ps that the container has exited.

Weirdly enough I just noticed about 10 mins ago on my document I have missed the " on the password cmd. So ran it and got this

thought great than checked the logs and got the following

im just redownloading the license key now, just going to re run the image creation with the latest release, just in case the license is version specific

noticed it has created a iconfig folder on my nfs share but nothing else and nothing else inside, it did moan on the previous attempt that it couldn't find the password and license files so moved them down a folder level.

first of all, you have to check

docker logs iristest2

And while you trying to use durable %SYS, you look at IRIS log /nfs/IRIS/iconfig/mgr/message.log.

And as Jim already noticed, you have double dash when defining the variable ICM_SENTINEL_DIR