Slony sync to 14 slaves, 13 slave works great, but 1 slave slow - slony

I setup Slony on my 15 machines, all slon --version is 2.2.2, I download source code and compile the slon and slonik by myself.
1 Master and 14 Slaves, the slaves are located at diff office and connection are all via internet
13 slaves works great, synced almost in no time.
1 slave behave wired, this wired slave can sync with Master but seems delay for hours
for example, one tabled named "accounts", all other slaves are synced, this wired slave is not until 30mins~3hours later.
I know there is a parameter slon -l lag interval, but I do not use the lag parameter
and iostate, htop, are seems normal.
I found below WARNING message and google this message but in vain, no helpful
05/09 15:37:03 ubuntu#slave:/var/log/postgresql$ sudo tail postgresql-9.1-main.log
2014-05-09 15:30:19 CST WARNING: pgstat wait timeout
2014-05-09 15:30:35 CST WARNING: pgstat wait timeout
2014-05-09 15:30:39 CST WARNING: pgstat wait timeout
2014-05-09 15:34:08 CST WARNING: pgstat wait timeout
2014-05-09 15:35:06 CST WARNING: pgstat wait timeout
2014-05-09 15:35:17 CST WARNING: pgstat wait timeout
2014-05-09 15:35:22 CST WARNING: pgstat wait timeout
2014-05-09 15:35:42 CST WARNING: pgstat wait timeout
2014-05-09 15:36:02 CST WARNING: pgstat wait timeout
2014-05-09 15:36:42 CST WARNING: pgstat wait timeout
Is there any thing I can check for this wired slave ?

Related

PostgresSQL: could not stat directory "base/<db_oid>": Unknown error

I am getting error in starting PostgreSQL server after a machine restart on windows server 2019.
This server has a multiple databases and in logs it is showing error for one of the database may be corrupted.
I tried restart server few times, but it it is getting shut down after some time. How can I make server up again with other databases running?
2022-04-20 07:32:49.843 PDT [3720] LOG: starting PostgreSQL 13.3, compiled by Visual C++ build 1914, 64-bit
2022-04-20 07:32:49.844 PDT [3720] LOG: listening on IPv6 address "::", port 5432
2022-04-20 07:32:49.844 PDT [3720] LOG: listening on IPv4 address "0.0.0.0", port 5432
2022-04-20 07:32:57.949 PDT [6600] LOG: database system was interrupted while in recovery at 2022-04-20 06:29:00 PDT
2022-04-20 07:32:57.949 PDT [6600] HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
2022-04-20 07:34:29.599 PDT [852] FATAL: the database system is starting up
2022-04-20 07:44:04.349 PDT [2480] FATAL: the database system is starting up
2022-04-20 07:52:28.107 PDT [4800] FATAL: the database system is starting up
2022-04-20 08:09:30.847 PDT [1872] FATAL: the database system is starting up
2022-04-20 08:21:41.884 PDT [6600] LOG: could not stat file "./base/22504705": Unknown error
2022-04-20 08:21:47.121 PDT [6600] LOG: database system was not properly shut down; automatic recovery in progress
2022-04-20 08:22:01.957 PDT [6600] LOG: redo starts at 22E/5419D678 2022-04-20 08:22:01.994 PDT [6600] FATAL: could not stat directory "base/22504705": Unknown error
2022-04-20 08:22:01.994 PDT [6600] CONTEXT: WAL redo at 22E/5422EDD8 for Heap/LOCK: off 3: xid 26378859: flags 0x00 LOCK_ONLY KEYSHR_LOCK
2022-04-20 08:22:02.000 PDT [3720] LOG: startup process (PID 6600) exited with exit code 1
2022-04-20 08:22:02.000 PDT [3720] LOG: aborting startup due to startup process failure
2022-04-20 08:22:02.085 PDT [3720] LOG: database system is shut down
logs

Problem running Elasticsearch for Magento project on Ubuntu

