전체 글 1106

[hive] hive s3 연결시 hive 2.3.0, 3.0.0 이상에서 설정해야 하는 hive.conf.hidden.list 값

hive 에서 s3 를 연결할 때 core-site.xml 파일에 s3 설정 값을 정상적으로 입력하고, hadoop으로 데이터 조회를 확인하고, hive를 이용하여 테이블 생성까지 되는데, tez 나 mr을 이용한 작업을 돌릴 때 다음과 같은 오류가 발생하였습니다. Caused by: com.amazonaws.AmazonClientException: No AWS Credentials provided by SimpleAWSCredentialsProvider : org.apache.hadoop.fs.s3a.CredentialInitializationException: Access key, secret key or session token is unset at org.apache.hadoop.fs.s3a.AW..

빅데이터/hive 2024.03.05

[maven] aws-sdk-java 코드 빌드시 로컬 소스로 빌드하는 방법

aws sdk java 소스코드를 빌드해서 사용해야 할 일이 생겼는데 빌드를 하이 최종적으로 생기는 aws-java-sdk-bundle-1.12.262.jar 파일이 로컬에 빌드한 파일을 이용하지 않고, 메이븐에 있는 동일한 버전의 파일을 가져와서 shade로 복사하였습니다. 로컬에 수정한 내용의 파일을 이용해서 사용해야 하는데 메이븐 옵션을 바꾸어도 변경이 되지 않아서 우선 버전을 바꾸어서 적용하니 로컬의 파일을 이용하였습니다. https://github.com/aws/aws-sdk-java GitHub - aws/aws-sdk-java: The official AWS SDK for Java 1.x. The AWS SDK for Java 2.x is available here: https://githu..

Tools/maven 2024.03.05

[spark] spark-shell 실행 시 발생하는 java.lang.NoSuchFieldError: JAVA_9 오류 처리

spark-shell을 실행할 때 다음과 같은 오류가 발생하는 경우가 있습니다. 24/02/22 13:09:59 INFO SparkEnv: Registering MapOutputTracker 24/02/22 13:09:59 INFO SparkEnv: Registering BlockManagerMaster 24/02/22 13:09:59 INFO BlockManagerMasterEndpoint: Using org.apache.spark.storage.DefaultTopologyMapper for getting topology information 24/02/22 13:09:59 INFO BlockManagerMasterEndpoint: BlockManagerMasterEndpoint up java.lang..

빅데이터/spark 2024.02.25

[hive] hive 의 mr 엔진의 오류 처리 - FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. DEFAULT_MR_AM_ADMIN_USER_ENV

Hive 에서 MR 엔진으로 작업을 실행할 때 다음과 같은 오류가 발생하는 경우가 있습니다 FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask. DEFAULT_MR_AM_ADMIN_USER_ENV 원인은 hadoop 라이브러리 충돌입니다. tez 0.9.2 버전에 들어있는 기본 라이브러리가 hadoop 2.7이고, 설치한 하둡 라이브러리가 2.10.2 이기 때문에 발생하는 오류입니다. 문제 해결을 위애서는 tez 에 들어있는 하둡 라이브러리를 삭제 하면 됩니다. rm hadoop-mapreduce-client-core-2.7.0.jar rm hadoop-mapreduce-client-commo..

빅데이터/hive 2024.02.23

[terraform] template v2.2.0 does not have a package available for your current platform, darwin_arm64 오류 처리

M1 맥북에서 테라폼 코드를 작성할 때 'template_cloudinit_confg'를 이용하면 오류가 발생합니다. - Using previously-installed terraform-provider-openstack/openstack v1.53.0 ╷ │ Error: Incompatible provider version │ │ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform, darwin_arm64. │ │ Provider releases are separate from Terraform CLI releases, so not all prov..

[terraform] provider를 로컬 캐쉬를 이용하여 초기화 하는 방법

테라폼을 이용해서 작업을 할 때 terrafom init 명령을 입력하면 프로바이더를 다운로드 하게 되는데 , 폐쇄된 환경에서는 사용할 수 없게 됩니다. 이런 경우 로컬 캐쉬를 이용해서 테라폼 프로바이더를 설정할 수 있습니다. # home 디렉토리에 .terraformrc 파일 생성 후 다음 내용을 입력 # .terraformrc 파일 내용 plugin_cache_dir = "/home/deploy/.terraform.d/plugins-cache" disable_checkpoint = true provider_installation { filesystem_mirror { path = "/home/deploy/.terraform.d/plugins-cache" include = ["registry.terra..

