분류 전체보기 검색 결과

178개 발견
  1. 미리보기
    2018.11.04 - mr.november11

    [docker] docker 실행 시 "Cannot connect to the Docker daemon at unix:///var/run/docker.sock." 에러가 발생할 경우 해결 방법

  2. 미리보기
    2018.11.03 - mr.november11

    [Linux]VM에 Disk 추가 시 재부팅 없이 추가된 Disk 를 인식 시키는 방법

  3. 미리보기
    2018.10.30 - mr.november11

    [Grafana] sqlite3 로 설치된 grafana 에서 admin 로그인 실패 시 패스워드 초기화 방법

  4. 미리보기
    2018.10.28 - mr.november11

    [Prometheus] Prometheus 로 서버 모니터링 구축 - 설치

  5. 미리보기
    2018.10.18 - mr.november11

    [Linux] Disk 관련 RAID 및 JBOD 정리

  6. 미리보기
    2018.10.16 - mr.november11

    [Linux] createrepo 을 활용한 yum repository 서버 구축

  7. 미리보기
    2018.10.14 - mr.november11

    [influxdb] influx CLI로 Query 수행 시 timestamp 를 보기 쉽게(Human-readable) 변경하는 방법

  8. 미리보기
    2018.09.24 - mr.november11

    [node.js]node.js 실행 시 events.js:183 throw er; // Unhandled 'error' event 에러가 발생한 경우

[docker] docker 실행 시 "Cannot connect to the Docker daemon at unix:///var/run/docker.sock." 에러가 발생할 경우 해결 방법

1. 현상

docker 명령어 실행 시 "Cannot connect to the Docker daemon at unix:///var/run/docker.sock" 에러가 발생하며,

정상 실행이 불가능한 경우가 있다.

 

2. 해결 방법

docker 데몬의 실행 상태를 확인힌다.

systemctl status docker 명령어로 데몬 상태 확인 시 아래와 같이 inactive 상태라면 docker 사용이 불가능하다.

systemctl start docker 명령어로 docker 데몬을 실행 후

docker 명령어 수행 시 정상적으로 실행 가능하다.

 

다른 카테고리의 글 목록

docker 카테고리의 포스트를 톺아봅니다

[Linux]VM에 Disk 추가 시 재부팅 없이 추가된 Disk 를 인식 시키는 방법

1. 현상

VMWare와 같은 가상화 솔루션을 사용하면 유동적으로 디스크를 추가해야하는 경우가 있다.

이 경우 VMWare에서 VM에 disk 장치를 추가했음에도 불구하고 VM 내 Linux OS에서는 인식하지 못하는 경우가 있다.

-> VM 내 실제 디스크는 sda, sdb 2개가 할당 되어 있으나 OS상에서는 기존의 sda만 인식 중

2. 해결 방법

가장 간단한 방법은 VM 재부팅이다. VM을 재부팅하여 초기 부팅 시 장치 인식 과정에서 추가된 sdb 디스크를 인식 시키면 된다.

하지만, 상용 환경에서는 서비스 영향을 고려해야한다. 재부팅 없이 온라인 환경에서의 인식 시킬 수 있는 방법이 필요하다.