I'm trying set up Elasticsearch for Magento 2.4.2 project. I have installed Elasticsearch 7.9.3 and openjdk 11.0.10.
I got the error:
sudo systemctl start elasticsearch:
*Job for elasticsearch.service failed because the control process exited with error code.
See "systemctl status elasticsearch.service" and "journalctl -xe" for details.*
In the /etc/elasticsearch/elasticsearch.yml network settings are:
**network.host:** 127.0.0.1
**http.port:** 9200
journalctl -xe command result:
--
-- An ExecStart= process belonging to unit elasticsearch.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Mar 10 16:10:46 -ThinkPad-P15s-Gen-1 systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.
Mar 10 16:10:46 -ThinkPad-P15s-Gen-1 systemd[1]: Failed to start Elasticsearch.
-- Subject: A start job for unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit elasticsearch.service has finished with a failure.
--
-- The job identifier is 10277 and the job result is failed.
Mar 10 16:10:46 -ThinkPad-P15s-Gen-1 sudo[21081]: pam_unix(sudo:session): session closed for user root
Mar 10 16:15:06 -ThinkPad-P15s-Gen-1 sudo[21568]: : TTY=pts/0 ; PWD=/home/; USER=root ; COMMAND=/usr/bin/nano /etc/elasticsearch/>
Mar 10 16:15:06 -ThinkPad-P15s-Gen-1 sudo[21568]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 10 16:15:25 -ThinkPad-P15s-Gen-1 sudo[21568]: pam_unix(sudo:session): session closed for user root
Mar 10 16:15:52 -ThinkPad-P15s-Gen-1 wpa_supplicant[853]: wlp0s20f3: WPA: Group rekeying completed with ac:cf:85:db:37:ce [GTK=CCMP]
Looked through all the articles, but none of them helps to fix the situation. Сan someone suggest an idea for a solution to this problem ?
The error data you shared is just identifying the error as 'exited'. This brings me to the guess work to help you with the issue.
From the Elasticsearch.yaml configuration, the port on which the Elasticsearch exposes its API is on 9200. One possibility is that the port might be pre-occupied. Can you look at the port status on your system and confirm it.
Elasticsearch.service file has configurations for memory and CPU. May be the configured memory is not sufficient for it to start.
Hope this helps. For detailed and straight forward instructions on how to install the Magento 2.4.2 this blog written by me might help you.

Dante Socks5 proxy server doesn't start

