There is an error in the pool configuration exit

Hi Everyone, Please help me Pool :: get_ansible_inventory: Not found records in ansible config / etc / ansible / hosts
 

Пользователь 176844

Постоянный посетитель

Сообщений: 130
Баллов: 22
Авторитет:

5

Рейтинг пользователя:

0

Регистрация: 31.03.2013

#1

4

14.07.2020 22:22:23

нужно заполнить вот этот файл
/etc/ansible/hosts

по аналогии

Код
# Bitrix VM default configuration group
[bitrix-hosts]
server1   ansible_connection=local ansible_ssh_host=192.168.1.250

[bitrix-mgmt]
server1   ansible_connection=local ansible_ssh_host=192.168.1.250


[bitrix-web]
server1   ansible_connection=local ansible_ssh_host=192.168.1.250

[bitrix-mysql]
server1   ansible_connection=local ansible_ssh_host=192.168.1.250

[bitrix-memcached]

[bitrix-sphinx]

[bitrix-push]

там где у меня server1 — надо указать тот хост, что был у вас при создании вирт. машины, например основной домен
а вместо айпишника — ваш айпи сервера(у меня он локальный)

остальное не меняется

 

Пользователь 4699800

Заглянувший

Сообщений: 1
Авторитет:

0

Рейтинг пользователя:

0

Регистрация: 20.10.2020

Дмитрий Платонов, подскажите, где этот файл может находиться?

 

Пользователь 1652771

Заглянувший

Сообщений: 3
Авторитет:

0

Рейтинг пользователя:

0

Регистрация: 29.01.2018

#3

0

12.01.2022 11:36:13

Цитата
написал:
нужно заполнить вот этот файл/etc/ansible/hosts

Супер, спасибо огромное!

 

Пользователь 5967108

Заглянувший

Сообщений: 3
Авторитет:

0

Рейтинг пользователя:

0

Регистрация: 28.01.2022

#4

0

28.01.2022 09:23:12

file /etc/ansible/hosts – or inventory file (configuration description) contains description of hosts that can be managed.
In case of BitrixVM Virtual Appliance we store only groups and hosts that are included into these groups.

The file /etc/ansible/hosts is separated by groups. Groups have roles, executed by servers. The same server can be located in several groups.

Example:

Код
# Bitrix VM default configuration group
[bitrix-hosts] 
vm03 ansible_ssh_host=192.168.1.215 
vm04 ansible_connection=local ansible_ssh_host=192.168.1.227 

.. 
[bitrix-push] 

vm03 ansible_ssh_host=192.168.1.215

The group [bitrix-hosts] contains all hosts that can be managed.

The group [bitrix-push] contains hosts that execute the role of push server. In this example: server vm03 acts as the instant message server.
files in catalogs /etc/ansible/host_vars/ and /etc/ansible/group_vars/ – personal server and groups settings accordingly.
Example:

Код
bx_connect: ipv4 
bx_host: vm04 
bx_hostname: vm04 
bx_netaddr: 192.168.1.227
 

Пользователь 6107924

Заглянувший

Сообщений: 1
Авторитет:

0

Рейтинг пользователя:

0

Регистрация: 17.03.2022

Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit.

rapidfs

How can I restore the standard menu?

 

Пользователь 219895

Заглянувший

Сообщений: 5
Авторитет:

1

Рейтинг пользователя:

0

Регистрация: 08.10.2013

#6

1

25.04.2022 12:10:03

Цитата
написал:
Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit.    ra   pi dfs  

How can I restore the standard menu?

rm -rf /etc/ansible/host* /etc/ansible/group_vars/ /etc/ansible/ansible-roles

 

Пользователь 108113

Постоянный посетитель

Сообщений: 77
Баллов: 12
Авторитет:

1

Рейтинг пользователя:

0

Регистрация: 02.02.2012

yum upgrade
после этого упало дофига чего nginx mysql и anible
Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts

Хорошо что у меня есть бэкапы всей etc
Все остальное починил быстро, а вот тут пришлось сравнивать файлы с бэкапа,  несколько файлов было изменено и во всех них было одно единственное изменение.

Старый конфиг
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.22

[bitrix-mgmt]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.22

[bitrix-web]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.22

[bitrix-mysql]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.22

После обновления
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.21

[bitrix-mgmt]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.21

[bitrix-web]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.21