[intellij] python 프로젝트 생성 시 AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython2macOsArmFramework' 오류

갑자기 인텔리 j 에서 파이썬 프로젝트를 생성할 때 venv 를 선택하면 다음과 같은 오류가 발생하였습니다. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/logan..

Tools 2024.02.07

[trino] trino chart 에서 https 적용 방법

trino를 chart를 이용하여 설치하고, 인그레스에 tls 를 설정하면 https 를 이용하여 통신할 수 있습니다. 하지만 인그레스에만 설정을 하게 되면 코디네이터와 워커의 내부 통신은 http를 이용하게 되고, 쿼리를 실행할 때 반환되는 nextUri 값이 http로 반환되어 오류가 발생합니다. trino에서는 이것을 처리하위한 설정을 제공합니다. config.properties 파일에 다음 설정을 추가하면 내부 통신을 반환할 때 https로 설정하여 반환합니다. http-server.process-forwarded=true https://trino.io/docs/current/security/tls.html#use-a-load-balancer-to-terminate-tls-https TLS and..

빅데이터/trino 2024.01.09

[hive] metastore 메트릭 설정 하는 방법

하이브 메타스토어의 metric을 설정하려면 hive-site.xml 파일에 다음 설정을 추가해야 합니다. 다음과 같이 설정하면 /tmp/report.json 위치에 5초에 한번 씩 메트릭 설정 파일을 생성합니다. 기본 설정은 json 형태의 파일이며, JMX 형태로 출력할 수도 있습니다. hive.metastore.metrics.enabled true hive.service.metrics.file.location /tmp/report.json hive.service.metrics.file.frequency 5 seconds 다음 위치에서 설정을 확인할 수 있습니다. https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#Con..

빅데이터/hive 2024.01.08

[hdfs] java.io.IOException: Got error, status=ERROR, status message , ack with firstBadLink as 192.168.0.103:50010 오류

HDFS 운영 중 다음과 같은 오류가 발생하였습니다. 23/12/18 15:22:43 INFO hdfs.DataStreamer: Exception in createBlockOutputStream java.io.IOException: Got error, status=ERROR, status message , ack with firstBadLink as 192.168.0.103:50010 at org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.checkBlockOpStatus(DataTransferProtoUtil.java:118) at org.apache.hadoop.hdfs.DataStreamer.createBlockOutputStre..

빅데이터/hdfs 2023.12.26

[oozie] java.lang.NoSuchMethodError: org.apache.log4j.config.PropertySetter.activate 오류 해결 방법

oozie 5.2.1에서 서버를 실행 할 때 다음의 오류가 발생하였습니다. Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.config.PropertySetter.activate()V at org.apache.log4j.PropertyConfigurator.parseAppenderFilters(PropertyConfigurator.java:923) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:845) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigu..

빅데이터/oozie 2023.11.13

[mysql8] Ubuntu22에 mysql8 파일로 설치하는 방법

Ubuntu22에 mysql을 설치 할 때 보통 apt 를 이용하는데 인터넷이 연결되지 않는 환경에서 mysql을 설치해야 하는 경우가 있습니다. Ubuntu 22 기준에서 먼저 설치 파일을 다운로드 합니다. 다음의 사이트에서 DEB Buldle 을 다운로드 합니다. https://dev.mysql.com/downloads/mysql/ MySQL :: Download MySQL Community Server Select Version: 8.2.0 Innovation 8.0.35 5.7.44 Select Operating System: Select Operating System… Microsoft Windows Ubuntu Linux Debian Linux SUSE Linux Enterprise Serve..

[python] ERROR: Unnamed requirements are not allowed as constraints 오류 처리

pip를 이용하여 superset을 설치할 때 다음과 같은 오류가 발생하였습니다. $ pip install apache-superset==2.1.1 -c https://raw.githubusercontent.com/apache/superset/2.1.1/requirements/base.txt DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the res..

python 2023.11.11

[openstack] 오픈 스택의 allowed address pairs를 이용하여 VIP 구현하는 방법