I have installed Dante Proxy server by using following methods from the website. But the Server doesn't start and shows the following error. I have tried the steps from other websites also. I searched StackOverflow and saw the same issue in one question. but it has been solved yet. Anyone can solve it or suggest me any other alternative for SOCKS5 proxy server
Job for danted.service failed because the control process exited with error code. See "systemctl status danted.service" and "journalctl -xe" for details.
Error shown in systemctl status danted.service & journalctl -xe
steven#steven-VirtualBox:~$ systemctl status danted.service
● danted.service - LSB: SOCKS (v4 and v5) proxy daemon (danted)
Loaded: loaded (/etc/init.d/danted; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-03-10 18:12:42 IST; 2min 59s ago
Docs: man:systemd-sysv-generator(8)
Process: 3400 ExecStart=/etc/init.d/danted start (code=exited, status=1/FAILURE)
Mar 10 18:12:41 steven-VirtualBox systemd[1]: Starting LSB: SOCKS (v4 and v5) proxy daemon (danted)...
Mar 10 18:12:42 steven-VirtualBox danted[3405]: error: /etc/danted.conf: problem on line 11 near token "eth0": could not resolve hostname "eth0
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Control process exited, code=exited status=1
Mar 10 18:12:42 steven-VirtualBox danted[3400]: Starting Dante SOCKS daemon:
Mar 10 18:12:42 steven-VirtualBox systemd[1]: Failed to start LSB: SOCKS (v4 and v5) proxy daemon (danted).
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
steven#steven-VirtualBox:~$ journalctl -xe
-- The result is failed.
Mar 10 18:11:40 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:11:40 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
Mar 10 18:12:40 steven-VirtualBox sudo[3397]: steven : TTY=pts/18 ; PWD=/home/steven ; USER=root ; COMMAND=/bin/systemctl restart danted
Mar 10 18:12:41 steven-VirtualBox sudo[3397]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 10 18:12:41 steven-VirtualBox systemd[1]: Stopped LSB: SOCKS (v4 and v5) proxy daemon (danted).
-- Subject: Unit danted.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit danted.service has finished shutting down.
Mar 10 18:12:41 steven-VirtualBox systemd[1]: Starting LSB: SOCKS (v4 and v5) proxy daemon (danted)...
-- Subject: Unit danted.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit danted.service has begun starting up.
Mar 10 18:12:42 steven-VirtualBox danted[3405]: error: /etc/danted.conf: problem on line 11 near token "eth0": could not resolve hostname "eth0
Mar 10 18:12:42 steven-VirtualBox danted[3405]: alert: mother[1/1]: shutting down
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Control process exited, code=exited status=1
Mar 10 18:12:42 steven-VirtualBox danted[3400]: Starting Dante SOCKS daemon:
Mar 10 18:12:42 steven-VirtualBox sudo[3397]: pam_unix(sudo:session): session closed for user root
Mar 10 18:12:42 steven-VirtualBox systemd[1]: Failed to start LSB: SOCKS (v4 and v5) proxy daemon (danted).
-- Subject: Unit danted.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit danted.service has failed.
--
-- The result is failed.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Unit entered failed state.
Mar 10 18:12:42 steven-VirtualBox systemd[1]: danted.service: Failed with result 'exit-code'.
Mar 10 18:12:50 steven-VirtualBox sudo[3407]: steven : TTY=pts/18 ; PWD=/home/steven ; USER=root ; COMMAND=/bin/systemctl status danted
Mar 10 18:12:50 steven-VirtualBox sudo[3407]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 10 18:14:38 steven-VirtualBox sudo[3407]: pam_unix(sudo:session): session closed for user root
I had the same issue and came across your question. I fixed it by adding a systemd dependency of network-online.target to the danted.service, based on reading this https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Here's how:
sudo systemctl edit danted.service
add this:
[Unit]
After=network-online.target
Wants=network-online.target
save & exit, run this for good measure
sudo systemctl daemon-reload
sudo systemctl enable danted.service
This line is the telltale:
Mar 10 18:12:42 steven-VirtualBox danted[3405]: error: /etc/danted.conf: problem on line 11 near token "eth0": could not resolve hostname "eth0
It looks like there is no interface called eth0.
I had the same issue, found out what the actual interface is called using ifconfig and swapped out eth0 for that.
Find the interface of your device from Terminal with netstat -rn and look at the Iface column. Install netstat with sudo apt install net-tools if you don't have it. Change the settings of external: eth0 to external: xxxx where of course xxxx being your Iface value, in the file /etc/danted.conf.
If you're just starting out and there's not yet saved rules in danted.conf you can simply delete the file with sudo rm /etc/danted.conf and then create a new with sudo nano /etc/danted.conf. If using firewall it is mandatory that you open the port 1080 with sudo ufw allow 1080. In the new empty file danted.conf, paste in
logoutput: syslog
user.privileged: root
user.unprivileged: nobody
# The listening network interface or address.
internal: 0.0.0.0 port=1080
# The proxying network interface or address.
external: xxxx #Replace xxxx with the device's Iface
# socks-rules determine what is proxied through the external interface.
socksmethod: username
# client-rules determine who can connect to the internal interface.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
Save the file and run
sudo systemctl restart danted.service
sudo systemctl status danted.service

Why isn't "lsof" telling me the PID of the process that's running?

I’m on Mac Sierra. I’m trying to start my Tor instance, but evidently it is already running on my computer …
localhost:myproject davea$ tor --CookieAuthentication 0 --HashedControlPassword "" --ControlPort 9050 --SocksPort 50001
Nov 12 12:27:06.777 [notice] Tor v0.2.8.9 running on Darwin with Libevent 2.0.22-stable, OpenSSL 1.0.2j and Zlib 1.2.8.
Nov 12 12:27:06.778 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 12 12:27:06.778 [notice] Read configuration file "/opt/local/etc/tor/torrc".
Nov 12 12:27:06.782 [warn] Linelist option '__HashedControlSessionPassword' has no value. Skipping.
Nov 12 12:27:06.782 [warn] Option 'CookieAuthentication' used more than once; all but the last value will be ignored.
Nov 12 12:27:06.782 [warn] Linelist option '__HashedControlSessionPassword' has no value. Skipping.
Nov 12 12:27:06.782 [warn] ControlPort is open, but no authentication method has been configured. This means that any program on your computer can reconfigure your Tor. That's bad! You should upgrade your Tor controller as soon as possible.
Nov 12 12:27:06.783 [notice] Opening Socks listener on 127.0.0.1:50001
Nov 12 12:27:06.783 [notice] Opening Socks listener on 127.0.0.1:50001
Nov 12 12:27:06.783 [warn] Could not bind to 127.0.0.1:50001: Address already in use. Is Tor already running?
Nov 12 12:27:06.783 [notice] Opening Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [notice] Opening Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running?
Nov 12 12:27:06.783 [notice] Closing partially-constructed Socks listener on 127.0.0.1:50001
Nov 12 12:27:06.783 [notice] Closing partially-constructed Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Nov 12 12:27:06.783 [err] Reading config failed--see warnings above.
I tired to figure out what the PID is of the process running on the specified ports, but Mac tells me nothing …
localhost:myproject davea$
localhost:myproject davea$
localhost:myproject davea$ lsof -i :9050
localhost:myproject davea$
localhost:myproject davea$ lsof -i :50001
localhost:myproject davea$ netstat -anp tcp | grep 50001
localhost:myproject davea$ netstat -anp tcp | grep 9050
localhost:myproject davea$
localhost:myproject davea$
Any ideas how I can figure out what the PID is and kill it so I can start up Tor?
To find out which PID is using a particular port:
$ lsof -t -i :9050
The commands you've indicated are correct, so you might want to confirm whether or not lsof and netstat are actually working by doing a more generic command as a test, for example:
$ lsof -i
If that still doesn't return anything then you'll know the problem not isolated. Depending on your users permissions you might need to execute lsof or netstat with sudo:
$ sudo lsof -i -P
There's also the possibility neither returns anything because the port might not actually be open:
Nov 12 12:27:06.783 [notice] Opening Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [notice] Opening Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [warn] Could not bind to 127.0.0.1:9050: Address already in use. Is Tor already running?
Nov 12 12:27:06.783 [notice] Closing partially-constructed Socks listener on 127.0.0.1:50001
Nov 12 12:27:06.783 [notice] Closing partially-constructed Control listener on 127.0.0.1:9050
Nov 12 12:27:06.783 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Closing partially-constructed Control listener on 127.0.0.1:9050
Confirm whether or not a torprocess is actually running per the notice:
$ ps ax | grep tor

FreeSwitch Start Gives this Error: ==>freeswitch.service failed. See 'systemctl status freeswitch.service' and 'journalctl -xn' for details

When I try to start Freeswitch using bellow command :
/etc/init.d/freeswitch
It gives errors:-
[....] Starting freeswitch (via systemctl): freeswitch.serviceJob for
freeswitch.service failed. See 'systemctl status
freeswitch.service' and 'journalctl -xn' for details. failed!
Then I run this systemctl status freeswitch.service command that time it gives me this error:
● freeswitch.service - freeswitch Loaded: loaded
(/lib/systemd/system/freeswitch.service; enabled) Active: failed
(Result: start-limit) since Tue 2016-03-29 00:52:08 EDT; 8s ago
Process: 25997 ExecStart=/usr/bin/freeswitch -u freeswitch -g
freeswitch -ncwait $DAEMON_OPTS (code=exited, status=1/FAILURE)
Mar 29 00:52:07 systemd[1]: Failed to start freeswitch. Mar 29
00:52:07 systemd[1]: Unit freeswitch.service entered failed state.
Mar 29 00:52:08 systemd[1]: freeswitch.service start request repeated
too quickly, refusing to start. Mar 29 00:52:08 systemd[1]: Failed to
start freeswitch. Mar 29 00:52:08 media03 systemd[1]: Unit
freeswitch.service entered failed state.
Then I run journalctl -xn this command it gives me this error:
-- Logs begin at Tue 2016-03-22 15:12:38 EDT, end at Tue 2016-03-29 01:17:01 EDT. -- Mar 29 01:05:54 freeswitch[26066]: FreeSWITCH[26066]
Error starting system! pid:26067 Mar 29 01:05:54 systemd[1]:
freeswitch.service: control process exited, code=exited status=1 Mar
29 01:05:54 systemd[1]: Failed to start freeswitch.
-- Subject: Unit freeswitch.service has failed
-- Defined-By: systemd
-- Unit freeswitch.service has failed.
-- The result is failed. Mar 29 01:05:54 systemd[1]: Unit freeswitch.service entered failed state. Mar 29 01:17:01 CRON[26073]:
pam_unix(cron:session): session opened for user root by (uid=0) Mar 29
01:17:01 CRON[26074]: (root) CMD ( cd / && run-parts --report
/etc/cron.hourly) Mar 29 01:17:01 CRON[26073]:
pam_unix(cron:session): session closed for user root
Freeswitch.log
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'ul'
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'ulaw'
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'al'
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'alaw'
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'adpcm'
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1183 Deleting File Format 'vox'
2016-03-18 13:13:16.027486 [CONSOLE] switch_loadable_module.c:2008 Stopping: mod_sndfile
2016-03-18 13:13:16.027486 [DEBUG] switch_loadable_module.c:1330 Write lock interface 'en' to wait for existing references.
2016-03-18 13:13:16.027486 [NOTICE] switch_loadable_module.c:1338 Deleting Say interface 'en'
2016-03-18 13:13:16.027486 [CONSOLE] switch_loadable_module.c:2011 mod_say_en has no shutdown routine
This problem is related to your init script is not working properly.
so try below
/usr/local/freeswitch/bin/freeswitch
If still problem exist just try to killall freeswitch processes.
Then again start the freeswitch

Resources