[bitrix-mysql]
78-110-60-22.net.hts.ru   ansible_connection=local ansible_ssh_host=78.110.60.21

После исправления  во всех изменённых файлах, проблема исчезла
пересоздавать пул не нужно.

Причину как такое вообще могло получиться даже приблизительно не могу придумать.

 

Пользователь 6273128

Заглянувший

Сообщений: 1
Авторитет:

0

Рейтинг пользователя:

0

Регистрация: 19.05.2022

 

Пользователь 760259

Заглянувший

Сообщений: 3
Авторитет:

1

Рейтинг пользователя:

0

Регистрация: 15.11.2016

#9

0

01.11.2022 15:45:14

Спасибо! Всё заработало!

Содержание

  1. Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts
  2. Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts
  3. Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts
  4. После обновления сервера выдает сообщение что не сконфигурирован серверный пул.
  5. После обновления сервера выдает сообщение что не сконфигурирован серверный пул.

Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts

нужно заполнить вот этот файл
/etc/ansible/hosts

там где у меня server1 — надо указать тот хост, что был у вас при создании вирт. машины, например основной домен
а вместо айпишника — ваш айпи сервера(у меня он локальный)

остальное не меняется

Цитата
написал:
нужно заполнить вот этот файл/etc/ansible/hosts

file /etc/ansible/hosts – or inventory file (configuration description) contains description of hosts that can be managed.
In case of BitrixVM Virtual Appliance we store only groups and hosts that are included into these groups.

The file /etc/ansible/hosts is separated by groups. Groups have roles, executed by servers. The same server can be located in several groups.

The group [bitrix-hosts] contains all hosts that can be managed.

The group [bitrix-push] contains hosts that execute the role of push server. In this example: server vm03 acts as the instant message server.
files in catalogs /etc/ansible/host_vars/ and /etc/ansible/group_vars/ – personal server and groups settings accordingly.
Example:

Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

Цитата
написал:
Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

yum upgrade
после этого упало дофига чего nginx mysql и anible
Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/host s

Хорошо что у меня есть бэкапы всей etc
Все остальное починил быстро, а вот тут пришлось сравнивать файлы с бэкапа, несколько файлов было изменено и во всех них было одно единственное изменение.

Старый конфиг
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22
.

После обновления
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21
.

После исправления во всех изменённых файлах, проблема исчезла
пересоздавать пул не нужно.

Причину как такое вообще могло получиться даже приблизительно не могу придумать.

Источник

Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts

нужно заполнить вот этот файл
/etc/ansible/hosts

там где у меня server1 — надо указать тот хост, что был у вас при создании вирт. машины, например основной домен
а вместо айпишника — ваш айпи сервера(у меня он локальный)

остальное не меняется

Цитата
написал:
нужно заполнить вот этот файл/etc/ansible/hosts

file /etc/ansible/hosts – or inventory file (configuration description) contains description of hosts that can be managed.
In case of BitrixVM Virtual Appliance we store only groups and hosts that are included into these groups.

The file /etc/ansible/hosts is separated by groups. Groups have roles, executed by servers. The same server can be located in several groups.

The group [bitrix-hosts] contains all hosts that can be managed.

The group [bitrix-push] contains hosts that execute the role of push server. In this example: server vm03 acts as the instant message server.
files in catalogs /etc/ansible/host_vars/ and /etc/ansible/group_vars/ – personal server and groups settings accordingly.
Example:

Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

Цитата
написал:
Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

yum upgrade
после этого упало дофига чего nginx mysql и anible
Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/host s

Хорошо что у меня есть бэкапы всей etc
Все остальное починил быстро, а вот тут пришлось сравнивать файлы с бэкапа, несколько файлов было изменено и во всех них было одно единственное изменение.

Старый конфиг
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22
.

После обновления
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21
.

После исправления во всех изменённых файлах, проблема исчезла
пересоздавать пул не нужно.

Причину как такое вообще могло получиться даже приблизительно не могу придумать.

Источник

Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/hosts

нужно заполнить вот этот файл
/etc/ansible/hosts

там где у меня server1 — надо указать тот хост, что был у вас при создании вирт. машины, например основной домен
а вместо айпишника — ваш айпи сервера(у меня он локальный)

остальное не меняется

Цитата
написал:
нужно заполнить вот этот файл/etc/ansible/hosts

file /etc/ansible/hosts – or inventory file (configuration description) contains description of hosts that can be managed.
In case of BitrixVM Virtual Appliance we store only groups and hosts that are included into these groups.

