4월, 2020의 게시물 표시

Docker Error starting daemon: SELinux is not supported

#error message [root@localhost ~]# systemctl start docker Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. [root@localhost ~]# systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since 화 2020-04-28 08:53:09 KST; 12s ago Docs: http://docs.docker.com Process: 18314 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY

error kubernetes metricserver

#show error [root@k8s-master kubernetes]# kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE coredns-66bff467f8-glbj5 1/1 Running 0 15d coredns-66bff467f8-s9zp2 1/1 Running 0 15d etcd-k8s-master 1/1 Running 0 15d kube-apiserver-k8s-master 1/1 Running 0 15d kube-controller-manager-k8s-master 1/1 Running 0 15d kube-proxy-s7kws 1/1 Running 0 15d kube-proxy-wd7dj 1/1 Running 0 15d kube-scheduler-k8s-master 1/1 Running 0 15d metrics-server-84cf4ddd7f-crd8w 0/1 ImagePullBackOff 0 59m metrics-server-fb5cb87fd-mdx9m 0/1 CrashLoopBackOff 3997 14d #fix error [root@k8s-master kubernetes]# wget

Error: Package: 2:nodejs-12.16.1-1nodesource.x86_64 on centos 6

#error [root@localhost my-project]# yum install -y nodejs Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: data.aonenetworks.kr * epel: mirrors.aliyun.com * extras: data.aonenetworks.kr * updates: mirror.navercorp.com Resolving Dependencies --> Running transaction check ---> Package nodejs.x86_64 2:12.16.1-1nodesource will be installed --> Processing Dependency: libc.so.6(GLIBC_2.17)(64bit) for package: 2:nodejs-12.16.1-1nodesource.x86_64 --> Finished Dependency Resolution Error: Package: 2:nodejs-12.16.1-1nodesource.x86_64 (nodesource) Requires: libc.so.6(GLIBC_2.17)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest #solution [root@localhost my-project]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base epel extras nodesource updates Cleaning up Everything Cleaning up list of fastest mirrors [root@localho

elasticsearch - nginx CORS policy: No 'Access-Control-Allow-Origin error

#error message Access to XMLHttpRequest at 'http://192.168.0.102:9200/' from origin 'http://192.168.0.102' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.  #solution [root@elkmaster ~]# vi /etc/elasticsearch/elasticsearch.yml [# # Make sure that the heap size is set to about half the memory available # on the system and that the owner of the process is allowed to use this # limit. # # Elasticsearch performs poorly when the system is swapping the memory. # # ---------------------------------- Network ----------------------------------- # # Set the bind address to a specific IP (IPv4 or IPv6): # #network.host: 192.168.0.1 network.host: 0.0.0.0 network.bind_host: 0.0.0.0 transport.host: 127.0.0.1 http.host: 0.0.0.0 http.cors.enabled: true http.cors.allow-origin: "*"

test fscrawler

#download package [root@localhost fs]# wget https://oss.sonatype.org/content/repositories/snapshots/fr/pilato/elasticsearch/crawler/fscrawler-es7/2.7-SNAPSHOT/fscrawler-es7-2.7-20200403.145039-96.zip --2020-04-08 09:52:01-- https://oss.sonatype.org/content/repositories/snapshots/fr/pilato/elasticsearch/crawler/fscrawler-es7/2.7-SNAPSHOT/fscrawler-es7-2.7-20200403.145039-96.zip Resolving oss.sonatype.org (oss.sonatype.org)... 34.225.164.131, 52.20.193.6, 3.228.150.45, ... Connecting to oss.sonatype.org (oss.sonatype.org)|34.225.164.131|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 96052581 (92M) [application/zip] Saving to: ‘fscrawler-es7-2.7-20200403.145039-96.zip’ 100%[===========================================================================================================================================================>] 96,052,581 9.58MB/s in 12s 2020-04-08 09:52:17 (7.59 MB/s) - ‘fscrawler-es7-2.7-20200403.145039-96.zip’ saved [96052581/960

Install kibana offline

#make repo  [root@localhost java-se-8u41-ri]# cat /etc/yum.repos.d/elasticsearch.repo [elasticsearch] name=Elasticsearch repository for 7.x packages #download package  [root@localhost java-se-8u41-ri]# yum install --enablerepo=elasticsearch kibana --downloadonly --downloaddir=/root/elastic Loaded plugins: fastestmirror, langpacks base | 3.6 kB 00:00:00 elasticsearch | 1.3 kB 00:00:00 extras | 2.9 kB 00:00:00 updates

Install elasticsearch offline

#download package  [root@localhost java-se-8u41-ri]# cat /etc/yum.repos.d/elasticsearch.repo [elasticsearch] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=0 autorefresh=1 type=rpm-md [root@localhost java-se-8u41-ri]# [root@localhost java-se-8u41-ri]# yum install --enablerepo=elasticsearch elasticsearch --downloadonly --downloaddir=/root/elastic Loaded plugins: fastestmirror, langpacks elasticsearch | 1.3 kB 00:00:00 elasticsearch/primary | 115 kB 00:00:01 Loading mirror speeds from cached hostfile * base: mirror.kakao.com * extras: mirror.kaka

build docker image

#make dockerfile [root@k8s-master docker-tomcat-war]# ll 합계 20 -rw-r--r--. 1 root root 110 4월 7 08:46 Dockerfile -rw-r--r--. 1 root root 681 4월 7 08:39 README.md -rw-r--r--. 1 root root 96 4월 7 08:39 docker-compose.yml -rw-r--r--. 1 root root 4606 4월 7 08:39 sample.war [root@k8s-master docker-tomcat-war]# vi Dockerfile FROM tomcat MAINTAINER gnoti@gmail.com ADD sample.war /usr/local/tomcat/webapps/ CMD ["catalina.sh", "run"] #build dockerfile [root@k8s-master docker-tomcat-war]# docker build -t gnoti_tomcat . Sending build context to Docker daemon 64kB Step 1/4 : FROM tomcat latest: Pulling from library/tomcat f15005b0235f: Pull complete 41ebfd3d2fd0: Pull complete b998346ba308: Pull complete f01ec562c947: Pull complete 74c11ae3efe8: Pull complete 3a7e595a3ef5: Pull complete 208407758d73: Pull complete b5238120a381: Pull complete 1716556aae46: Pull complete 1336a11b2bd2: Pull complete Digest: sha256:c0ba286d9903006423ff4e2818845f1cc