인식 방법은 /sys/class/scsi_host/{host#}/scan 파일에 echo "- - -"(- 사이 띄어쓰기 주의) 을 실행하면 된다.

  • echo "- - -" > /sys/class/scsi_host/{host#}/scan

    • echo "- - -" > /sys/class/scsi_host/host0/scan
    • echo "- - -" > /sys/class/scsi_host/host1/scan
    • echo "- - -" > /sys/class/scsi_host/host2/scan

-> echo "- - -" > /sys/class/scsi_host/host2/scan 명령어 수행 후 /dev/sdb 디스크를 인식


다른 카테고리의 글 목록

Linux 카테고리의 포스트를 톺아봅니다

[Grafana] sqlite3 로 설치된 grafana 에서 admin 로그인 실패 시 패스워드 초기화 방법

참고 : https://github.com/grafana/grafana/issues/1815

prometheus-ansible 로 grafana 자동 설치 시 지정된 password 로 로그인이 되지 않는 문제가 발생한다.

이 경우 sqlite3 DB 내 admin 계정에 대한 password 를 'admin' 으로 초기화할 수 있다.

  1. grafana db가 설치된 디렉토리로 이동

    [root@server grafana]# cd /var/lib/grafana/
    [root@server grafana]# ll
    total 820
    -rw-r--r-- 1 grafana grafana 839680 Oct 30 11:43 grafana.db
    drwxr-xr-x 2 grafana grafana     6 Oct 13 22:32 plugins
    drwx------ 2 grafana grafana     6 Oct 13 22:32 png
    drwx------ 18 grafana grafana   150 Oct 14 14:35 sessions
  2. grafana.db 를 sqlite3 로 실행

  3. root@nbsoft grafana]# sqlite3 grafana.db 
    SQLite version 3.7.17 2013-05-20 00:56:22
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite>
  1. admin 계정에 대한 패스워드를 admin 으로 초기화 하는 쿼리를 실행

    - query : update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin'

    sqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
    sqlite> .exit
  1. grafana-server 재시작

    [root@nbsoft grafana]# systemctl restart grafana-server
  2. admin / admin 으로 로그인 시 정상적으로 로그인 가능하다. 


다른 카테고리의 글 목록

grafana 카테고리의 포스트를 톺아봅니다

[Promethus] Prometheus 로 서버 모니터링 구축 - 설치

참고 : https://github.com/prometheus/prometheus

1-1. 설치(binary install )

prometheus 설치용 디렉토리 생성 후

git clone https://github.com/prometheus/prometheus.git
cd prometheus
make build
./prometheus --config.file=your_config.yml

1.1[troubleshooting]make 명령 실행 시 "make: go: Command not found" error 발생 시

1.1.1 현상

[root@server prometheus]# make build
make: go: Command not found
GOOS= GOARCH= go get -u github.com/prometheus/promu
/bin/sh: go: command not found
make: *** [promu] Error 127

1.1.2 해결방법

prometheus 은 golang 으로 제작되어 있다.

make 명령어 수행을 위해 서버 내 golang 설치가 필요하다.

'yum install go' 로 golang 설치 진행

[root@nbsoft prometheus]# yum install go
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
178 packages excluded due to repository priority protections
Resolving Dependencies
... 중략 ...
=================================================================================================================================================
Package                             Arch                       Version                                   Repository                       Size
=================================================================================================================================================
Installing:
golang                             x86_64                     1.9.4-1.amzn2.0.2                         amzn2-core                     611 k
Installing for dependencies:
cpp                                 x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                     9.2 M
gcc                                 x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                       22 M
glibc-devel                         x86_64                     2.26-28.amzn2.0.1                         amzn2-core                     986 k
glibc-headers                       x86_64                     2.26-28.amzn2.0.1                         amzn2-core                     505 k
golang-bin                         x86_64                     1.9.4-1.amzn2.0.2                         amzn2-core                       48 M
golang-src                         noarch                     1.9.4-1.amzn2.0.2                         amzn2-core                     5.1 M
kernel-headers                     x86_64                     4.14.72-73.55.amzn2                       amzn2-core                     1.1 M
libatomic                           x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                       40 k
libcilkrts                         x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                       80 k
libitm                             x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                       79 k
libmpc                             x86_64                     1.0.1-3.amzn2.0.2                         amzn2-core                       52 k
libmpx                             x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                       46 k
libquadmath                         x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                     186 k
libsanitizer                       x86_64                     7.3.1-5.amzn2.0.2                         amzn2-core                     649 k
mpfr                               x86_64                     3.1.1-4.amzn2.0.2                         amzn2-core                     208 k

Transaction Summary
=================================================================================================================================================
Install 1 Package (+15 Dependent packages)

1-2 설치(ansible-prometheus 활용)

https://github.com/cloudalchemy/demo-site

ceps 와 마찬가지도 최근 유행하는 대부분의 open source 는 ansible 을 활용한 설치 방법이 잘 제공되고 있다.

Windows 의 install wizard 와 비슷한 느낌이다.

  1. Ansible playbook download

mkdir prometheus-ansible
cd prometheus-ansible
git clone https://github.com/cloudalchemy/demo-site.git
cd demo-site
  1. host inventory 수정 : 여기서는 server 와 client 모두 localhost 로 설정

[root@nbsoft demo-site]# cat hosts 
demo ansible_host=demo.cloudalchemy.org ansible_user=root
#influx ansible_host=influx.cloudalchemy.org ansible_user=root

[prometheus]
localhost

[grafana]
localhost

[web]
localhost
  1. ansible-galaxy 로 exporter, grafana 등 ansible 공식 저장소에 등록된 role 파일 다운

ansible-galaxy install -r roles/requirements.yml
  1. group_vars/all/vault 파일 내 granfa password 지정

vault_grafana_password: <<INSERT_YOUR_GRAFANA_PASSWORD>>
  1. group_vars/all/vars 파일 내 ansible_host 변수 설정

ansible_host : "127.0.0.1"
  1. ansible-playbook으로 site.yml 실행 : Client 가 될 node_exporter, Prometheus 수집 서버가 될 prometheus, Dashboard 역할을 할 grafana 를 inventory 에서 지정한다.


- name: Deploy node_exporter
hosts: all
roles:
  - cloudalchemy.node-exporter
tags:
  - node_exporter

- name: Setup core monitoring software
hosts: prometheus
roles:
  - cloudalchemy.blackbox-exporter
  - cloudalchemy.snmp-exporter
  - cloudalchemy.prometheus
  - cloudalchemy.alertmanager
tags:
  - prometheus

- name: Deploy grafana
hosts: grafana
roles:
  - cloudalchemy.grafana
tags:
  - grafana
  1. 설치 확인 방법 :

    1. 모니터링 대상 exporter 확인 : localhost의 9100 포트로 접속하여 metric을 확인한다.

      [root@server demo-site]# curl http://localhost:9100
      <html>
      <head><title>Node Exporter</title></head>
      <body>
      <h1>Node Exporter</h1>
      <p><a href="/metrics">Metrics</a></p>
      </body>
      </html>
    2. prometheus 서버 확인 : localhost의 9090 포트로 접속하여 확인

      [root@server demo-site]# curl http://localhost:9090
      <a href="/graph">Found</a>.

      [root@server demo-site]# systemctl status prometheus
      ● prometheus.service - Prometheus
        Loaded: loaded (/etc/systemd/system/prometheus.service; enabled; vendor preset: disabled)
        Active: active (running) since Sun 2018-10-28 13:58:46 KST; 1min 37s ago
      Main PID: 30931 (prometheus)
        CGroup: /system.slice/prometheus.service
                └─30931 /usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus --storage.ts...

      Oct 28 13:58:46 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:46.989960595Z caller=main.go:242 vm_limits="(soft=unlimited, ...imited)"
      Oct 28 13:58:46 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:46.990683801Z caller=main.go:554 msg="Starting TSDB ..."
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.003881935Z caller=web.go:397 component=web msg="Start list...0.0:9090
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.15982091Z caller=main.go:564 msg="TSDB started"
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.16023552Z caller=main.go:624 msg="Loading configuration fi...heus.yml
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.167632019Z caller=main.go:650 msg="Completed loading of co...heus.yml
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.167935447Z caller=main.go:523 msg="Server is ready to rece...quests."
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.374391069Z caller=main.go:624 msg="Loading configuration f...heus.yml
      Oct 28 13:58:47 nbsoft prometheus[30931]: level=info ts=2018-10-28T04:58:47.375627109Z caller=main.go:650 msg="Completed loading of co...heus.yml
      Oct 28 13:58:47 nbsoft systemd[1]: Reloaded Prometheus.
      Hint: Some lines were ellipsized, use -l to show in full.
      [root@nbsoft demo-site]#


다른 카테고리의 글 목록

Prometheus 카테고리의 포스트를 톺아봅니다

[Linux] Disk 관련 RAID 및 JBOD 정리

2018. 10. 18. 20:02 - mr.november11

[Linux] Disk 관련 RAID 및 JBOD 정리

  • RAID : Disk Fault 대응용

  • Array : Disk capacity 확장용

1. JBOD

  • JBOD : 특별한 RM 없이 하나로 구성

  • Hadoop의 경우 S/W 적으로 replica를 통해 redundancy를 보장하기 때문에 JBOD 사용

  • RAID 구성보다 속도가 빠르다.

    • File 서버 같은 서비스는 RAID 0 나 JBOD 구성 가능

  • JBOD에서 RAID Controller 사용 권장

    • JBOD 구성 시 RAID Controller 사용을 위해 개별 RAID0 으로 나누어 사용

    • RAID Controller 를 미사용 시 감시 및 조치가 어려움

2. RAID

  • S/W Based RAID : OS에서 지원하는 RAID 구성

    • 비용 절감 가능 ( Raid Controller 미사용 )

    • H/W Based 보다 활용이 자유로움

    • Hot Plug나 Re-building 시 H/W Based보다 불편함 (오히려 자동화 시 불편)

    • Parity Check나 Block에 대한 구성을 S/W 적으로 하기 때문에 CPU Resource를 점유함

  • H/W Based RAID(상용) : RAID Controller를 통해 구현

    • Ex) Facebook, Google은 RAID Controller 자체를 사용하지 않음

    • 장애 발생 시 S/W적으로 Node 자체를 격리함