The file /etc/ansible/hosts is separated by groups. Groups have roles, executed by servers. The same server can be located in several groups.

The group [bitrix-hosts] contains all hosts that can be managed.

The group [bitrix-push] contains hosts that execute the role of push server. In this example: server vm03 acts as the instant message server.
files in catalogs /etc/ansible/host_vars/ and /etc/ansible/group_vars/ – personal server and groups settings accordingly.
Example:

Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

Цитата
написал:
Connectus to the server via ssh and instead of the standard page with a menu Bitrix VM appears this text:
Bitrix virtual appliance version 7.3.1
Pool Configuration manager on this host
Pool::get_ansible_inventory: Not found in config records ansible /etc/ansible/ hosts
There is an error in the pool configuration! exit. ra pi dfs

How can I restore the standard menu?

yum upgrade
после этого упало дофига чего nginx mysql и anible
Pool::get_ansible_inventory: Not found records in ansible config /etc/ansible/host s

Хорошо что у меня есть бэкапы всей etc
Все остальное починил быстро, а вот тут пришлось сравнивать файлы с бэкапа, несколько файлов было изменено и во всех них было одно единственное изменение.

Старый конфиг
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 22
.

После обновления
# Bitrix VM default configuration group
[bitrix-hosts]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mgmt]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-web]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21

[bitrix-mysql]
78-110-60-22.net.hts.ru ansible_connection=local ansible_ssh_host=78.110.60. 21
.

После исправления во всех изменённых файлах, проблема исчезла
пересоздавать пул не нужно.

Причину как такое вообще могло получиться даже приблизительно не могу придумать.

Источник

После обновления сервера выдает сообщение что не сконфигурирован серверный пул.

Доброго времени суток.

Сегодня запустил обновление виртуальной машины (в меню пункт 19). Все сработало и при следующем входе система предложила обновиться до версии 5.0. что и было запущено. Так же все вроде без проблем.
Сейчас при входе программа начала выдавать следующее сообщение:

Цитата
login as: root
root@**********.net’s password:
Last login: Wed Jun 11 14:35:50 2014 from ****************************.net
Bitrix virtual appliance version 5.0.37
Pool Configuration manager on this host
Not found configured server’s pool! May be You want to add new.
Found network interfaces on the server:
————————————————————————————
Int | Link | Speed | MAC | IPAddress
————————————————————————————
gre0 | no | | |
gretap0 | no | | 00:00:00:00:00:00 |
venet0 | | | |
————————————————————————————
Available actions:
0. Exit
Enter selection:

Алексей Титов, не знаю, решили или нет, но на всякий случай отпишу.
Была та же проблема, вылезала эта страница с одним вариантом «0. Exit»

Сегодня «выбрал» пункт 1 (хоть его и не было в меню) – появилась знакомая менюшка, продолжил работу дальше 🙂

Действительно. нажал 1 и сформировался пул и появилась менюшка.

