Intel® Edge Software Hub
Get answers from community peers to your questions about building Edge Software Hub solutions for edge compute node.
Announcements
Welcome to the Intel Community! If you like the answer to your question, please mark it as 'Accepted Solution' to help others.

The Edge Software Vision Package for Red Hat Enterprise Linux is now available here.

Learn more about developing on Intel® Hardware and Software here.

Error on provisioning

mvasquez
New Contributor I
1,185 Views
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?
Labels (1)
0 Kudos
1 Solution
mvasquez
New Contributor I
1,078 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
Murni_J_Intel
Moderator
1,152 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
mvasquez
New Contributor I
1,140 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
Jia-Shing_W_Intel
Moderator
1,146 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
mvasquez
New Contributor I
1,137 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
mvasquez
New Contributor I
1,122 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
Murni_J_Intel
Moderator
1,110 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
Jia-Shing_W_Intel
Moderator
1,099 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
mvasquez
New Contributor I
1,079 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 +

0 Kudos
Murni_J_Intel
Moderator
1,065 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
Reply