RAID 유형

  1. RAID 0 : JBOD과 다르게 분산하여 Single 병렬로 여러 개 Disk에 저장 함

    • RAID Controller의 집선 Path가 한정되어 있어 Hadoop에서는 JBOD를 더 선호함

    • JBOD는 Hadoop에서 S/W 적으로 구현함

    • 디스크 고장 시 데이터 유실로 일반적으로 IDC에서는 사용하지 않음

  1. RAID 1 : 디스크 mirroring

    • Read Performance가 올라감

    • Write는 효용이 없지만 Read 시 2개의 Disk에서 한꺼번에 읽어올 수 있음

    • Fault Tolerance가 높아짐

    • 비용 증가 발생(2배)

    • 일반적으로 OS 영역은 SSD 2장으로 RAID 1을 구성하여 사용

  1. RAID 10 : Raid 0의 용량 장점 + RAID 1의 가용성의 장점을 조합

    • RAID 1 구성에서 Write Performance를 높일 수 있음

    • DB에서 데이터 저장용으로 많이 사용함

  2. RAID 5 : parity 채용으로 N+1 구성 가능

    • RAID 1보다 Disk 활용도가 높으며, Fault Tolerance를 지원 가능

    • 10개 Disk를 사용 시 10% 만 손실

    • 가용성 측면에서 Parity 구성을 위해서 최소 3개 이상 Disk가 필요 함

    • Disk가 2개 이상 고장 발생

  1. RAID 6 : parity 채용으로 N+2 구성

    • Disk 2개가 고장나도 복구 가능

  1. RAID Spare Disk

    • Spare Disk로 평시에는 Spare 상태로 있다가 Disk Fail 시 활용

    • 중요한 서버의 경우 Spare 구성을 별도

    • 상용 환경에서 많이 사용하는지는 ...



