美文网首页
2024-05-22 slurm计算节点docker启动失败

2024-05-22 slurm计算节点docker启动失败

作者: 树懒吃糖_ | 来源:发表于2024-05-21 10:58 被阅读0次

集群重启后,计算节点docker 无法启动
systemctl start docker
systemctl status docker
systemctl daemon-reload #守护进程重启
systemctl restart docker

另外查看log
cat /var/log/messages |grep "docker"
守护进程的配置文件:/etc/docker/daemon.json 文件有错误
mv /etc/docker/daemon.json /etc/docker/daemon.json-bk
删除配置文件后,可以重新启动

集群投递任务的时候出现权限问题

#sbatch job.sh  #权限错误
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Wed May 22 09:42:30 CST 2024
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
Wed May 22 09:42:30 CST 2024

百度的建议:

方法1:
使用sudo 获得管理员权限,运行docker命令 #docker不建议用root 
方法2:
docker守护进程启动的时候,会默认赋予名为docker用户组写入Unix socket的权限
sudo groupadd docker #添加docker用户组
sudo gpasswd -a $USER docker #将登陆用户加入到docker用户组中
newgrp docker #更新用户组

考虑到需要再计算节点中创建用户,最后还是直接修改docker.sock 权限
chmod 777 /var/run/docker.sock #集群重启后权限会恢复原始状态

修改docker.sock 权限后出现新的问题:

Submitting remaining epitopes to NetChop
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 207, in _new_conn
    socket_options=self.socket_options,
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 802, in urlopen
    **response_kw,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 611, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 210, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x7ff877847a50>: Failed to resolve 'services.healthtech.dtu.dk' ([Errno -3] Temporary failure in name r
esolution)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 497, in send
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen
    **response_kw,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen
    **response_kw,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 889, in urlopen
    **response_kw,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 845, in urlopen
    method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='services.healthtech.dtu.dk', port=443): Max retries exceeded with url: /cgi-bin/webface2.cgi (Caused by NameResolutionError("<url
lib3.connection.HTTPSConnection object at 0x7ff877847a50>: Failed to resolve 'services.healthtech.dtu.dk' ([Errno -3] Temporary failure in name resolution)"))

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/pvacseq", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/pvactools/tools/pvacseq/main.py", line 123, in main
    args[0].func.main(args[1])
  File "/usr/local/lib/python3.7/site-packages/pvactools/tools/pvacseq/run.py", line 138, in main
    pipeline.execute()
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/pipeline.py", line 483, in execute
    PostProcessor(**post_processing_params).execute()
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/post_processor.py", line 63, in execute
    self.call_net_chop()
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/post_processor.py", line 217, in call_net_chop
    NetChop(self.top_score_filter_fh.name, self.net_chop_fasta, self.net_chop_fh.name, self.net_chop_method, str(self.net_chop_threshold), self.file_type).execute()
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/net_chop.py", line 94, in execute
    response = self.query_netchop_server(http, staging_file, chosen_method, self.threshold)
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/net_chop.py", line 173, in query_netchop_server
    response = self.post_query(http, staging_file, chosen_method, threshold)
  File "/usr/local/lib/python3.7/site-packages/pvactools/lib/net_chop.py", line 198, in post_query
    timeout=(10,60)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='services.healthtech.dtu.dk', port=443): Max retries exceeded with url: /cgi-bin/webface2.cgi (Caused by NameResolutionError("<
urllib3.connection.HTTPSConnection object at 0x7ff877847a50>: Failed to resolve 'services.healthtech.dtu.dk' ([Errno -3] Temporary failure in name resolution)"))
Wed May 22 10:56:19 CST 2024

conda 下包安装路径

>>> import pandas
>>> print(pandas.__file__)
/share/software/anaconda3/lib/python3.10/site-packages/pandas/__init__.py
>>> import sys
>>> for path in sys.path:
            print(path)
#生成*.pth 文件
vim /share/software/anaconda3/lib/python3.10/site-packages/person_pkg.pth

docker 这个软件镜像代码中存在访问网络的行为,所以在集群中会失败...
重新本地安装软件...

相关文章

网友评论

      本文标题:2024-05-22 slurm计算节点docker启动失败

      本文链接:https://www.haomeiwen.com/subject/yiqafjtx.html