Bootstrap Framework 3.3.6

Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more...

Wenn du Hilfe benötigst, stelle deine Frage hier.
Um die Entwickler etwas zu entlasten, können Nutzer anderen Nutzern auch helfen.
By Mulano77
Posts
#11063
Ich glaube so langsam nerv ich Euch wa :D

So da der 1te Bot ja ohne murren läuft, habe ich mal für diesen eine Identität erstellt mit Avatar.
Security auf 20 bei der Ident.
Server Security auf 8.
Problem der Bot connectet nicht zum Server.
Ich selbst bin nicht mit der Identität online. Auch versucht ohne das TS3 bei mir an war.

TS3MusicBot_server.log:
Code: Select all
2019-11-05 12:49:52START_MODTS3MusicBot "TS3MusicBot" starts now
2019-11-05 12:49:53START_INFO=============================================================
2019-11-05 12:49:53START_INFOTeamSpeak mode enabled
2019-11-05 12:49:53START_INFO=============================================================
2019-11-05 12:49:54START_INFOSuccessful connected to xxx.xxx.xxx.xxx!
2019-11-05 12:49:54START_INFOLogin as "serveradmin" successful!
2019-11-05 12:49:55START_INFOSuccessful selected virtual server on port 9987!
2019-11-05 12:49:55WELCOMEMESSAGE_MODENew connecting clients of selected server groups (id: 6,7,9,10) get the special welcome message
2019-11-05 12:49:55AWAY_MODEClients with away status will be moved to Channel "-● Gummizelle" (19) after 0 seconds
2019-11-05 12:49:55SERVERGROUPNOTIFY_MODEWatching for new connecting clients of selected server groups (id: 8), sending message to all online clients of server group ids: 6, 7, 9, 10
2019-11-05 12:49:55START_SUCCESSFULTS3MusicBot started and connected successful, write !botinfo in chat to get an answer!
2019-11-05 12:49:55START_INFOUsing imported identity: identities/TS3MusicBot_cbb2a4367f4b608ee0092e30ebd2b75f68de1829/identity.txt
2019-11-05 12:51:01START_ERROR[31mCould not connect to teamspeak server xxx.xxx.xxx.xxx:9987.[0m
2019-11-05 12:51:06START_INFOUsing imported identity: identities/TS3MusicBot_cbb2a4367f4b608ee0092e30ebd2b75f68de1829/identity.txt
2019-11-05 12:52:02START_ERROR[31mCould not connect to teamspeak server xxx.xxx.xxx.xxx:9987.[0m
2019-11-05 12:52:07START_INFOUsing imported identity: identities/TS3MusicBot_cbb2a4367f4b608ee0092e30ebd2b75f68de1829/identity.txt
2019-11-05 12:53:13START_ERROR[31mCould not connect to teamspeak server xxx.xxx.xxx.xxx:9987.[0m
2019-11-05 12:53:18START_ERRORTS3 client could not connect after 3 tries. Retry in 60 seconds. [1.] Check if xxx.xxx.xxx.xxx:9987 is online.! [2.] The TS3MusicBot has not got banned by someone.
Der Client ist definitiv nicht gebannt. Über mein TS3 kann ich dem Server joinen.

Desweiteren ein Bug. Seitdem ich die Identität importiert habe, spinnt die Log-Sektion im Webinterface. Bei jedem neuen Loginversuch, kommt ein weiteres Logfenster von "TS3MusicBot client log" hinzu:
identy.jpg
identy.jpg (246.12 KiB) Viewed 5776 times
User avatar
By Crypto90
Posts Custom Custom Avatar
#11067
Ich vermute mal, dass du hier an das Shared Memory Limit des Servers stößt.
Wie viele Bots laufen denn aktuell?

Die Teamspeak Clients benötigen Shared Memory des Servers. Standardgemäß ist dies recht niedrig eingestellt (4-8mb), wenn man an das Limit stößt, starten die Clients nicht mehr richtig und der Log sieht dann so aus wie bei dir, hört mitten drin ohne ersichtlichen Fehler auf.

Um das Shared Memory Limit hochzusetzen, nutze folgenden Befehl auf deinem Server:
Code: Select all
echo "1073741824" > /proc/sys/kernel/shmmax;echo "1073741824" > /proc/sys/kernel/shmall;echo "65536" >/proc/sys/kernel/shmmni
Die Änderung ist sofort aktiv.
Achtung: nach einem Reboot ist die änderung wieder weg und muss erneut ausgeführt werden. Will man die Änderung permanent haben, muss man die Einträge in der /etc/sysctl.conf setzen.

Das kann ggf. auch die "kein Ton" Probleme auslösen bei dir.
User avatar
By Crypto90
Posts Custom Custom Avatar
#11068
Das mit den mehrfach Logs ist kein Bug, wir loggen jeden Client Start mit (zählen den Log hoch), solange die Bot Anwendung läuft. Beim Bot Neustart werden alle Client Logs gelöscht und man hat wieder einen Client log.

Unterm Strich bedeutet dass, dass dein Bot mehrfach versucht den Client zu starten, es aber nicht schafft.
Da dein Log mitten Drin ohne jeglichen Grund oder Fehler abbricht, gehe ich wie oben erwähnt von einem zu niedrig gesetzten Shared Memory Wert des Servers aus.

Setze das mal hoch, dann sollten deine Probleme ziemlich sicher verschwinden.
By Mulano77
Posts
#11069
Crypto90 wrote:Ich vermute mal, dass du hier an das Shared Memory Limit des Servers stößt.
Wie viele Bots laufen denn aktuell?
genau 3 laufen.
Crypto90 wrote:Die Teamspeak Clients benötigen Shared Memory des Servers. Standardgemäß ist dies recht niedrig eingestellt (4-8mb), wenn man an das Limit stößt, starten die Clients nicht mehr richtig und der Log sieht dann so aus wie bei dir, hört mitten drin ohne ersichtlichen Fehler auf.
Das würde einiges erklären. Standard ist er bei mir auf 6MB
Ich schau mal nach und melde mich später wieder. Muss bald zur Nachtschicht, also eventuell erst morgen^^


EDIT: hab mich vertan. Standardmäßig ist dev/shm auf 6 GB eingestellt vom Hoster
Code: Select all
root@xxx:~# free -m
              total        used        free      shared  buff/cache   available
Mem:           2262         892         544          16         825        1125
Swap:          6140           0        6140
root@xxx:~#
Code: Select all
root@xxx:~# cat /proc/meminfo
MemTotal:        2214288 kB
MemFree:          462008 kB
MemAvailable:    1055900 kB
Buffers:           37000 kB
Cached:           767324 kB
SwapCached:            0 kB
Active:          1024836 kB
Inactive:         583544 kB
Active(anon):     804316 kB
Inactive(anon):    16720 kB
Active(file):     220520 kB
Inactive(file):   566824 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       6288380 kB
SwapFree:        6288380 kB
Dirty:                68 kB
Writeback:             0 kB
AnonPages:        804132 kB
Mapped:           344224 kB
Shmem:             16924 kB
Slab:              84668 kB
SReclaimable:      39556 kB
SUnreclaim:        45112 kB
KernelStack:        6304 kB
PageTables:        12876 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     7395524 kB
Committed_AS:    2697120 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Percpu:             1200 kB
HardwareCorrupted:     0 kB
AnonHugePages:    286720 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:       89964 kB
DirectMap2M:     4104192 kB
DirectMap1G:     4194304 kB
root@xxx:~#
Code: Select all
root@xxx:~# top

top - 14:56:51 up 15 min,  1 user,  load average: 5,73, 6,33, 4,27
Tasks: 140 total,   4 running, 132 sleeping,   4 stopped,   0 zombie
%Cpu(s):  2,5 us,  5,5 sy,  0,0 ni, 45,8 id,  0,0 wa,  0,0 hi,  0,7 si, 45,6 st
MiB Mem :   2233,5 total,    421,4 free,    982,5 used,    829,6 buff/cache
MiB Swap:   6141,0 total,   6141,0 free,      0,0 used.   1006,7 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 3702 ts3musi+  20   0 1763240 129472  72836 S  30,9   5,7   2:24.09 ld-linux-+
 4222 ts3musi+  20   0 1763240 129304  72700 S  29,3   5,7   3:14.56 ld-linux-+
 2885 ts3musi+  20   0    3620   2252   1876 S  21,4   0,1   2:03.87 cde-exec
 3215 ts3musi+  20   0    3628   2248   1864 R  21,1   0,1   2:09.85 cde-exec
 6341 ts3musi+  20   0    3620   2420   2048 S  18,8   0,1   1:48.76 cde-exec
 6435 ts3musi+  20   0 1828776 129608  72644 S  15,5   5,7   1:32.20 ld-linux-+
  857 teamspe+  20   0 1072804  33368  13000 S  10,5   1,5   0:57.54 ts3server
 3361 ts3musi+  20   0  229436  39996  24608 t   6,2   1,7   0:35.12 ld-linux-+
 6355 ts3musi+  20   0  229412  40484  25220 R   5,9   1,8   0:33.43 ld-linux-+
 3001 ts3musi+  20   0  229412  41548  25020 R   4,6   1,8   0:35.19 ld-linux-+
 2811 ts3musi+  20   0  644104  30784  23956 S   1,6   1,3   0:11.43 ld-linux-+
   17 root      20   0       0      0      0 S   1,3   0,0   0:42.40 ksoftirqd+
 7602 ts3musi+  20   0  639888  38820  27908 S   1,3   1,7   0:04.82 ld-linux-+
  885 ts3musi+  20   0 3662228 173668  28944 S   1,0   7,6   2:34.37 java
 1001 ts3musi+  20   0 3657336 187508  28460 S   1,0   8,2   2:31.17 java
 6214 ts3musi+  20   0    2860   2060   1900 S   1,0   0,1   0:05.60 cde-exec
   10 root      20   0       0      0      0 I   0,7   0,0   0:10.41 rcu_sched
  494 root      20   0  398404  21320  10260 S   0,7   0,9   0:12.22 fail2ban-+
  828 ts3musi+  20   0 3661448 182392  28260 S   0,7   8,0   2:19.82 java
 6217 ts3musi+  20   0  643928  31664  24852 S   0,7   1,4   0:09.07 ld-linux-+
 7625 root      20   0   11324   3624   3052 R   0,7   0,2   0:00.62 top
    7 root      20   0       0      0      0 I   0,3   0,0   0:01.93 kworker/u+
   28 root      20   0       0      0      0 I   0,3   0,0   0:03.06 kworker/3+
 2788 ts3musi+  20   0    2860   1988   1824 S   0,3   0,1   0:04.60 cde-exec
    1 root      20   0   21972  10092   7828 S   0,0   0,4   0:14.68 systemd
    2 root      20   0       0      0      0 S   0,0   0,0   0:00.22 kthreadd
    3 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 rcu_gp
    4 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 rcu_par_gp
    6 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 kworker/0+
    8 root       0 -20       0      0      0 I   0,0   0,0   0:00.00 mm_percpu+
    9 root      20   0       0      0      0 S   0,0   0,0   0:00.60 ksoftirqd+
   11 root      20   0       0      0      0 I   0,0   0,0   0:00.00 rcu_bh
   12 root      rt   0       0      0      0 S   0,0   0,0   0:00.28 migration+
   13 root      20   0       0      0      0 I   0,0   0,0   0:00.59 kworker/0+
   14 root      20   0       0      0      0 S   0,0   0,0   0:00.00 cpuhp/0
   15 root      20   0       0      0      0 S   0,0   0,0   0:00.00 cpuhp/1
   16 root      rt   0       0      0      0 S   0,0   0,0   0:00.25 migration+
   18 root      20   0       0      0      0 I   0,0   0,0   0:04.57 kworker/1+
...
User avatar
By philippe
Posts Custom Avatar
#11070
Nein diesen Wert hier meint Nico:
/proc/sys/kernel/shmmni

Mit cat kannst du den auslesen:
cat /proc/sys/kernel/shmmni

Im Standart ist der bei 4096 Bytes.

Stelle deswegen den Wert höher mit folgendem Befehl (Sofort, solange der Server Läuft):
echo "65536" > /proc/sys/kernel/shmmni

Um diesen Wert auch beim Nächsten Server Neustart zu setzen Editiere folgende Datei: /etc/sysctl.conf
Am ende der Datei folgendes hinzufügen:
kernel.shmmni=65536

Dann Abspeichern und dann sollte es funktionieren.

MfG
Philippe
By Mulano77
Posts
#11071
Meine aktuelle sysctl.conf beim hochfahren:
Code: Select all
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
kernel.shmall = 1073741824
kernel.shmmax = 1073741824

Die war schon so und ich habe nichts daran verändert. Wobei mir der Wert viel zu hoch vorkommt.
Code: Select all
root@xxx:~# ipcs -l

------ Messages Limits --------
max queues system wide = 32000
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

------ Shared Memory Limits --------
max number of segments = 65536
max seg size (kbytes) = 1048576
max total shared memory (kbytes) = 4294967296
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767

root@xxx:~#
By Mulano77
Posts
#11073
so habe mal meine sysctl.conf etwas angepasst und neu geladen.
Momentan laufen alle 3 Bots. Mal schauen ob das Morgen, wenn ich aus der Nachtschicht komme noch immer so ist.
Laggs haben sich verbessert, sind aber minimal noch da. da muss ich noch was dran schrauben
Code: Select all
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.disable_ipv6=1  
net.ipv6.conf.default.disable_ipv6=1  
net.ipv6.conf.lo.disable_ipv6=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
kernel.sem = 250 32000 100 128
kernel.shmall = 1073741824
kernel.shmmax = 2147483648
kernel.shmmni = 65536
vm.swappiness = 0
net.core.wmem_max=12582912
net.core.rmem_max=12582912
net.ipv4.tcp_rmem= 10240 87380 12582912
net.ipv4.tcp_wmem= 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000
By Mulano77
Posts
#11074
So kleines Update von meiner Seite aus: Alle Bots laufen noch. Der Fehler "Player instance freeze detected. Restarted. Restarting last playback: "../music/Fahrstuhl.mp3" 0" kommt aber noch immer sehr häufig. Welchen Player benutzt ihr um die Streams und Audiodateien abzuspielen? Vllt kann man da noch was dran schrauben? Microlaggs gibt es auch noch. Aber immerhin. die 3 Bots laufen^^
youtube

Schauen wir uns an.

Der Vollständigkeit halber antworte ich hierz[…]

If nothing from above solves your issue, I can con[…]

Web UI not responding to browser

I tried public IP, LAN IP, and letting it bind to […]

Swap-in out addons, use only what you really need!