I'm using Ansible to install Apt packages on a lxd Ubuntu20.04 container running an Ubuntu 20.04 host.
The container is created successfully and commands execute in the container as expected.
But using apt through Ansible does not. Ansible shows successful task run but when I enter the container the packages have not been installed.
I've recently upgraded the version of Ansible to the latest and have been following along from Ansible docs. I've tried bot the apt and ansible.builtin.apt formats. The results remain the same Ansible fails silently.
I was expecting to see a response from php -v and nginx -t when I enter the container. Expecting configs at /etc/nginx and /etc/php
Tasks
tasks:
- name: apt-get update
ansible.builtin.apt:
update_cache: yes
cache_valid_time: 3600
- name: Install Nginx PHP
delegate_to: "{{ lxd_container_name }}"
ansible.builtin.apt:
state: latest
pkg:
- nginx
- python3-pymysql
- php8.1
- php8.1-mysql
- name: Install PHP Extensions
delegate_to: "{{ lxd_container_name }}"
apt: name={{ item }} update_cache=yes state=latest
loop: "{{ php_modules }}"
Ansible version: 2.11.5
Python version: 3.8
Output of running this playbook:
PLAY [localhost] **************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************
ok: [localhost]
TASK [apt-get update] *********************************************************************************************************************************************
ok: [localhost]
TASK [Install Nginx PHP] ******************************************************************************************************************************************
[DEPRECATION WARNING]: Distribution Ubuntu 20.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior
Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible-
core/2.11/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled
by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost -> template]
TASK [Install PHP Extensions] *************************************************************************************************************************************
ok: [localhost -> template] => (item=php-curl)
ok: [localhost -> template] => (item=php-gd)
ok: [localhost -> template] => (item=php-mbstring)
ok: [localhost -> template] => (item=php-xml)
ok: [localhost -> template] => (item=php-xmlrpc)
ok: [localhost -> template] => (item=php-soap)
ok: [localhost -> template] => (item=php-intl)
ok: [localhost -> template] => (item=php-zip)
Result in the container shows that the packages where not installed after several attempts.
root#template:~# nginx
bash: nginx: command not found
root#template:~# php
bash: php: command not found
root#template:~# cd /etc/php
bash: cd: /etc/php: No such file or directory
root#template:~# apt install php8.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
apache2 apache2-bin apache2-data apache2-utils bzip2 file libapache2-mod-php8.1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libbrotli1
libcurl4 libgdbm-compat4 libgdbm6 libjansson4 libldap-2.5-0 libldap-common liblua5.3-0 libmagic-mgc libmagic1 libnghttp2-14 libperl5.34 libpsl5 librtmp1
libsasl2-2 libsasl2-modules libsasl2-modules-db libssh-4 mailcap mime-support perl perl-modules-5.34 php-common php8.1-cli php8.1-common php8.1-opcache
php8.1-readline psmisc publicsuffix ssl-cert xz-utils
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser ufw bzip2-doc php-pear gdbm-l10n libsasl2-modules-gssapi-mit
| libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql perl-doc libterm-readline-gnu-perl
| libterm-readline-perl-perl make libtap-harness-archive-perl
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils bzip2 file libapache2-mod-php8.1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libbrotli1
libcurl4 libgdbm-compat4 libgdbm6 libjansson4 libldap-2.5-0 libldap-common liblua5.3-0 libmagic-mgc libmagic1 libnghttp2-14 libperl5.34 libpsl5 librtmp1
libsasl2-2 libsasl2-modules libsasl2-modules-db libssh-4 mailcap mime-support perl perl-modules-5.34 php-common php8.1 php8.1-cli php8.1-common php8.1-opcache
php8.1-readline psmisc publicsuffix ssl-cert xz-utils
0 upgraded, 43 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.4 MB of archives.
After this operation, 90.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
root#template:~# apt install nginx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
fontconfig-config fonts-dejavu-core libbrotli1 libdeflate0 libfontconfig1 libfreetype6 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libmaxminddb0
libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip2
libpng16-16 libtiff5 libwebp7 libxpm4 libxslt1.1 nginx-common nginx-core
Suggested packages:
libgd-tools mmdb-bin fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
fontconfig-config fonts-dejavu-core libbrotli1 libdeflate0 libfontconfig1 libfreetype6 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libmaxminddb0
libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip2
libpng16-16 libtiff5 libwebp7 libxpm4 libxslt1.1 nginx nginx-common nginx-core
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 3773 kB of archives.
After this operation, 11.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
I am on windows and I am trying to follow this doc to create spark applications with VSCode using a Synapse workspace.
I can sign into Azure and set a default Spark Pool from my abonnement, but then I don't get the prompt "Would you like to install PySpark/SynapsePySpark kernels for HindightPySpark/SynapsePyspark operations?". Instead VSCode tries to install some things, and then I get the error:
VSCode: Synapse PySpark installation error. Please see moreDetails. - when I click on "More Details" it leads me to this useless site for "non-windows users".
In the ouput (see below for full output) I get the additional error:
[2022-2-10:8:14:2] [Error] Exit with non zero 3221225477
[2022-2-10:8:14:2] [Info] Jupyter not installed
I tried launching VSCode as Administrator, I reinstalled VSCode, I tried Python Versions 3.10, 3.9, 3.8, but I always get the same result. I even went ahead and installed Jupyter in the virtual environment myself, but it still fails.
[2022-2-10:8:14:1] [Info] Exec python, with args: --version
[2022-2-10:8:14:1] [Info] Python 3.8.0
[2022-2-10:8:14:1] [Info] Exec pip, with args: --version
[2022-2-10:8:14:1] [Error] Exit with non zero 3221225477
[2022-2-10:8:14:1] [Info] Exec python, with args: -m,pip,--version
[2022-2-10:8:14:2] [Info] pip 22.0.3 from C:\coding\Python38\lib\site-packages\pip (python 3.8)
[2022-2-10:8:14:2] [Info] Exec virtualenv, with args: --version
[2022-2-10:8:14:2] [Info] virtualenv 20.13.1 from c:\coding\python38\lib\site-packages\virtualenv\__init__.py
[2022-2-10:8:14:2] [Info] Check Jupyter installation:
[2022-2-10:8:14:2] [Info] Exec C:\Users\myuser\.msvscode.hdinsight\hdinsightJupyter\Scripts\jupyter.exe, with args: --version
[2022-2-10:8:14:2] [Error] Exit with non zero 3221225477
[2022-2-10:8:14:2] [Info] Jupyter not installed
[2022-2-10:8:14:2] [Info] Installing PySpark interactive virtual environment ...
[2022-2-10:8:14:2] [Info] Exec python, with args: -m,virtualenv,C:\Users\myuser\.msvscode.hdinsight\hdinsightJupyter
.[2022-2-10:8:14:3] [Info] created virtual environment CPython3.8.0.final.0-64 in 836ms
creator CPython3Windows(dest=C:\Users\myuser\.msvscode.hdinsight\hdinsightJupyter, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\seife\AppData\Local\pypa\virtualenv)
added seed packages: Babel==2.9.1, Jinja2==3.0.3, MarkupSafe==2.0.1, Pygments==2.11.2, QtPy==2.0.1, Send2Trash==1.8.0, anyio==3.5.0, argon2_cffi==21.3.0, argon2_cffi_bindings==21.2.0, asttokens==2.0.5, attrs==21.4.0, backcall==0.2.0, black==22.1.0, bleach==4.1.0, certifi==2021.10.8, cffi==1.15.0, charset_normalizer==2.0.11, click==8.0.3, colorama==0.4.4, debugpy==1.5.1, decorator==5.1.1, defusedxml==0.7.1, entrypoints==0.4, executing==0.8.2, idna==3.3, importlib_resources==5.4.0, ipykernel==6.9.0, ipython==8.0.1, ipython_genutils==0.2.0, ipywidgets==7.6.5, jedi==0.18.1, json5==0.9.6, jsonschema==4.4.0, jupyter==1.0.0, jupyter_client==7.1.2, jupyter_console==6.4.0, jupyter_core==4.9.1, jupyter_server==1.13.5, jupyterlab==3.2.9, jupyterlab_pygments==0.1.2, jupyterlab_server==2.10.3, jupyterlab_widgets==1.0.2, matplotlib_inline==0.1.3, mistune==0.8.4, mypy_extensions==0.4.3, nbclassic==0.3.5, nbclient==0.5.10, nbconvert==6.4.1, nbformat==5.1.3, nest_asyncio==1.5.4, notebook==6.4.8, packaging==21.3, pandocfilters==1.5.0, parso==0.8.3, pathspec==0.9.0, pickleshare==0.7.5, pip==22.0.3, platformdirs==2.4.1, prometheus_client==0.13.1, prompt_toolkit==3.0.27, pure_eval==0.2.2, py4j==0.10.9, pycparser==2.21, pyparsing==3.0.7, pyrsistent==0.18.1, pyspark==3.1.1, python_dateutil==2.8.2, pytz==2021.3, pywin32==303, pywinpty==1.1.6, pyzmq==22.3.0, qtconsole==5.2.2, requests==2.27.1, setuptools==60.6.0, six==1.16.0, sniffio==1.2.0, stack_data==0.1.4, terminado==0.13.1, testpath==0.5.0, tomli==2.0.1, tornado==6.1, traitlets==5.1.1, typing_extensions==4.0.1, urllib3==1.26.8, wcwidth==0.2.5, webencodings==0.5.1, websocket_client==1.2.3, wheel==0.37.1, widgetsnbextension==3.5.2, zipp==3.7.0
activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
[2022-2-10:8:14:3] [Info] Exec C:\Users\myuser\.msvscode.hdinsight\hdinsightJupyter\Scripts\pip.exe, with args: install,jupyter
[2022-2-10:8:14:4] [Info] Install Jupyter error:
[2022-2-10:8:14:4] [Error] Exit with non zero 3221225477
...........................................................
I am trying to run a nexflow pipeline on some data via the Linux command line, but when I do so, it fails because it fails to create the Conda environment.
It looks like it tries to run the pipeline anyway, despite the environment not being set up properly, and so generates an error message. Any help would be much appreciated. Here is the error message:
Error executing process > 'my_process (1)'
Caused by:
Failed to create Conda environment
command: conda env create --prefix /my_file_path-6bf38a923b48a255f96ea3d66d372e6c --file /my_file_path/environment.yml
status : 143
message:
Here is my environment.yml file:
name: pipeline_name
channels:
- bioconda
- conda-forge
- defaults
dependencies:
- filtlong
- blast==2.5
- minimap2
- samtools
- pysam
- pandas
- matplotlib
- pysamstats
- seaborn
- medaka
- bedtools
- bedops
- seqtk
- bioawk
- sniffles
Not an answer to this question, but if you get a similar failure with a different exit status (120, not 143), try the fix in this thread. Reposting it here:
conda environment from file not working using nextflow · Issue #1081 · nextflow-io/nextflow: https://github.com/nextflow-io/nextflow/issues/1081
pditommaso commented on Mar 18, 2019
The 120 exit status signals that
it was reached the creation timeout. Try increasing it, eg.
conda.createTimeout = '1 h'
I have instilled a Anaconda with the infromation:
:~$ conda info
conda info --all
active environment : None
user config file : /home/qic220/.condarc
populated config files : /home/qic220/.condarc
conda version : 4.8.3
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __cuda=11.1
__glibc=2.31
base environment : /home/qic220/anaconda3 (writable)
channel URLs : http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/linux-64
http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
package cache : /home/qic220/anaconda3/pkgs
/home/qic220/.conda/pkgs
envs directories : /home/qic220/anaconda3/envs
/home/qic220/.conda/envs
platform : linux-64
user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/5.4.0-42-generic ubuntu/20.04.1 glibc/2.31
UID:GID : 1000:1000
netrc file : None
offline mode : False
# conda environments:
#
base * /home/qic220/anaconda3
sys.version: 3.8.3 (default, Jul 2 2020, 16:21:59)
...
sys.prefix: /home/qic220/anaconda3
sys.executable: /home/qic220/anaconda3/bin/python
conda location: /home/qic220/anaconda3/lib/python3.8/site-packages/conda
conda-build: /home/qic220/anaconda3/bin/conda-build
conda-convert: /home/qic220/anaconda3/bin/conda-convert
conda-debug: /home/qic220/anaconda3/bin/conda-debug
conda-develop: /home/qic220/anaconda3/bin/conda-develop
conda-env: /home/qic220/anaconda3/bin/conda-env
conda-index: /home/qic220/anaconda3/bin/conda-index
conda-inspect: /home/qic220/anaconda3/bin/conda-inspect
conda-metapackage: /home/qic220/anaconda3/bin/conda-metapackage
conda-render: /home/qic220/anaconda3/bin/conda-render
conda-server: /home/qic220/anaconda3/bin/conda-server
conda-skeleton: /home/qic220/anaconda3/bin/conda-skeleton
conda-verify: /home/qic220/anaconda3/bin/conda-verify
user site dirs:
ALL_PROXY: <set>
CIO_TEST: <not set>
CONDA_ROOT: /home/qic220/anaconda3
C_INCLUDE_PATH: /usr/local/cuda/include:
DEFAULTS_PATH: /usr/share/gconf/ubuntu.default.path
HTTPS_PROXY: <set>
HTTP_PROXY: <set>
LD_LIBRARY_PATH: /opt/ovito-basic-3.3.1-x86_64/lib:/usr/local/cuda/lib64::/opt/vmd-1.9.4a48/lib
MANDATORY_PATH: /usr/share/gconf/ubuntu.mandatory.path
NO_PROXY: <set>
PATH: /home/qic220/anaconda3/bin:/opt/ovito-basic-3.3.1-x86_64/bin:/home/qic220/lammps-stable_29Oct2020/src:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/software/anaconda3/bin:/opt/vmd-1.9.4a48/bin
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
WINDOWPATH: 2
But when I tried to install a package, it failed and a ProxyError arised:
$ conda install -c conda-forge hoomd
Collecting package metadata (current_repodata.json): failed
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.
Actually, even I just use conda update conda, there still is ProxyError.
I have check env | grep proxy, nothing shown on my screen.
And I also modified .condsrc as:
proxy_servers:
http: http://username:password#corp.com:8080
https: https://username:password#corp.com:8080
channels:
- defaults
show_channel_urls: true
default_channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
conda-forge: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
After source ~/.condarc, it still not work. Is anyone have idea to fixed my problem?
I am trying to run my ipynb file using voila, which have some interactive widgets and plots. I am using voila (0.1.21), to create a dashboard application. When i am opening the application (http://localhost:8866) in chrome browser, it does not display any of interactive widgets. I am running on mac.
When I am running in Notebook (6.0.3) ,all interactive widgets and plots are displaying without any issue.
Following is the one of code :
#interact
def show_articles_more_than(column=['sepal_length', 'sepal_width', 'petal_length', 'petal_width'], x=(-2, 20, .1)):
clear_output(wait=True)
display(HTML(f'<h2>Showing data with more than {x} {column}<h2>'))
display(iris.loc[iris[column] > x, ['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'class']])
Getting following error:
Starting WebSocket: ws://localhost:8866/api/kernels/72f234eb-f69b-4244-a8de-2beac4588296
manager.js:61 Uncaught (in promise) TypeError: Cannot read property 'kernelChanged' of undefined
at new M (manager.js:61)
at new t.WidgetManager (manager.js:47)
at main.js:14
default.js:1452 Kernel: connected (72f234eb-f69b-4244-a8de-2beac4588296)
My NB extension list :
Known nbextensions:
config dir: /Users/adhishree/.jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK
config dir: /opt/conda/etc/jupyter/nbconfig
notebook section
bqplot/extension enabled
- Validating: OK
ipyvolume/extension enabled
- Validating: OK
jupyter-webrtc/extension enabled
- Validating: OK
jupyter-datawidgets/extension enabled
- Validating: OK
jupyter-threejs/extension enabled
- Validating: OK
plotlywidget/extension enabled
- Validating: OK
voila/extension enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
Can anyone help me on how the interactive widgets can be displayed properly in the chrome browser.