"sockets disabled, connection limit reached" with lighttpd - webserver

I've been having a lot of those in my lighttpd's log files for the last few weeks:
2011-09-18 19:30:17: (server.c.1405) [note] sockets disabled, connection limit reached
2011-09-18 19:31:15: (server.c.1359) [note] sockets enabled again
2011-09-18 19:31:15: (server.c.1405) [note] sockets disabled, connection limit reached
2011-09-18 19:32:18: (server.c.1359) [note] sockets enabled again
2011-09-18 19:32:18: (server.c.1405) [note] sockets disabled, connection limit reached
2011-09-18 19:33:21: (server.c.1359) [note] sockets enabled again
2011-09-18 19:33:21: (server.c.1405) [note] sockets disabled, connection limit reached
Even if I have in my configuration file:
server.max-fds = 0
I don't have any idea what I can do with those errors, it's killing my website.
Any expert around here?

server.max-fds = 0
This only works if lighttpd is started as root.
are you running lighttpd as root ?

server.max-connections = NUMBER
If you use PHP, set server.max-fds to the double of server.max-connections.

Related

Can syslog pri value can be negative?

First i will tell you my architecture
client--->haproxy--->syslog-ng--->kafka
the client is Cisco ASA and haproxy is server for load-balancing and syslog-ng is for receiving ,filtering and sending logs to kafka(destination)
The client sends logs to haproxy and haproxy send logs to syslog-ng using tcp transport
As in tcp the client-server timeout breaks whenever client restored the connection its PRI value is negative which we seeing in wireshark.With this issue the messages gets mixup
Connection restored is normal but PRI value is negative this is incorrect.
I am showing you the the logs
<-1>May 24 2021 17:40:28: %ASA--1-6414004: TCP Syslog Server private:xx.xx.xx.xx/1470 -
Connection restored\\nCAL\\\\John Mike/xxxxxxxxxxxxxxxxxx) to private:xx.xx.xx.xx/xx duration 0:00:00 bytes 142
(John Mike/xxxxxxxxxxxxxxxxxx)\\nxxxxxxx)\\n4 2021 17:40:28: %ASA-6-302016: Teardown UDP connection 1733810491
we've increase the client connection timeout from 1min to 12 hr but the problem is not resolved
Some version of the Cisco ASA TCP Syslog code are affected by bug CSCvz85683:
Symptom:
Wrong syslog message format, ex for 414004:
-1>Sep 08 2021 10:46:25: %ASA--1-6414004: TCP Syslog Server private:xx.xx.xx.xx/1470 - Connection restored\n (xx.xx.xx.xx/64437)
Conditions:
External logging to TCP server is enabled
Workaround:
NA
Further Problem Description:
ASA syslog messages have 6-digit ID
The valid range for message IDs is between 100000 and 999999.
Source: Cisco ASA Series Syslog Messages. About ASA Syslog Messages.
When logging via TCP on versions with the defect code, will shift the priority (6 in this case) into the message code (414004 in this case) and use an illegal priority -1.
According to the bug, this has been fixed in version 9.14.4.

How to launch mysql persistent on openshift OKD?

I am unable to launch mysql deployment with persistent storage, the ephemeral one works fine. I am getting the following error.
I tried launching deployment from cli and web console as well. In both cases I get the following error.
=> sourcing http://20-validate-variables.sh ...
=> sourcing http://25-validate-replication-variables.sh ...
=> sourcing http://30-base-config.sh ...
---> 01:27:23 Processing basic MySQL configuration files ...
=> sourcing http://60-replication-config.sh ...
=> sourcing http://70-s2i-config.sh ...
---> 01:27:23 Processing additional arbitrary MySQL configuration provided by s2i ...
=> sourcing 10-mysql57.cnf ...
=> sourcing 40-paas.cnf ...
=> sourcing 50-my-tuning.cnf ...
---> 01:27:23 Initializing database ...
---> 01:27:24 Running /opt/rh/rh-mysql57/root/usr/libexec/mysqld --initialize --datadir=/var/lib/mysql/data --ignore-db-dir=lost+found
---> 01:27:24 Starting MySQL server with disabled networking ...
---> 01:27:24 Waiting for MySQL to start ...
2019-03-30T01:27:24.466755Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-03-30T01:27:24.584395Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld (mysqld 5.7.24) starting as process 40 ...
2019-03-30T01:27:24.774993Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-03-30T01:27:24.775057Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-30T01:27:24.775068Z 0 [Note] InnoDB: Uses event mutexes
2019-03-30T01:27:24.775075Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2019-03-30T01:27:24.775761Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2019-03-30T01:27:24.775809Z 0 [Note] InnoDB: Using Linux native AIO
2019-03-30T01:27:24.777416Z 0 [Note] InnoDB: Number of pools: 1
2019-03-30T01:27:24.778012Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2019-03-30T01:27:24.784562Z 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2019-03-30T01:27:24.841105Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-03-30T01:27:24.852695Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-30T01:27:25.019343Z 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html … for how to resolve the issue.
2019-03-30T01:27:25.019422Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
2019-03-30T01:27:25.019473Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
---> 01:27:25 Waiting for MySQL to start ...
2019-03-30T01:27:25.520693Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-03-30T01:27:25.520749Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-03-30T01:27:25.520763Z 0 [ERROR] Failed to initialize builtin plugins.
2019-03-30T01:27:25.520772Z 0 [ERROR] Aborting
2019-03-30T01:27:25.521120Z 0 [Note] Binlog end
2019-03-30T01:27:25.521862Z 0 [Note] Shutting down plugin 'CSV'
2019-03-30T01:27:25.530469Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld: Shutdown complete

