Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Welcome,
Im trying to install Wordpress on kubernetes. I installed chart and I typed:
"helm install projectname-wordpress bitnami/wordpress --set allowOverrideNone=true"
but even it giving output its not working and I cant login into.
When I typed "kubectl describe pods"
I get output like this:
Name: projectname-wordpress-785d4c4c84-xzt6m
Namespace: default
Priority: 0
Node: skalowalne-node-73a107/59.813.226.646
Start Time: Fri, 28 May 2021 02:00:35 +0200
Labels: app.kubernetes.io/instance=projectname-wordpress
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=wordpress
helm.sh/chart=wordpress-11.0.10
pod-template-hash=785d4c4c84
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/projectname-wordpress-785d4c4c84
Containers:
wordpress:
Container ID:
Image: docker.io/bitnami/wordpress:5.7.2-debian-10-r9
Image ID:
Ports: 8080/TCP, 8443/TCP
Host Ports: 0/TCP, 0/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Requests:
cpu: 300m
memory: 512Mi
Liveness: http-get http://:http/wp-admin/install.php delay=120s timeout=5s period=10s #success=1 #failure=6
Readiness: http-get http://:http/wp-login.php delay=30s timeout=5s period=10s #success=1 #failure=6
Environment:
ALLOW_EMPTY_PASSWORD: yes
MARIADB_HOST: projectname-wordpress-mariadb
MARIADB_PORT_NUMBER: 3306
WORDPRESS_DATABASE_NAME: bitnami_wordpress
WORDPRESS_DATABASE_USER: bn_wordpress
WORDPRESS_DATABASE_PASSWORD: <set to the key 'mariadb-password' in secret 'projectname-wordpress-mariadb'> Optional: false
WORDPRESS_USERNAME: user
WORDPRESS_PASSWORD: <set to the key 'wordpress-password' in secret 'projectname-wordpress'> Optional: false
WORDPRESS_EMAIL: user#example.com
WORDPRESS_FIRST_NAME: FirstName
WORDPRESS_LAST_NAME: LastName
WORDPRESS_HTACCESS_OVERRIDE_NONE: no
WORDPRESS_ENABLE_HTACCESS_PERSISTENCE: no
WORDPRESS_BLOG_NAME: User's Blog!
WORDPRESS_SKIP_BOOTSTRAP: no
WORDPRESS_TABLE_PREFIX: wp_
WORDPRESS_SCHEME: http
WORDPRESS_EXTRA_WP_CONFIG_CONTENT:
WORDPRESS_AUTO_UPDATE_LEVEL: none
WORDPRESS_PLUGINS: none
Mounts:
/bitnami/wordpress from wordpress-data (rw,path="wordpress")
/var/run/secrets/kubernetes.io/serviceaccount from default-token-mxtw7 (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
wordpress-data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: projectname-wordpress
ReadOnly: false
default-token-mxtw7:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-mxtw7
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 15m (x181 over 9h) kubelet Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[wordpress-data default-token-mxtw7]: timed out waiting for the condition
Warning FailedMount 3m49s (x58 over 8h) kubelet Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[default-token-mxtw7 wordpress-data]: timed out waiting for the condition
Warning FailedAttachVolume 2m40s (x139 over 9h) attachdetach-controller AttachVolume.Attach failed for volume "ovh-managed-kubernetes-do2ymc-pvc-80079ec2-e6f9-4210-852e-04fa286f714c" : attachdetachment timeout for volume 3b160677-40e8-4170-9cc3-cdd58e230942
Name: projectname-wordpress-mariadb-0
Namespace: default
Priority: 0
Node: skalowalne-node-f1da93/59.83.226.180
Start Time: Fri, 28 May 2021 02:00:27 +0200
Labels: app.kubernetes.io/component=primary
app.kubernetes.io/instance=projectname-wordpress
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=mariadb
controller-revision-hash=projectname-wordpress-mariadb-85d4cb8f7
helm.sh/chart=mariadb-9.3.11
statefulset.kubernetes.io/pod-name=projectname-wordpress-mariadb-0
Annotations: checksum/configuration: 878384c0d68b5abc46d5d5d719a9e83aa911941710552c3dfcebd48203ce5d9f
Status: Pending
IP:
IPs: <none>
Controlled By: StatefulSet/projectname-wordpress-mariadb
Containers:
mariadb:
Container ID:
Image: docker.io/bitnami/mariadb:10.5.10-debian-10-r0
Image ID:
Port: 3306/TCP
Host Port: 0/TCP
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Liveness: exec [/bin/bash -ec password_aux="${MARIADB_ROOT_PASSWORD:-}"
if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
fi
mysqladmin status -uroot -p"${password_aux}"
] delay=120s timeout=1s period=10s #success=1 #failure=3
Readiness: exec [/bin/bash -ec password_aux="${MARIADB_ROOT_PASSWORD:-}"
if [[ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]]; then
password_aux=$(cat "$MARIADB_ROOT_PASSWORD_FILE")
fi
mysqladmin status -uroot -p"${password_aux}"
] delay=30s timeout=1s period=10s #success=1 #failure=3
Environment:
BITNAMI_DEBUG: false
MARIADB_ROOT_PASSWORD: <set to the key 'mariadb-root-password' in secret 'projectname-wordpress-mariadb'> Optional: false
MARIADB_USER: bn_wordpress
MARIADB_PASSWORD: <set to the key 'mariadb-password' in secret 'projectname-wordpress-mariadb'> Optional: false
MARIADB_DATABASE: bitnami_wordpress
Mounts:
/bitnami/mariadb from data (rw)
/opt/bitnami/mariadb/conf/my.cnf from config (rw,path="my.cnf")
/var/run/secrets/kubernetes.io/serviceaccount from projectname-wordpress-mariadb-token-92mm2 (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: data-projectname-wordpress-mariadb-0
ReadOnly: false
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: projectname-wordpress-mariadb
Optional: false
projectname-wordpress-mariadb-token-92mm2:
Type: Secret (a volume populated by a Secret)
SecretName: projectname-wordpress-mariadb-token-92mm2
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 19m (x41 over 8h) kubelet Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[config projectname-wordpress-mariadb-token-92mm2 data]: timed out waiting for the condition
Warning FailedMount 9m51s (x36 over 8h) kubelet Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[projectname-wordpress-mariadb-token-92mm2 data config]: timed out waiting for the condition
Warning FailedMount 5m21s (x161 over 9h) kubelet Unable to attach or mount volumes: unmounted volumes=[data], unattached volumes=[data config projectname-wordpress-mariadb-token-92mm2]: timed out waiting for the condition
Warning FailedAttachVolume 2m48s (x139 over 9h) attachdetach-controller AttachVolume.Attach failed for volume "ovh-managed-kubernetes-do2ymc-pvc-fad9b535-f6d5-4e71-9e47-3a555936c546" : attachdetachment timeout for volume d96dbb2d-2200-48bd-940d-74dc0c3b5128
UPDATE: I dont have firewall enabled on cloud machine. Im using ovh services.
What should I do to make it working?
Failed events looks exacly like this just after try to deploy wordpress:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 5m19s default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
Warning FailedScheduling 5m19s default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.
Normal Scheduled 5m12s default-scheduler Successfully assigned default/projectname-wordpress-5466b7b45c-rzx9h to standard-node-fe7236
Warning FailedMount 3m10s kubelet Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[default-token-mxtw7 wordpress-data]: timed out waiting for the condition
Warning FailedAttachVolume 72s (x2 over 3m13s) attachdetach-controller AttachVolume.Attach failed for volume "ovh-managed-kubernetes-do2ymc-pvc-3e3686eb-6cf5-4697-99b0-0689bbd7d0a9" : attachdetachment timeout for volume f8b78a8d-f0d8-4dcb-bcae-ec84fb7d82e4
Warning FailedMount 56s kubelet Unable to attach or mount volumes: unmounted volumes=[wordpress-data], unattached volumes=[wordpress-data default-token-mxtw7]: timed out waiting for the condition
Logs from first pod
mariadb 16:49:02.01 mariadb 16:49:02.01 Welcome to the Bitnami mariadb
container mariadb 16:49:02.01 Subscribe to project updates by watching
https://github.com/bitnami/bitnami-docker-mariadb mariadb 16:49:02.02
Submit issues and feature requests at
https://github.com/bitnami/bitnami-docker-mariadb/issues mariadb
16:49:02.02 Send us your feedback at containers#bitnami.com mariadb
16:49:02.02 mariadb 16:49:02.02 INFO ==> ** Starting MariaDB setup **
mariadb 16:49:02.07 INFO ==> Validating settings in MYSQL_/MARIADB_
env vars mariadb 16:49:02.07 INFO ==> Initializing mariadb database
mariadb 16:49:02.09 INFO ==> Using persisted data mariadb 16:49:02.10
INFO ==> Running mysql_upgrade mariadb 16:49:02.10 INFO ==> Starting
mariadb in background mariadb 16:49:03.14 INFO ==> Stopping mariadb
Logs from second pod
Welcome to the Bitnami wordpress container Subscribe to project
updates by watching
https://github.com/bitnami/bitnami-docker-wordpress Submit issues and
feature requests at
https://github.com/bitnami/bitnami-docker-wordpress/issues Send us
your feedback at containers#bitnami.com
WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes.
For safety reasons, do not use this flag in a production environment.
nami INFO Initializing apache nami INFO apache successfully
initialized nami INFO Initializing php nami INFO php
successfully initialized nami INFO Initializing mysql-client nami
INFO mysql-client successfully initialized nami INFO Initializing
wordpress wordpre INFO ==> Preparing Varnish environment wordpre INFO
==> Preparing Apache environment wordpre INFO ==> Preparing PHP environment mysql-c INFO Trying to connect to MySQL server Error
executing 'postInstallation': Failed to connect to
student-mariadb:3306 after 36 tries
I reset kubernates and same code started to work. I made everything same so I dont know how. Thank you guys for support.
Related
I'm newbie in Jfrog Artifactory and I having problems with starting the container with Artifactory.
It works, and I see the web-interface, but I'm concerned about the errors in the console.
Here is the docker-compose:
version: "3.9"
services:
artifactory:
image: docker.bintray.io/jfrog/artifactory-oss
container_name: artifactory
environment:
JF_SHARED_NODE_IP: "127.0.0.1"
JF_SHARED_NODE_ID: "artifactory"
JF_SHARED_NODE_NAME: "artifactory"
ports:
- 8082:8082
- 8081:8081
volumes:
- ./jfrog/artifactory/var/:/var/opt/jfrog/artifactory
- /etc/localtime:/etc/localtime:ro
logging:
driver: json-file
options:
max-size: "50m"
max-file: "10"
ulimits:
nproc: 65535
nofile:
soft: 32000
hard: 40000
Before I launch it, I execute the following:
sudo mkdir -p ./jfrog/artifactory/var/etc/
touch ./jfrog/artifactory/var/etc/system.yaml
chown -R 1030:1030 ./jfrog/artifactory/var
chmod -R 777 ./jfrog/artifactory/var
Here is the startup log:
artifactory_startup.log (sorry for uploading the log on Goggle Drive. It's too large for the stackoverflow post)
I'm concerned about these strings:
[jfac ] [WARN ] [976f1c9489fa2680] [c.z.h.u.DriverDataSource:70 ] [ocalhost-startStop-1] - Registered driver with driverClassName=org.apache.derby.jdbc.EmbeddedDriver was not found, trying direct instantiation.
[jfac ] [WARN ] [976f1c9489fa2680] [o.j.c.ExecutionUtils:165 ] [pool-8-thread-2 ] - Retry 10 Elapsed 5.22 secs failed: Registration with router on URL http://localhost:8046 failed with error: UNAVAILABLE: io exception. Trying again
[jfrt ] [ERROR] [ ] [o.j.c.w.FileWatcher:221 ] [Thread-6 ] - Unknown exception while watching for file changes: null
artifactory | java.lang.NullPointerException: null
artifactory | at org.jfrog.config.watch.FileWatcher.lambda$doWatch$2(FileWatcher.java:202)
artifactory | at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
artifactory | at org.jfrog.config.watch.FileWatcher.doWatch(FileWatcher.java:201)
artifactory | at java.base/java.lang.Thread.run(Thread.java:829)
[jfrou] [WARN ] [6424ea6f8b2dc101] [local_topology.go:256 ] [main ] - Readiness test failed with the following error: "required node services are missing or unhealthy"
Please, help me find out what these errors mean. Or I can just use the service and all is OK?
After some digging I've found out that Tomcat and JVM can't get enough CPU threads. The solution is to give more recourses to the containers. I've completely forgotten to read about system requirements.
I have a playbook that works just great locally, when trying to run with AWX I run into an errors that seem to indicate the device type in the task is not supported.
Loading collection ansible.netcommon from /runner/requirements_collections/ansible_collections/ansible/netcommon
Loading callback plugin awx_display of type stdout, v2.0 from /usr/local/lib/python3.8/site-packages/ansible_runner/callbacks/awx_display.py
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: soft_reset.yml *******************************************************
Positional arguments: soft_reset.yml
verbosity: 4
remote_user: root
connection: smart
timeout: 10
become: True
become_method: sudo
tags: ('all',)
inventory: ('/runner/inventory/hosts',)
extra_vars: ('#/runner/env/extravars',)
forks: 5
1 plays in soft_reset.yml
PLAY [aggs] ****************************************************************
META: ran handlers
TASK [soft reset bgp peers] ****************************************************
task path: /runner/project/soft_reset.yml:5
fatal: [lab-core-blue]: FAILED! => {
"msg": "network os cisco.iosxr.iosxr is not supported"
}
inventory/hosts.yml
aggs:
hosts:
lab-core-blue:
ansible_host: lab-core-blue.mylab.com
vars:
ansible_network_os: cisco.iosxr.iosxr
ansible_connection: ansible.netcommon.network_cli
soft_reset.yml
- hosts: aggs
gather_facts: no
tasks:
- name: soft reset bgp peers
ansible.netcommon.cli_command:
command: clear bgp vpnv4 unicast {{item}} soft
loop:
- 1.2.3.2
- 1.2.3.3
- 1.2.3.4
collections/requirements.yml
---
collections:
- ansible.netcommon
Thanks to #sivel in #ansible irc for the answer!
I think the AWX EEs only have ansible-core by default, you need cisco.iosxr in that list
Turns out I needed to add a line to collections/requirements.yml
---
collections:
- ansible.netcommon
- cisco.iosxr
Writing ansible playbook for "Count number of users currently login to VPN".Using Junos modules as suggested by network team.I have installed below softwares on my RHEL 7 machine with Ansible 2.9 version installed.
Junos Ansible Requirements
===============================
-->Install Dependencies
# pip install ncclient
# pip install junos-eznc
--> Install Juniper.junos Galaxy role
ansible-galaxy install juniper.junos
---> Have NETCONF enabled on Juniper devices over SSH
# set system services netconf ssh
--->(Optional)
#pip install junos-netconify (python lib for juniper console)
Whenever i am writing any playbook, I am getting below error.
Playbook:-
---
- name: Get device uptime
hosts:
- dc1
roles:
- Juniper.junos
connection: local
gather_facts: no
vars_prompt:
- name: username
prompt: Junos Username
private: no
- name: password
prompt: Junos Password
private: yes
tasks:
- name: get uptime using galaxy module
junos_command:
commands: show system uptime
register: uptime
- name: display uptimes
debug: var=uptime
Error:-
PLAY [Get device uptime] **************************************************************************************************************
TASK [get uptime using galaxy module] *************************************************************************************************
fatal: [172.16.130.1]: FAILED! => {"changed": false, "msg": "invalid rpc for running in check_mode"}
PLAY RECAP ****************************************************************************************************************************
172.16.130.1 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
I was just exploring ansible networking commands & got above error.Please suggest what configurations required working with junos.
Please find below playbook to check no. of users currently login to VPN:-
name: Get system users currently logged in
hosts: all
connection: local
gather_facts: no
roles:
Juniper.junos
tasks:
name: Retrieve facts from device running Junos OS
juniper_junos_facts:
name: Print version
debug:
var: junos.fqdn
name: Run RPC Commands
juniper_junos_command:
commands="show security dynamic-vpn users"
format=text
dest={{ junos.fqdn }}.output
I am writing a playbook, which dynamically enters the network servers provided by user at prompt in host file.Further i want to create a task which will ssh on the server one by one and run show version command to fetch the OS of those network devices.
As of now, I am getting the below error:
1."Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host"
I dont want to define the OS beforehand, rather want the playbook to do it.
I tried entering some configurations in host file as below:
[device]
192.1xx.xxx.xx
[all:vars]
ansible_connection=network_cli
ansible_user=user
ansible_ssh_pass=password
ssh_args = -o GSSAPIAuthentication=no
The below plsybook is taking device name from the user and adding it to the file, further it need to ssh on those servers and fetch the OS details:
---
- name: add host dynamically
hosts: localhost
gather_facts: no
vars:
Server: null_val1
vars_prompt:
- name: "Server"
prompt: "Please enter the non-reporting server/IP"
private: no
default: null_val1
pre_tasks:
- name: Save variable
set_fact:
Server: "{{Server}}"
- name: Copying servers to host file
hosts: localhost
become: true
tasks:
- name: copying variable value
lineinfile:
path: "{{playbook_dir}}/hosts.txt"
line: "{{Server}}"
insertafter: '^\[device\]'
state: present
- name: Main execution task
hosts: device
gather_facts: true
tasks:
- name: Run command on devices
cli_command:
command: show version
register: result
- name: display result
debug:
var: result.stdout_lines
The actual result should show me the OS of network device(s) entered in host file by running show version command remotely.
I'm trying to follow along this blog about using Docker with R.
I followed basic Docker set up steps and am able to run the hello world image.
I'm on a old 2009 Mac and had to use Docker Toolbox.
I'm in a place with weak internet connection and am using a personal hotspot.
Each time I try to run docker run --rm -p 8787:8787 rocker/verse I wait for a few minutes and see a downloading message, then I get a message "docker: unauthorized: authentication required."
I found this separate documentation which advised me to add a password:
docker run --rm -p 8787:8787 -e PASSWORD=blah rocker/rstudio
But I got the same result "docker: unauthorized: authentication required."
I did some Google searching and found some posts both here on SO and on Github but was unable to identify what is causing this error in my specific case.
I suspect my weak internet connection might have something to do with it since I seem to be able to download for about 10 or 15 minutes before seeing this message.
Here is Docker info:
Macs-MacBook:~ macuser$ docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 2
Server Version: 18.09.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.116-boot2docker
Operating System: Boot2Docker 18.09.6 (TCL 8.2.1)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.951GiB
Name: default
ID: XMCE:OBLV:CKEX:EGIB:PHQ7:MLHF:ZJSA:PGYN:OIMM:JI67:ETCI:JKBH
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Does anyone know where I can look to next in order to be able to pull and or run the rocker image?