Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
234 Views

Error on provisioning

Jump to solution
I'm a team member from Incluit, I'm facing an EIS issue after I rebooted my machine. I can't perform a provisioning, do you have some workaround for this?
 
# sudo ./provision_eis.sh ../docker-compose.yml
System IP Address is: 192.168.0.233
Updating .env for container timezone...
Create eisuser if it doesn't exists. Update UID from env if already exists with different UID
INFO: Creating EIS install Directories
./provision_eis.sh: line 213: [: too many arguments
INFO: Installing dependencies..
The directory '/home/mvasquez/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mvasquez/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pyyaml==5.1.1 in /usr/local/lib/python3.6/dist-packages (from -r cert_requirements.txt (line 1))
INFO: Bringing down existing ETCD container
Stopping Service :  ia_etcd
Stopping Service :  ia_etcd_provision
Copying docker compose yaml file which is provided as an argument.
Clearing existing Certificates...
Checking ETCD port...
INFO: Checking if ETCD ports are already up...
2379/tcp:             8757
FATAL: 2379 is already being used, so please kill that process and re-run the script.

To add more context:
 
# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
 
# sudo lsof -i -P -n | grep etcd
etcd      8757         eisuser    3u  IPv4  76789      0t0  TCP 192.168.0.233:2380 (LISTEN)
etcd      8757         eisuser    5u  IPv4  76793      0t0  TCP 127.0.0.1:2379 (LISTEN)
etcd      8757         eisuser    6u  IPv4  76794      0t0  TCP 192.168.0.233:2379 (LISTEN)
etcd      8757         eisuser   11u  IPv4  79543      0t0  TCP 127.0.0.1:36528->127.0.0.1:2379 (ESTABLISHED)
etcd      8757         eisuser   12u  IPv4  76798      0t0  TCP 127.0.0.1:2379->127.0.0.1:36528 (ESTABLISHED)
etcd      8757         eisuser   13u  IPv4  80224      0t0  TCP 192.168.0.233:42244->192.168.0.233:2379 (ESTABLISHED)
etcd      8757         eisuser   14u  IPv4  79544      0t0  TCP 192.168.0.233:2379->192.168.0.233:42244 (ESTABLISHED)
 
Yes, I've killed manually that process, but it's created again and again. Do you know if there some workaround to avoid to reinstall again the framework?
0 Kudos

Accepted Solutions
Highlighted
Novice
127 Views

Not sure what else could generate some conflict with EIS, but I've rebooted my computer several times, and I always fixed the issue with these commands:
# systemctl restart docker.service
# xhost +

View solution in original post

0 Kudos
9 Replies
Highlighted
Moderator
201 Views

Hi @mvasquez 

For below issue, can you just try to remove the etcd image and do the re-provision again?

You can remove the image by using below command

$ dokcer rmi -f <image>

after done cleaning up the etcd image, you can run the step for provisioning again.

 

Let me know if this method is working for you.

0 Kudos
Highlighted
195 Views

Actually, if I am not mistaken, you have ETCD ports taken even when there are no Docker containers running, implying the ETCD service is run from the host OS. Can you double check?

If this is the case, please make sure that by stopping this ETCD instance, it doesn't break what's already running and depending on this ETCD cluster.  If you are not sure, you might want to find another device that's clean to set up EII (Edge Insights for Industrial, previously known as EIS). 

0 Kudos
Highlighted
Novice
189 Views

Hi, I've removed this images with the indicated command, but I still can see a process taken the port 2379.

# docker images

  ia_etcd_provision 2.3 376fb81c0989 3 days ago 194MB

  ia_etcd 2.3 f0c451c6fc74 3 days ago 181MB

# dokcer rmi -f 376fb81c0989

# dokcer rmi -f f0c451c6fc74

On the other hand, there is no Docker container running.

Thanks.

0 Kudos
Highlighted
Novice
186 Views

Hi, I think this is the case because I can't see a running Docker container. The point is that I don't know how to stop this ETCD instance. I locate the process id and killed it, but its created with a new process id, taking the port 2379 again:

# sudo lsof -i -P -n | grep etcd

# sudo kill -9 8339

0 Kudos
Highlighted
Novice
171 Views

Hi all, this is the workaround I found to stabilize EIS (all Docker containers UP) every time I reboot the computer and got the reported issue.

docker-compose down
ps axf | grep etcd -B 5
sudo kill -9 <./start_etcd.sh PID>
systemctl restart docker.service
xhost +
sudo ./provision_eis.sh ../docker-compose.yml
docker-compose up --build -d
0 Kudos
Highlighted
Moderator
159 Views

Hi @mvasquez 

From the situation that you mentioned below, you already can get all the container up and running after you reboot the system may I know what is running?

If you already run the container, after rebooting the system all the containers should be running you will only need to run the xhost + command for the visualizer. 

can you help to give a list of docker containers that run before and after rebooting the system?

0 Kudos
Highlighted
148 Views

If you do "systemctl | grep etcd" from the host, do you see any entry? If there is one and you are sure this ETCD instance isn't used for anything, you can use "systemctl stop [servicename]" and "systemctl disable [servicename]" to stop it from running in the future.

0 Kudos
Highlighted
Novice
128 Views

Not sure what else could generate some conflict with EIS, but I've rebooted my computer several times, and I always fixed the issue with these commands:
# systemctl restart docker.service
# xhost +

View solution in original post

0 Kudos
Highlighted
Moderator
114 Views

Hi @mvasquez 

 

As mentioned in the user guide and read me. The xhost + command need to be rerun everytime after rebooting the system  because this is needed by ia_visualizer service to render the UI. 

May I know what will be the behaviour if you just running this command after rebooting without doing systemctl restart docker.service command ?

0 Kudos