다른 카테고리의 글 목록

Linux 카테고리의 포스트를 톺아봅니다

[Linux] createrepo 을 활용한 yum repository 서버 구축

  1. yum install -y createrepo 수행

    • 설치 되어 있다면 아래와 같은 메시지 출력

    [root@test ~]# yum install -y createrepo
    Failed to set locale, defaulting to C
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.cdnetworks.com
    * extras: centos.mirror.cdnetworks.com
    * updates: ftp.iij.ad.jp
    Package createrepo-0.9.9-28.el7.noarch already installed and latest version
    Nothing to do
    [root@test ~]#
  2. repository 로 사용할 directory 생성 후 createrepo <directory>

    • 정상 실행되었다면 /yumrepo/repodata/repomd.xml 파일이 생성 됨

    • /yumrepo/내 directory를 Client 에서 repolist 로 추가하여 사용 가능

    root@test ~]# mkdir /yumrepo
    root@test ~]# createrepo /yumrepo
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata
    Generating sqlite DBs
    Sqlite DBs complete
    [root@test ~]#
  3. 외부에서 repolist 접속을 위한 Apache httpd 설치

    • yum install -y httpd

    • /etc/httpd/conf.d/httpd.conf 파일을 내 "/var/www/html" 구문 삭제

      DocumentRoot "/var/www/html"

      #
      # Relax access to content within /var/www.
      #
      <Directory "/var/www">
        AllowOverride None
        # Allow open access:
        Require all granted
      </Directory>
    • /etc/httpd/conf.d/httpd.conf 파일을 내 아래 문구 추가

      DocumentRoot "/yumrepo"
      <Directory "/yumrepo">
        AllowOverride None
        Require all granted
      </Directory>
    • httpd daemon 재기동

      systemctl restart httpd
    • curl http://localhost/repodata/repomd.xml 로 웹서버 상태 확인

      [root@test conf]# curl http://localhost/repodata/repomd.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
      <revision>1539673159</revision>
      <data type="filelists">
      <checksum type="sha256">401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93</checksum>
      <open-checksum type="sha256">bf9808b81cb2dbc54b4b8e35adc584ddcaa73bd81f7088d73bf7dbbada961310</open-checksum>
      <location href="repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz"/>
      <timestamp>1539673159</timestamp>
      ... 생략 ...

  4. 이후 /yumrepo/ 내 rpm 등을 업로드 후 yum repo client 에서 추가하면 된다.


다른 카테고리의 글 목록

Linux 카테고리의 포스트를 톺아봅니다

[influxdb] influx CLI로 Query 수행 시 timestamp 를 보기 쉽게(Human-readable) 변경하는 방법

배경