Available actions:
0. Exit
Enter selection: 1
Created sshkey — /etc/ansible/.ssh/***********.bxkey
CREATE_POOL complete: Press ENTER for exit:
Bitrix virtual appliance version 5.0.37
Pool Configuration manager on this host
Found next servers in the pool:
————————————————————————————
ServerName | NetAddress | Conn | Ver | Passwords | Uid | Roles
————————————————————————————
vm********** | 127.0.0.1 | Y | 5.0-37 | ok | 501 | mgmt,mysql_master_1,web
————————————————————————————
Available actions:
1. Manage Hosts in the pool
2. Manage localhost
3. Configure MySQL servers
4. Configure memcahed servers
5. Background tasks in the pool
6. Manage sites in the pool
7. Manage sphinx in the pool
8. Manage web nodes in the pool
9. Monitoring in pool
0. Exit
Enter selection:

Источник

После обновления сервера выдает сообщение что не сконфигурирован серверный пул.

Доброго времени суток.

Сегодня запустил обновление виртуальной машины (в меню пункт 19). Все сработало и при следующем входе система предложила обновиться до версии 5.0. что и было запущено. Так же все вроде без проблем.
Сейчас при входе программа начала выдавать следующее сообщение:

Цитата
login as: root
root@**********.net’s password:
Last login: Wed Jun 11 14:35:50 2014 from ****************************.net
Bitrix virtual appliance version 5.0.37
Pool Configuration manager on this host
Not found configured server’s pool! May be You want to add new.
Found network interfaces on the server:
————————————————————————————
Int | Link | Speed | MAC | IPAddress
————————————————————————————
gre0 | no | | |
gretap0 | no | | 00:00:00:00:00:00 |
venet0 | | | |
————————————————————————————
Available actions:
0. Exit
Enter selection:

Алексей Титов, не знаю, решили или нет, но на всякий случай отпишу.
Была та же проблема, вылезала эта страница с одним вариантом «0. Exit»

Сегодня «выбрал» пункт 1 (хоть его и не было в меню) – появилась знакомая менюшка, продолжил работу дальше 🙂

Действительно. нажал 1 и сформировался пул и появилась менюшка.

Available actions:
0. Exit
Enter selection: 1
Created sshkey — /etc/ansible/.ssh/***********.bxkey
CREATE_POOL complete: Press ENTER for exit:
Bitrix virtual appliance version 5.0.37
Pool Configuration manager on this host
Found next servers in the pool:
————————————————————————————
ServerName | NetAddress | Conn | Ver | Passwords | Uid | Roles
————————————————————————————
vm********** | 127.0.0.1 | Y | 5.0-37 | ok | 501 | mgmt,mysql_master_1,web
————————————————————————————
Available actions:
1. Manage Hosts in the pool
2. Manage localhost
3. Configure MySQL servers
4. Configure memcahed servers
5. Background tasks in the pool
6. Manage sites in the pool
7. Manage sphinx in the pool
8. Manage web nodes in the pool
9. Monitoring in pool
0. Exit
Enter selection:

Источник

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account


Open

IshanCSE opened this issue

Feb 2, 2017

· 17 comments

Assignees

@sandfox

Comments

@IshanCSE

Hi Team,
I have upgraded generic-pool library from 2.x to 3.x.
I have created a pool using

genericPool.createPool({ 
create: function(){
          return new promise(function(resolve,reject){
           // create client 
          resolve(client);
});
},
destroy: function(client){
         return new Promise(function(resolve){
           client.on('end', function(){
            resolve()
          })
          client.end()
});
},{configParams});

idleTimeoutMillis timeout is set to 30ms. genericpool is not creating new resourse after 30ms.

@sandfox

Hi there,
I think this is problem of the docs not being very clear! Unless evictionRunIntervalMillis is set to number greater than 0, neither softIdleTimeoutMillis nor idleTimeoutMillis have any effect.

evictionRunIntervalMillis sets how how often idle resources are checked and by default it’s zero, i.e. resources are never checked.

I should do something to make this more clear!

@IshanCSE

Thanks for your quick reply

@IshanCSE

Hi,
idleTimeout is working now. But there is a problem with the pool.drain().
case 1.
Lets say I am not releasing resource to pool and keep calling pool.acquire(). I have set acquireTimeoutMillis to 30s , thus After 30s pool.acquire will throw timeout error. After receiving timeout error, I am calling pool.drain()

pool.drain().then(function() {
console.log(‘pool drained :::::::::::’);
return pool.clear();
});
But, callback specified in then never called , «pool drained :::::::::::» has not printed. Am I missing something?

@sandfox

If you borrow a resource from the pool, but then never return it, the pool will not drain,
or to it put another way, pool.drain will wait for all outstanding resources to be returned before resolving.

Currently there isn’t concept of «abandoned resources» (I.e those which have been borrowed, then lost/forgotten about and not returned) so the pool can’t just ignore them. It’s vaguely on the roadmap to add but I’ve not given it any serious planning yet.

@IshanCSE

Problem with the node pool is when pool.acquire throws Timeout error, pool still contains resources and thus when I throw err node process doesnot exit. This scenario occurs only when pool is exhausted.

@sandfox

I think the behaviour you are talking about it is by design so you can decide you how you want your application to behave.
The pool throwing timeoutError may not be fatal for you code, you might just log out the error and keep the pool/app running, or you might want to close the app.
If you want the pool to close after a timeoutError you will need to manually call drain etc.

@IshanCSE

My issue is after getting timeoutError , Pool doesnot allow node process to terminate (in case All pool resources are acquired and never released).

@sandfox

If you want the process to exit without first returning all the borrowed resources to the pool, your only option is to just crash the process. There is no way to «force close» the pool, and even if there was it would probably just end up with the same result

@George0406

Hi, I’m confused about idleTimeoutMillis and evictionRunIntervalMillis, I had read the README.md but I still can’t distinguish it. Can anyone explain the difference…?

@sandfox

@George0406 sure:

idleTimeoutMillis specifies the threshold for deciding if an resource has been idle for too long. However, crossing this threshold does not directly cause the resource to be evicted/destroyed. The actual eviction/destruction process is handled separately by the evictor (lol), which runs periodically every evictionRunIntervalMillis.

Or to put it another way, the evictor runs every evictionRunIntervalMillis, and checks numTestsPerRun resources inside the pool that are waiting to be borrowed, and if a resource has been idle for longer than idleTimeoutMillis, destroys it.

@George0406

@sandfox Thanks for the quick reply

Sorry, I had typed wrong paramters in the previous question, I would like to ask what is the difference between idleTimeoutMillis and softIdleTimeoutMillis, and thanks for your reply again.

@sandfox

@George0406 no problem.

softIdleTimeoutMillis is pretty much like idleTimeoutMillis except it only applies to «excess» resources in the pool. If the pool has 10 resources in it which have been idle too long and a min size of 4, then only 6 of the resources will eligible to be destroyed.

Does that help?

@George0406

@sandfox , It’s clear to me now, and thanks for your clear explanation.

@jonnydungeons

@sandfox:
If my my pool configuration is set like so, would not explicitly setting the evict property cause ETIMEDOUT errors?

Here is my configuration:

pool: {
max: 10,
min: 1,
idle: 10000
}

etimedout

@zxc7922927

@sandfox
softIdleTimeoutMillis is pretty much like idleTimeoutMillis except it only applies to «excess» resources in the pool. If the pool has 10 resources in it which have been idle too long and a min size of 4, then only 6 of the resources will eligible to be destroyed.

=====================================
After I try both of then, it is seen like idleTimeoutMillis more like above description?
When I setting idleTimeoutMillis 10000, after 10 seconds those connection(max — min) will be kill,
but softIdleTimeoutMillis not. Can you check this? thanks!!

@sandfox

@zxc7922927 could supply some example code? Something to bear in mind is that the as soonas you set evictionRunIntervalMillis to any non-zero value, the default setting for idleTimeoutMillis (30 seconds) will take effect along with any value you supply for softIdleTimeoutMillis

@zxc7922927

@sandfox
here is my setting:
{
refreshIdle: false,
connection_min: 1,
connection_max: 50,
acquire_timeout: 5000,
idleTimeoutMillis: 10000
}
After using apachebench stress test, when I check process list, there has some sleep connections.
After 10 seconds, they has been destroyed but keep one connection in there.
But when I replace idleTimeoutMillis with softIdleTimeoutMillis, those connections just keep in there, won’t be destroyed.

Here is my code:

const { Sequelize } = require('sequelize');

const conn = new Sequelize('test', 'root', 'root', {
    host: '127.0.0.1',
    dialect: 'mysql'
});

conn.authenticate()
    .then(() => {
        console.log("Success!");
    })
    .catch ((msgError) => {
        console.log(msgError);
    })

conn.close();

When I try to run this code, I get this error message:

Error: pool is draining and cannot accept work
    at Pool.acquire (~/Projects/nodejs/node_modules/sequelize-pool/lib/Pool.js:189:35)
    at ConnectionManager.getConnection (~/Projects/nodejs/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:201:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ~/Projects/nodejs/node_modules/sequelize/lib/sequelize.js:303:26
    at async Sequelize.authenticate (~/Projects/nodejs/node_modules/sequelize/lib/sequelize.js:414:5)

I checked my database system, MySQL database is running well when I run this code on Node.js. For example, the code just below runs perfectly well:

const mysql = require('mysql');

const conn = mysql.createConnection({
    host: "127.0.0.1",
    user: "root",
    password: "root",
    database: "test"
});

conn.connect();

let command_mysql = "SELECT * FROM employees;";

conn.query(command_mysql, (error, results) => {
    if (error) throw error;
    for (result of results) {
        console.log(result);
    }
})

conn.end();

Information:

  • My operating system is MX Linux 21 (that is basically Debian 11).

  • Node version: v17.9.0

  • NPM version: 8.7.0

  • Sequelize version: 6.19.0 (I just downloaded it…)


EXTRA:

By the way, I had to define my host as '127.0.0.1' instead of 'localhost' because I was getting this error:

ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED ::1:3306
    at ConnectionManager.connect (~/Projects/nodejs/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:92:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ConnectionManager._connect (~/Projects/nodejs/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:216:24)
    at async ~/Projects/nodejs/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:174:32
    at async ConnectionManager.getConnection (~/Projects/nodejs/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:197:7)
    at async ~/Projects/nodejs/node_modules/sequelize/lib/sequelize.js:303:26
    at async Sequelize.authenticate (~/Projects/nodejs/node_modules/sequelize/lib/sequelize.js:414:5) {
  parent: Error: connect ECONNREFUSED ::1:3306
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '::1',
    port: 3306,
    fatal: true
  },
  original: Error: connect ECONNREFUSED ::1:3306
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1195:16) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '::1',
    port: 3306,
    fatal: true
  }
}
[nodemon] clean exit - waiting for changes before

Будет показан список интерфейсов, которые доступны для выбора:

Server network interfaces:
------------------------------------------------------------------------------------
       Int |       Link |        Speed |                  MAC | IPAddress
------------------------------------------------------------------------------------
  venet0:0 |        yes |  not_defined |                 void | 10.10.10.2
------------------------------------------------------------------------------------

Записываем название интерфейса которое соответствует IP сервера, в данном случае имени интерфейса соответствует venet0:0.

Создание пула

Чтобы на сервере можно было размещать сайты, необходимо создать пул. Пул – это группа серверов, которой можно управлять посредством ansible-сценариев. По сути пул – это все сервера в группе bitrix-hosts в ansible-инвентаре. В самом простом случае в пуле будет единственный сервер, на котором настроено Bitrix-окружение. По этой причине сначала настраиваем пул. Мастер создания пула откроет все необходимые порты в CentOS для корректной работы сервисов продуктов «1С-Битрикс»:

  • 22 ssh доступ;
  • 80 / 443 http / https web-сервер;
  • 8890 / 8891 http/https ntlm;
  • 8893 / 8894 http/https сервер мгновенных сообщений;
  • 5222 / 5223 http/https xmpp-сервер.

Если пул не создан, то открыты только 22, 80 и 443 порты.

Без создания пула вы не сможете осуществлять управление сайтами и серверами через меню

Нужно выбрать 1, для создания пула:

====================================================================
If you want to add this server to an existing pool,
use one of these IPv4 addresses on the master server.
Available actions:
1. Create management pool on the server (создайте пул управления на сервере)
2. Configure localhost settings (настройка параметров локального хоста)
0. Exit. (выход)
Enter your choice:
====================================================================

Указываем имя хоста, можно оставить имя по умолчанию, нажав Enter:

Please enter master server name (default: ofiejghpas)

Мы должны увидеть сообщение, что пул успешно создан, нажимаем Enter:

====================================================================
Pool has been created successfully. Please enter any key
====================================================================

Веб-окружение готова к работе:

====================================================================
Available actions:
1.  Manage servers in the pool (управление серверами в пуле)
2.  Configure localhost settings (настройка параметров локального хоста)
3.  Configure MySQL service for the pool (настройка MySQL службы для пула)
4.  Configure Memcached service for the pool (настройка Memcached службы для пула)
5.  Configure pool monitoring (настройка мониторинга пула)
6.  Configure pool sites (настройка пула сайтов)
7.  Configure Sphinx service for the pool (настройка службы Sphinx для пула)
8.  Manage pool web servers (управление веб-серверами пула)
9.  Configure Push/RTC service for the pool (настройка служб Push/RTC для пула)
10. Background pool tasks (фоновые задачи пула)
11. Configure Transformer service (настройка службы трансформатора)
0.  Exit. (выход)
Enter your choice:
====================================================================

Сейчас у нас создана одна дириктория для сайта /home/bitrix/www/, в которой лежит файл restore.php. На этом этапе если мы настроим DNS записи для домена, или просто перейдем по IP машины битрикс который был указан в интерфейсе, в нашем случае 10.10.10.2 мы попадем на установку Битрикс.

Понравилась статья? Поделить с друзьями:
  • There is already a crytek application running cannot start another one как исправить
  • There is a problem with this website s security certificate как исправить
  • There is a connection problem or an error on the server acronis
  • There is a battery error lenovo
  • There has been an error with your request перевод