VIP(Virtual IP)는 서버 그룹의 대표 IP를 생성하여 여러 대의 서버에 설정하고, HA 를 구성할 수 있게 해줍니다. 오픈 스택에서는 allowed address pairs를 이용하여 서버에 IP를 부여하고, keepalived 를 설치하여 HA를 구성할 수 있습니다. allowed address pairs 설정 VM을 2개 생성 vm1: 192.168.0.1 vm2: 192.168.0.2 Port를 1개 생성 192.168.0.102 로 생성 명령어 실행 openstack port set --allowed-address 192.168.0.102/22 [서버 1의 Port ID] openstack port set --allowed-address 192.168.0.102/22 [서버 2의 Por..

[superset] ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: cannot allocate memory in static TLS block 오류

슈퍼셋을 처음 설치하고 mysql을 연동하는 과정에서 다음과 같은 오류가 발생하였습니다. File "/home/ubuntu/superset/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned return fn(*args, **kwargs) File "/home/ubuntu/superset/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 560, in create_engine dbapi = dialect_cls.dbapi(**dbapi_args) File "/home/ubuntu/superset/lib/python3.10/site-packages..

카테고리 없음 2023.11.08

[superset] A Default SECRET_KEY was detected, please use superset_config.py to override it. 오류

슈퍼셋을 설치하고 처음 실행하면 다음과 같은 오류가 발생합니다. 이는 슈퍼셋 설정의 SECRET_KEY를 설정하지 않아서 발생합니다. 이 경고를 없애기 위해서는 슈퍼셋 설정에 SECRET_KEY를 입력하면 됩니다. # base64 난수 생성 openssl rand -base64 42 # 슈퍼셋 설정 파일 생성 vi superset_config.py # 파일 내용 SECRET_KEY = 'ZMp3T6GsYeaxDUE1AGVoOX6ZemMKMBZaPwCN7T25YOHUiIZyfU+w4ISg' # 명령어 실행전 슈퍼셋 설정파일 지정 export SUPERSET_CONFIG_PATH='/home/ubuntu/superset_config.py' # 명령어 실행 superset init

카테고리 없음 2023.11.08

[python] pyyaml 설치중 _DeprecatedConfig: Deprecated config in `setup.cfg` 오류

슈퍼셋을 설치 하는 중 requirements.txt 파일에 pyyaml 이 들어 있었고, 설치 중 다음과 같은 오류가 발생하였습니다. × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [62 lines of output] /tmp/pip-build-env-kcr6bs1q/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg` !! 해결방법 해당 문제는 아직 논의 중인 것으로 보이고, 다운그레이드나 업그레이드로 문제를 해결할 수 있는 것으로 보..

python 2023.11.08

[openstack] 오픈스택 서버를 다른 하이퍼바이저로 옮기는 방법

오픈스택을 사용할 때 하이퍼 바이저가 실행된 서버의 상태에 이상이 생겨서 서버를 다른 하이퍼 바이저로 옮겨야 할 때 shelve 기능을 이용할 수 있습니다. OpenStack에서 "shelve"는 가상 머신(VM)의 일시 중지 및 저장 기능을 나타냅니다. 이것은 VM을 현재 상태로 저장하고 나중에 다시 복원할 수 있는 유용한 기능입니다. "shelve" 작업은 VM의 가동 중지 없이도 실행할 수 있으며, VM의 디스크 이미지와 상태 정보를 OpenStack 데이터베이스에 저장합니다. # shelve openstack server shelve [서버 ID] # unshelve openstack server unshelve [서버 ID] # 특정 호스트의 서버 목록 확인 openstack server lis..

[trino] 트리노에서 조회 할 때 column 'xxxx' cannot be resolved ... SYNTAX_ERROR

트리노를 이용해서 데이터를 조회할 때 where 조건에서 다음과 같은 오류가 발생하였습니다. 이는 문자열을 쌍 따옴표(") 에서 홑 따옴표(')로 변경하면 오류가 해결됩니다. 트리노는 쌍 따옴표는 칼럼, 테이블 이름을 표현하는데 사용하고, 문자열은 홑 따옴표로 표현하기 때문에 이를 정확하게 사용해야 합니다.

빅데이터/trino 2023.10.15

[terraform] user_data의 변경 사항이 없을 때 replace가 되는 문제 회피 하는 방법

테라폼을 이용할 때 user_data의 변경이 없는 데도 replace 가 되면서 VM이 재생성 되는 경우가 있습니다. 이 문제가 발생하는 원인은 정확하게 찾지는 못했지만 테라폼의 버그 인 것으로 보입니다. Hash for the new user_data in plan is incorrect and not the same one as apply · Issue #2627 · hashicorp/terraform When using template_file for user_data in aws_instance, hash for the new user_data in plan always be the same one. (I have updated this issue to better describe the sit..

카테고리 없음 2023.10.06

[python] python-kafka 라이브러리에서 ssl.SSLError: [SSL] PEM lib (_ssl.c:3833) in python ssl library 오류 처리

파이썬 카프카 라이브러리에서 ssl 을 이용한 통신을 할 때 이런 오류가 발생하는 경우가 있습니다. 이럴 때는 사용하는 ssl key 파일의 형식을 확인 하는 것이 좋습니다. 저의 경우에는 ssl 선언할 때 사용한 pem 파일의 형식이 정상적이지 않아서 발생하였습니다. pem 파일이 맞는지, 정상적인 파일인지 확인하는 것이 좋습니다 . producer = KafkaProducer(acks=0, bootstrap_servers=kafka_hosts, security_protocol='SSL', ssl_check_hostname=True, ssl_cafile="ca-certs.pem", ssl_certfile="server.pem", ssl_keyfile="key.pem", ssl_password="your..

python 2023.09.13

[ldap] Hue ldap 에서 검색 조건을 두 개 이상 넣어서 검색 할 때 사용 방법

Hue 에서 LDAP을 이용하여 DN을 검색할 때 검색 조건을 두개 이상 처리 하는 방법은 다음과 같습니다. Hue LDAP을 이용할 때 ou=people, ou=community 에서 모두 사용자를 검색해야 할 때 다음과 같은 형태로 검색할 수 있습니다. 다음은 people, community 로 구성 된 ou 에서 특정 사용자를 찾을 때 사용하는 user_filter 입니다. user_filter="|(ou:dn:=people)(ou:dn:=community)" https://confluence.atlassian.com/kb/how-to-write-ldap-search-filters-792496933.html How to write LDAP search filters | Atlassian Suppor..

카테고리 없음 2023.08.30

[bash] curl을 이용할 때 Error in the HTTP2 framing layer 에러 발생시 처리 방법

curl을 이용하여 통신할 때 특정 상황에서 다음 오류가 발생하는 경우가 있습니다. curl은 기본적으로 HTTP2 프로토콜을 이용하여 통신하고, 이 프로토콜을 이용하던 중 오류가 발생하면 다음의 에러가 나타납니다. Error in the HTTP2 framing layer 이 오류는 옵션을 추가하여 HTTP1 통신으로 처리하면 회피할 수 있습니다. curl --http1.1 xxx

리눅스/Bash 2023.08.24

[bash] apt conflict 오류

apt 를 이용하여 라이브러리를 설치 할 때 다음과 같은 오류가 발생하는 경우가 있습니다. The following packages have unmet dependencies: libsasl2-modules-gssapi-heimdal : Conflicts: libsasl2-modules-gssapi-mit but 2.1.27~101-g0780600+dfsg-3ubuntu2.3 is to be installed libsasl2-modules-gssapi-mit : Conflicts: libsasl2-modules-gssapi-heimdal but 2.1.27~101-g0780600+dfsg-3ubuntu2.3 is to be installed E: Unable to correct problems, you ..

리눅스/Bash 2023.08.19

[pyhive] pyhive에서 커버로스 인증을 사용할 때 no mechanism available: No worthy mechs found 오류

PyHive에서 커버로스 인증을 사용할 때 다음과 같은 오류가 발생 하였습니다. File "/usr/local/lib/python3.6/site-packages/thrift_sasl/__init__.py", line 72, in open message=("Could not start SASL: %s" % self.sasl.getError())) thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found 이 오류는 cyrus-sasl 라이브러리가 설치 되어 있지 않을 때 발생합니다. ..

python 2023.08.19

[Kerberos] Minor code may provide more information (Incorrect net address) 오류

K8s 환경의 에어플로우 파드에서 커버로스 티켓을 생성하고, 사용할 때 다음과 같은 오류가 발생하였습니다. File "/home/airflow/.local/lib/python3.8/site-packages/thrift_sasl/__init__.py", line 84, in open raise TTransportException(type=TTransportException.NOT_OPEN, thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-1) SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor co..

카테고리 없음 2023.08.19