influx CLI를 통해 influxdb 내에 저장된 데이터를 조회 시 아래와 같이 timestamp 형식으로 출력되어 가독성이 떨어진다.

Connected to http://localhost:8086 version 1.6.3
InfluxDB shell version: 1.6.3
> use telegraf
Using database telegraf
> select * from cpu limit 10;
name: cpu
time               cpu       host                                             usage_guest usage_guest_nice usage_idle       usage_iowait usage_irq usage_nice usage_softirq usage_steal         usage_system       usage_user
----               ---       ----                                             ----------- ---------------- ----------       ------------ --------- ---------- ------------- -----------         ------------       ----------
1539295550000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.59798994938187 0           0         0         0             0                   0                   0.402010050243365
1539298550000000000 cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.59839357392165 0           0         0         0             0                   0.20080321285197406 0.20080321285197406
1539299990000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.49849548831452 0           0         0         0             0                   0.30090270813196973 0.20060180542131315
1539300240000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.39819458320315 0           0         0         0             0.10030090270597189 0.20060180541194378 0.30090270812019626
1539302860000000000 cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924643623 0           0         0         0             0                   0.20100502513108956 0.10050251256325962
1539303090000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924643623 0           0         0         0             0                   0.10050251256554478 0.20100502513108956
1539303100000000000 cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.49849548831452 0           0         0         0             0                   0.10030090271065657 0.4012036108426263
1539304410000000000 cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924596964 0           0         0         0             0                   0.10050251256084125 0.2010050251216825
1539304530000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.69879518277891 0           0         0         0             0                   0.10040160642598703 0.20080321285197406
1539304550000000000 cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.69788519375363 0           0         0         0             0                   0.10070493454000086 0.20140986908000172
>

해결법

  1. influx 실행 시 -precision rfc3339 를 추가로 붙이거나

    $ influx -precision rfc3339

  2. influx CLI 실행 후 presision rfc3339 을 실행하면 된다.

    precision rfc3339

[root@nbsoft ~]# influx -precision rfc3339
Connected to http://localhost:8086 version 1.6.3
InfluxDB shell version: 1.6.3
> use telegraf
Using database telegraf
> select * from cpu limit 10;
name: cpu
time                 cpu       host                                             usage_guest usage_guest_nice usage_idle       usage_iowait usage_irq usage_nice usage_softirq usage_steal         usage_system       usage_user
----                 ---       ----                                             ----------- ---------------- ----------       ------------ --------- ---------- ------------- -----------         ------------       ----------
2018-10-11T22:05:50Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.59798994938187 0           0         0         0             0                   0                   0.402010050243365
2018-10-11T22:55:50Z cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.59839357392165 0           0         0         0             0                   0.20080321285197406 0.20080321285197406
2018-10-11T23:19:50Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.49849548831452 0           0         0         0             0                   0.30090270813196973 0.20060180542131315
2018-10-11T23:24:00Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.39819458320315 0           0         0         0             0.10030090270597189 0.20060180541194378 0.30090270812019626
2018-10-12T00:07:40Z cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924643623 0           0         0         0             0                   0.20100502513108956 0.10050251256325962
2018-10-12T00:11:30Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924643623 0           0         0         0             0                   0.10050251256554478 0.20100502513108956
2018-10-12T00:11:40Z cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.49849548831452 0           0         0         0             0                   0.10030090271065657 0.4012036108426263
2018-10-12T00:33:30Z cpu0     ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.6984924596964 0           0         0         0             0                   0.10050251256084125 0.2010050251216825
2018-10-12T00:35:30Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.69879518277891 0           0         0         0             0                   0.10040160642598703 0.20080321285197406
2018-10-12T00:35:50Z cpu-total ip-172-31-24-216.ap-northeast-2.compute.internal 0           0               99.69788519375363 0           0         0         0             0                   0.10070493454000086 0.20140986908000172
>


다른 카테고리의 글 목록

Influxdb 카테고리의 포스트를 톺아봅니다

node.js 실행 시 events.js:183 throw er; // Unhandled 'error' event 에러가 발생한 경우

1. 현상

node app.js 실행 시 events.js 에서 Unhandled 'error' event 에러 발생

 

2. 원인 및 해결방법

기존에 node app.js 프로세스가 기실행 중일 경우 port 충돌 발생으로 프로세스가 정상 실행되지 않는다.

해당 프로세스를 종료하면

에러 문구 없이 정상적으로 실행 가능하다.

 

다른 카테고리의 글 목록

node.js 카테고리의 포스트를 톺아봅니다