Too many connections on zookeper server

Environment: HDP 2.6.4
Ambari – 2.6.1
3 zookeeper server
23.1.35.185 - is the IP of the first zookeeper server
hi all,
In the first zookeeper server it seems that even after closing the connection to zookeeper is not getting closed,
which causes the maximum number of client connections to be reached from a host - we have maxClientCnxns as 60 in zookeeper config
As a result when a new application comes and tries to create a connection it fails.
Example when Connections are:
echo stat | nc 23.1.35.185 2181
Latency min/avg/max: 0/71/399
Received: 3031 Sent: 2407
Connections: 67
Outstanding: 622
Zxid: 0x130000004d
Mode: follower
Node count: 3730
But after some time when connection comes to ~70 we see
echo stat | nc 23.1.35.185 2181
Ncat: Connection reset by peer.
And We can see also many CLOSE_WAIT
java 58936 zookeeper 60u IPv6 381963738 0t0 TCP Zookeper_server.sys54.com:eforward->zookeper_server.sys54.com:44983 (CLOSE_WAIT)
From the zookeeper log
2018-12-26 02:50:46,382 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory#193]
- Too many connections from /23.1.35.185 - max is 60
In the ambari we can see also
Connection failed: [Errno 104] Connection reset by peer to zookeper_server.sys54.com.:2181
I must to say that this not happening on zookeeper servers 2 and 3
NOTE - if we increase the maxClientCnxns to 300 , its not help because after some time we get more the 300 connections ( CLOSE_WAIT ) and then we see from the log
2018-12-26 02:50:49,375 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory#193] - Too many connections from /23.1.35.187 - max is 300
so any hint why the connection are CLOSE_WAIT ?
CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection.
The problem is your program running on the local machine is not closing the socket. It is not a TCP tuning issue. A connection can (and quite correctly) stay in CLOSE_WAIT forever while the program holds the connection open.
Once the local program closes the socket, the OS can send the FIN to the remote end which transitions you to LAST_ACK while you wait for the ACK of the FIN. Once that is received, the connection is finished and drops from the connection table (if your end is in CLOSE_WAIT you do not end up in the TIME_WAIT state).
There is a kernel level property to reuse the connection and reduce the CLOSE_WAIT time.
I suggest you to follow this tutorial http://www.linuxbrigade.com/reduce-time_wait-socket-connections/
This should probably solve your problem.

Sequel Pro - Socket connection failed

I use Sequel Pro and MAMP on my Mac to develop wordpress sites locally. This morning when I tried to start up Sequel Pro it kept asking for my password to make changes (it has never done this before). I first tried rebooting my machine but it kept asking so I entered my password to allow (unknown) changes to be made.
Big mistake!
Now when I try to connect via socket I get the error message
Socket connection failed!
Unable to connect via the socket, or the request timed out.
Double-check that the socket path is correct and that you have the necessary privileges, and that the server is running.
MySQL said: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
When I check MAMP the Apache Server light is red, and the MySQL server light is green.
I am a complete novice when it comes to back-end stuff like this, a lot of the answers I have browsed list console commands but I have never used the console before.
I have found a file that is reference in the error - "mysql.sock". This is located in Applications > MAMP > tmp > mysql > mysql.sock
But im not sure what to do with this file (if anything!).
I also found this error log:
130312 11:07:29 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
130312 11:07:29 [Warning] You have forced lower_case_table_names to 0 through a command-line option, even though your file system '/Applications/MAMP/db/mysql/' is case insensitive. This means > that you can corrupt a MyISAM table by accessing it with different cases. You should consider changing lower_case_table_names to 1 or 2
130312 11:07:29 [Warning] One can only use the --user switch if running as root
130312 11:07:29 [Note] Plugin 'FEDERATED' is disabled.
130312 11:07:29 [Note] Plugin 'ndbcluster' is disabled.
130312 11:07:29 InnoDB: Started; log sequence number 0 15469736
130312 11:07:30 [Note] Event Scheduler: Loaded 0 events
130312 11:07:30 [Note] /Applications/MAMP/Library/libexec/mysqld: ready for connections.
Version: '5.1.37' socket: '/Applications/MAMP/tmp/mysql/mysql.sock' port: 8889 Source distribution
130312 11:09:37 mysqld_safe A mysqld process already exists
I just dont know what to do with any of the info! Any help is greatly appreciated!
I have the same problem just go and on or start your MAMP and then connect
via socket in Sequel Pro it will work.

PostgreSQL error: could not receive data from client: An operation was attempted on something that is not a socket

PostgreSQL version 9.1.3. OS is Windows XP. Anti-virus is F-Secure. Six instances of postgres.exe are running.
Here's what's in the pg_log:
2012-04-08 14:58:23 PDT LOG: incomplete startup packet
2012-04-08 14:58:24 PDT LOG: database system is ready to accept connections
2012-04-08 14:58:24 PDT LOG: autovacuum launcher started
2012-04-08 14:58:25 PDT LOG: could not receive data from client: An operation was attempted on something that is not a socket.
2012-04-08 14:58:25 PDT LOG: incomplete startup packet
2012-04-08 14:58:27 PDT LOG: could not receive data from client: An operation was attempted on something that is not a socket.
I disabled F-Secure but it made no difference. Any idea why?
It is not unusual for antivirus products to cause problems even when stopped or disabled. They must sometimes be completely uninstalled to avoid having them get in the way of normal database operations. Another likely possibility is that there is a firewall which needs to be configured to allow the TCP server socket to be opened or the UDP socket used by the various PostgreSQL processes to communicate regarding statistics.