About Navicat Premium error: ORA-12541: TNS: No Listener solution

2023-01-05   ES  

Create users

From 5.0, Elasticsearch’s security level has improved, and the ROOT account is not allowed to start, so we have to add a user

1 Create Elasticsearch user group

1

[root@localhost ~]# groupadd elasticsearch

2 Create a user ES and set the password to ES

After

1

2

[root@localhost ~]# useradd es

[root@localhost ~]# passwd es

, enter the password twice and complete the password modification

3 User ES Add to Elasticsearch User Group

1

[root@localhost ~]# usermod -G elasticsearch es

4 Set SUDO permissions

[root@localhost ~]# visudo

Appears: Visudo: Command Not Found error, because there is no Sudo installation

execute command installation:yum install sudo

For other reasons, please refer tohttps://blog.csdn.net/Zsigner/article/details/88863745

1

2

3

4

5

under the root of root all = (all) all line

Add ES user as follows:

es ALL=(ALL) ALL

After modifying the effective command

sudo visudo -c

Add to ES user operation after adding successfully

1

2

[root@localhost ~]# su es

[es@localhost root]$

download installation package

download elasticsearch in/usr/local/src directory, and decompress tar.gz

[[email protected] src]$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz

Appears: -bash: Wget: Command Not Founderror, the reason is that there is no installation of WGET

execute commands under root -yinstall wett, ES user under Sudo Yum -Y Install WGET

After downloading, decompress (the compression command is a file name generated by TAR -ZCVF compressed file/directory EG: Tar -ZCVF FILENAME.TAR.GZ ./filename)

[es@localhost src]$ sudo tar -zxvf elasticsearch-6.3.2.tar.gz 


Enter the ES account password.

ES all = (all) all add

ceph    ALL=(es)        NOPASSWD:ALL

Perform the command under ES user, you don’t need to enter the password anymore, as follows

Move the decompressed file to /usr /local

1

[es@localhost src]$ sudo mv elasticsearch-6.3.2 /usr/local

Change Elasticsearch-6.3.2 folder and internal files, the user is ES, the user group is elasticsearch, -R means step by step

1

[es@localhost local]$ sudo chown -R es:elasticsearch elasticsearch-6.3.2

elasticsearch configuration

elasticsearch.yml modification

1

[es@localhost elasticsearch-6.3.2]$ vim config/elasticsearch.yml

Error: Sudo: vim: Command Not Found, the reason is not installed with VIM

Installation command: yum install vim

Installation completes the modified yml file command:

vim config/elasticsearch.yml

Modify content (add it without it):

cluster.name: my-application

node.name: node-1

network.host: 0.0.0.0 

http.port: 9200

# Because Centos6 does not support seccomp, ES defaults bootstrap.system_call_filter to test for TRUE

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

Modify /etc/sysctl.conf

Switch back to root user execution

1

vim /etc/sysctl.conf

Add content to the last side of the file:

vm.max_map_count=262144

After saving exit, use sysctl -P to refresh and take effect

[[email protected] ~]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
vm.max_map_count = 262144
[[email protected] ~]# 

Modify the file /etc/security/limits.conf

1

vim /etc/security/limits.conf

Add the following content:

1

2

3

4

5

* hard nofile 65536

* soft nofile 65536

* soft nproc 2048

* hard nproc 4096 

Start ElasticSearch may also report the following errors

max number of threads [1024] for user [lish] likely too low, increase to at least [4096]

Solution: Switch to the root user and enter the limits.d directory to modify the configuration file.

vi /etc/security/limits.d/90-nproc.conf

Modify the following content:

* soft nproc 1024

# Modified to

* soft nproc 4096

Start Elasticsearch

After completing the above configuration modification, switch to the ES user, the directory switch to the ELASTICSEARCH installation directory for execution

1

[es@localhost elasticsearch-6.3.2]$ bin/elasticsearch

Enter LocalHost in the browser: 9200 verification whether it is successful. If the browser outputs the following information, it means that the installation is successfully started

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

{

  "name" "node-1",

  "cluster_name" "elasticsearch",

  "cluster_uuid" "8okSnhNzRr6Xo233szO0Vg",

  "version" : {

    "number" "6.3.2",

    "build_flavor" "default",

    "build_type" "tar",

    "build_hash" "053779d",

    "build_date" "2018-07-20T05:20:23.451332Z",

    "build_snapshot" false,

    "lucene_version" "7.3.1",

    "minimum_wire_compatibility_version" "5.6.0",

    "minimum_index_compatibility_version" "5.0.0"

  },

  "tagline" "You Know, for Search"

}

If abnormal information appears during the startup process, please follow the information on Baidu. Below is an error message encountered by the startup process and attach a solution

信息 4 1: Expecting token of type [start_object] But Found [Value_string]]; 

 Reason for error: Elasticsearch.yml file internal error 
 Solution: Carefully check the configuration item writing format in the yml file: (space) name: (space) value 

 ------------------------------------------------ ----------------------------------------------------------------------------------------- 
 Anomalial information 2: java.lang.unsupportedOperationException: Seccomp unavailable: config_seccomp not compiled into kernel, config_seccomp and config_filter are neededed 
  Reason for error: CentOS6 does not support seccomp, and ES defaults bootstrap.system_call_filter to test for TRUE, so the detection fails. 
 
 Solution: Modify elasticsearch.yml to add content: 

 bootstrap.Memory_lock: false 
 bootstrap.system_call_filter: false 

 ------------------------------------------------ ----------------------------------------------------------------------------------------- 
 ------------------------------------------------ ----------------------------------------------------------------------------------------- 
 Anomalial information 3: bindtransportException [failed to bind to [9300-9400] 
 Solution to open the configuration file elasticsearch.yml to modify network.host: 192.168.0.1 to the IP 0.0.0.0.0 


 ------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------- 
 Abnormal Information 4: Max Number of Threads [1024] for user [lish] likely too low, increase to at least [2048] 

 Solution: Switch to the root user and enter the limits.d directory to modify the configuration file. 

 vi /etc/security/limits.d/90- nProc.conf 

 Modify the following content: 

 * Soft NPROC 1024 

 #change into 

 * Soft NPROC 2048

Reference article:

https://www.cnblogs.com/jingping/p/9448099.html

 

source

Related Posts

GetCookie and SetCookie’s package

PYQT5 Chinese File Dialog box QFILEDIALOG The solution to collapse after calling

Redhat and Ubuntu Install FTPJ2EE

C# Partial Class usage

About Navicat Premium error: ORA-12541: TNS: No Listener solution

Random Posts

Android system source code system application installation process (below) Xiaodian brother

ES command summary

Since the system buffer space is insufficient or the queue is full, the solution to the operation on the socket cannot be performed

Android animation Frameanimation (frame animation) AnimationDrawable

POJ 2185 Milking Grid