I am using vue-socketio (v3.0.5) to communicate with a flask server running flask-socketio (v4.3.1). My web client can connect, but does not stay connected for long. No messaging is exchanged beyond the initial handshake. I am running the flask-socketio in verbose mode, but it doesn't give me any explanation.
Is there a version compatibility issue?
I see the following on the server:
89fe4114573244c4833676bd03976119: Sending packet OPEN data {'sid': '89fe4114573244c4833676bd03976119', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
2020-12-16 18:05:24.175 | DEBUG | server:connect:241 - Client Connected: 89fe4114573244c4833676bd03976119
89fe4114573244c4833676bd03976119: Sending packet MESSAGE data 0
followed shortly by...
2020-12-16 18:06:24.200 | DEBUG | server:disconnect:246 - Client Disconnected: 89fe4114573244c4833676bd03976119
2020-12-16 18:06:24.200 | DEBUG | server:onDisconnect:78 - '89fe4114573244c4833676bd03976119'
2020-12-16 18:06:24.200 | DEBUG | server:onDisconnect:83 - '89fe4114573244c4833676bd03976119'
89fe4114573244c4833676bd03976119: Client is gone, closing socket
Related
I have problems using MariaDB within a Docker Swarm using an nfs share. The database suddenly stops accepting new connections after fdatasync() failed. This happens randomly. Aftera few hours or after a few days. If I remove the service and start it again, everything ist running fine. The service seems not to repair itself. But I think this error should not even occur, even if the service should heal itself. I run the database as a persistence layer for the nextcloud app.
This is my docker-compose file:
version: '3.3'
services:
nextcloud_db:
image: mariadb:10.7.4
#container_name: nextcloud-db
command:
- "--transaction-isolation=READ-COMMITTED"
- "--log-bin=ROW"
- "--innodb_read_only_compressed=OFF"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
#- "--innodb-rollback-on-timeout=ON" # Tested this but did not help
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
labels:
- traefik.enable=false
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=myrootpassword
- MYSQL_PASSWORD=mymysqlpassword
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_INITDB_SKIP_TZINFO=1
networks:
- nextcloud
### other services for running nextcloud ###
volumes:
db:
driver_opts:
type: "nfs"
o: "addr=<storage-server-ip>,nolock,soft,rw"
device: ":/mnt/storage/nextcloud/db"
networks:
traefik-public:
external: true
nextcloud:
driver: overlay
# driver_opts:
# encrypted: "true"
These are the logs from the moment the db died:
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 19:51:17 4671 [ERROR] [FATAL] InnoDB: fdatasync() returned 5
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 220629 19:51:17 [ERROR] mysqld got signal 6 ;
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | This could be because you hit a bug. It is also possible that this binary
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | or one of the libraries it was linked against is corrupt, improperly built,
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | or misconfigured. This error can also be caused by malfunctioning hardware.
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 |
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | To report this bug, see https://mariadb.com/kb/en/reporting-bugs
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 |
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | We will try our best to scrape up some info that will hopefully help
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | diagnose the problem, but since we have already crashed,
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | something is definitely wrong and this may fail.
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 |
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | Server version: 10.7.4-MariaDB-1:10.7.4+maria~focal-log
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | key_buffer_size=134217728
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | read_buffer_size=131072
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | max_used_connections=10
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | max_threads=153
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | thread_count=11
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | It is possible that mysqld could use up to
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467995 K bytes of memory
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | Hope that's ok; if not, decrease some variables in the equation.
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 |
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | Thread pointer: 0x55d81db99108
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | Attempting backtrace. You can use the following information to find out
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | where mysqld died. If you see no messages after this, something went
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | terribly wrong...
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | stack_bottom = 0x7fcf10137d98 thread_stack 0x49000
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | mariadbd(my_print_stacktrace+0x32)[0x55d81b24de52]
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | mariadbd(handle_fatal_signal+0x485)[0x55d81ad282b5]
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 21:49:49 4673 [Warning] Aborted connection 4673 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 21:49:49 4672 [Warning] Aborted connection 4672 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 21:49:49 4674 [Warning] Aborted connection 4674 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 22:16:02 4676 [Warning] Aborted connection 4676 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 22:18:13 4678 [Warning] Aborted connection 4678 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-06-29 22:24:46 4679 [Warning] Aborted connection 4679 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
nc_nextcloud_db.1.1mfx9xkwd1sd#v220210169548138574 | 2022-07-01 21:49:02 7148 [Warning] Aborted connection 7148 to db: 'nextcloud' user: 'nextcloud' host: '10.0.7.189' (Got an error reading communication packets)
I found no other logs related to the isse.
Anyone has a clue what's going on here?
Maybe the NFS share is unavailable for a few seconds and so the database has problems reading/writing? Is it possible to self-heal the mariadb service after this error occurs? There are no other problems as long as the database service is running. I can upload and delete files etc. So it is not a permissions issue on the nfs share.
Further MariaDB metrics:
https://jpst.it/2TX-F
Host system info:
Docker node VM with Ubuntu:
Ubuntu 20.04.4 LTS
2 vCPUs
8 GB RAM
160 GB SSD System-Storage (Raid 10)
MySQL does not support mounting NFS to initialize data
I'm running CentOS v7.9 with MariaDB v5.5.68. I'm trying to access the MariaDB databases from a Win10 machine using Visual Studio Code with SQLTools & MySQL/MariaDB extensions.
I have configured MariaDB for remote access per this link: Configuring MariaDB for Remote Client Access
[mysqld]
skip-networking=0
skip-bind-address
I created the users and added the privileges - tested by logging in locally with 'bob' and viewing permissions in mysql.user. (BTW, in case not readily apparent, the UID, host, and PWD aren't real.)
CREATE USER 'bob'#'1.2.3.%' IDENTIFIED BY 'myPWD';
GRANT ALL PRIVILEGES ON *.* TO 'bob'#'1.2.3.%' IDENTIFIED BY 'myPWD';
However, when I try to log in remotely (from another Linux box) using mysql -u userID -h hostIP -p, I get the error:
ERROR 2003 (HY000): Can't connect to MySQL server on '1.2.3.4' (110)
When I try to make the database connection using VS Code, SQLTools tells me I've connected, but it won't show any tables, I'm not able to make any queries, and I get this error: Request connection/GetChildrenForTreeItemRequest failed with message: Handshake inactivity timeout.
I have reviewed this SO page and others, but still can't get the connection to work.
UPDATED for clarity - provides mysql.user and netstat info:
MariaDB [(none)]> select user, host from mysql.user;
+------+-------------+
| user | host |
+------+-------------+
| bob | 10.0.2.15 | # Can't connect
| rob | 127.0.0.1 | # Logs in locally via command line
| root | 127.0.0.1 | # Logs in locally via command line
| bob | 192.168.0.% | # Can't connect
| root | 192.168.0.% | # Can't connect
| root | ::1 | # Logs in locally via command line
| rob | localhost | # Logs in locally via command line
| root | localhost | # Logs in locally via command line
+------+-------------+
8 rows in set (0.00 sec)
$ > netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 27 33813 -
Any help is much appreciated as I've been working this problem for 2+ days and have not made any headway.
NOTE : I've seen this question and error being posted on different forums and in here, but none of them worked for me, and they belong to earlier versions of openstack. So, I posted a new question.
I've been setting up OpenStack Train based on its installation documents, and after setting up services, I tried to create a selfservice network using the instructions here but in "Verify Operation" section, step number 3, I see all of the ports are down :
[root#dev-openstack-controller ~]# openstack port list
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| 628ec286-90aa-4cca-92da-f698fb44a4e6 | | fa:16:3e:a9:31:55 | ip_address='10.100.1.1', subnet_id='8d579a73-6951-445f-9905-51b9be2a6ff5' | DOWN |
| bb77b0d9-7ea8-47d3-b951-139a7616a4bd | | fa:16:3e:89:52:37 | ip_address='203.0.113.166', subnet_id='0666d21c-0fd9-4caf-b560-f7d11e50cd83' | DOWN |
| d2b684c9-eeee-47c4-ae12-dc97e19adf48 | | fa:16:3e:cc:b8:3d | ip_address='10.100.1.2', subnet_id='8d579a73-6951-445f-9905-51b9be2a6ff5' | DOWN |
| fb7aff87-d083-4ed2-bf82-2ab4393373c7 | | fa:16:3e:c8:a7:95 | ip_address='203.0.113.101', subnet_id='0666d21c-0fd9-4caf-b560-f7d11e50cd83' | DOWN |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
First, I don't know why I see 4 ports instead of 2, and second, when I check neutron logs, I get the following error, which says it fails to bind port :
2020-04-18 11:05:12.321 25009 INFO neutron.plugins.ml2.plugin [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Attempt 10 to bind port 628ec286-90aa-4cca-92da-f698fb44a4e6
2020-04-18 11:05:12.347 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Port 628ec286-90aa-4cca-92da-f698fb44a4e6 does not have an IP address assigned and there are no driver with 'connectivity' = 'l2'. The port cannot be bound.
2020-04-18 11:05:12.348 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Failed to bind port 628ec286-90aa-4cca-92da-f698fb44a4e6 on host dev-openstack-controller.ershandc.org for vnic_type normal using segments [{'network_id': 'ae2b1f57-d91a-4ecd-ad15-2cc4b51a376f', 'segmentation_id': 45, 'physical_network': None, 'id': 'c28112f0-4f07-4f23-9f89-c3e37e68054c', 'network_type': u'vxlan'}]
I also get the same error for flat networks as well :
2020-04-18 11:05:11.107 25009 INFO neutron.plugins.ml2.plugin [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Attempt 10 to bind port bb77b0d9-7ea8-47d3-b951-139a7616a4bd
2020-04-18 11:05:11.135 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Port bb77b0d9-7ea8-47d3-b951-139a7616a4bd does not have an IP address assigned and there are no driver with 'connectivity' = 'l2'. The port cannot be bound.
2020-04-18 11:05:11.136 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Failed to bind port bb77b0d9-7ea8-47d3-b951-139a7616a4bd on host dev-openstack-controller.ershandc.org for vnic_type normal using segments [{'network_id': '25c5e314-e851-4a9c-ac7a-8e7b3e426deb', 'segmentation_id': None, 'physical_network': u'provider', 'id': '6dccf301-422b-41b9-b719-2999200126c6', 'network_type': u'flat'}]
I have tried different connectivities on ml2 plugin. Most of the cases relate to the following line in ml2_plugin.conf :
[ml2_type_flat]
flat_networks = flat
vni_ranges = 1:1000
Based on the openstack documentation, it should be flat but I've tried * as well and it didn't work.
Can someone elaborate the problem for me? I'm installing on a CentOS 7 VM. Let me know if more information is needed.
This is a quite dated question, but nevertheless I encountered the same situation hence let me post this anyway.
As the log says "no driver with 'connectivity' = 'l2'", the problem was in ml2_conf.ini. In my case, whole driver definitions were in [DEFAULT] section. I moved them to the proper location [ml2], everything started working fine.
It's been a while since I tried OpenStack, and finally I know the answer to the problem, which might help some people:
For setting up neutron, you need to have your internal network being set up in promiscuous mode. I've been using VMWare for the setup and I did not have access to setup the VSwitch in this mode, also was not approved by our security auditor and there were other priorities to take care of, so I had to drop the project. But I found out that this post is getting attention and shogoK answer did not work for me, so with some research and getting a helping hand from some network expert, problem was identified. Hope this clue helps someone in the community.
I've configured on 2 servers(srv50/51),
one of them is Master and the second one is slave,
Here the configuration of my configuration file /etc/maxscale.cnf :
[Read-Only Service]
type=service
router=readconnroute
servers=server50, server51
user=YYYYYYYYYYYYY
passwd=XXXXXXXXXXXXXX
router_options=slave
[Write-Only Service]
type=service
router=readconnroute
servers=server50, server51
user=YYYYYYYYYYYYY
passwd=XXXXXXXXXXXXXX
router_options=master
[Read-Only Listener]
type=listener
service=Read-Only Service
protocol=MySQLClient
port=4008
[Write-Only Listener]
type=listener
service=Write-Only Service
protocol=MySQLClient
port=4009
As i understool the router_options look who is the master and send the writing query to the master
Maxscale (via maxadmin) seems to discover the 2 serveur and understand witch one is the Master :
MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server | Address | Port | Connections | Status
-------------------+-----------------+-------+-------------+--------------------
server51 | 192.168.0.51 | 3306 | 0 | Slave, Running
server50 | 192.168.0.50 | 3306 | 0 | Master, Running
-------------------+-----------------+-------+-------------+--------------------
But even if I connect in Mysql in local on my Maxscale Write-Only Listener port (4009), Listener are in Stopped mode, is it normal ?
MaxScale> list listeners
Listeners.
---------------------+--------------------+-----------------+-------+--------
Service Name | Protocol Module | Address | Port | State
---------------------+--------------------+-----------------+-------+--------
Read-Only Service | MySQLClient | * | 4008 | Stopped
Write-Only Service | MySQLClient | * | 4009 | Stopped
MaxAdmin Service | maxscaled | * | 6603 | Running
---------------------+--------------------+-----------------+-------+--------
I've try to create a database in srv51 (slave), and it was created only on srv51, not in srv50.
Is something wrong in my configuration ? It's strange because it's not my first cluster, and on other cluster all write go to the master (but listeners are Running). Do i don't understand well the meaning of "router_options=master" ? How to start listeners ? I prefere to keep the 51 in Write list to detect topology change
===== UPDATE =====
After watching Log file /var/log/maxscale/maxscale1.log
I found that my monitor user didn't have the correct password :
[MySQL Monitor]
type=monitor
module=mysqlmon
servers=server50, server51
user=MONITOR
passwd=MONITOR_PASS
monitor_interval=10000
I corrected password for user and restarted maxscale, Now everything is running :
MaxScale> list listeners
Listeners.
---------------------+--------------------+-----------------+-------+--------
Service Name | Protocol Module | Address | Port | State
---------------------+--------------------+-----------------+-------+--------
Read-Only Service | MySQLClient | * | 4008 | Running
Write-Only Service | MySQLClient | * | 4009 | Running
MaxAdmin Service | maxscaled | * | 6603 | Running
---------------------+--------------------+-----------------+-------+--------
But write query are still done on Slave and not on Master
Thanks to MariaDb support, I was trying to connect like this :
mysql -h localhost --port=4009 -u USER -p
But Maxscale & Mysql were installed in the same server, even if Mysql bind port 3306, when you specify 'localhost', the connection is done on Mysql port 3306 and not in Maxscale port 4009, the port is ignore !!
The solution is to connect like this :
mysql -h 127.0.0.1 --port=4009 -u USER -p
or like this :
mysql -h localhost --protocol=tcp --port=4009 -u USER -p
I've try both solution and they works.
The solution about the listener not Running is on update of the question.
If writes are done on the slaves, the simplest explanation would be that you're executing writes on the wrong port or your configuration is wrong. To diagnose these problems, enable the info log level by adding log_info=true under the [maxscale] section.
If enabling the info log and inspecting the log files does not provide any clues, I'd suggest opening a bug report on the Maxscale Jira.
We use sonatype nexus on Windows Server 2008 R2. To be able to access external repositories we use an corporate http proxy server. Therefore we entered in Nexus GUI->Server the values "proxy host", "proxy port", "username" and "password". After migration from Nexus 2.2 to 2.10.0-02 the nexus server is not able to access external repositories.
If now I go to Nexus GUI-> Repositories->Central->Browse Remote->Refresh the remote repository is not visible. The wrapper.log contains following log entries (original data was replaced by <proxyhost>:<proxyport> and <proxyuser>):
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl - <proxyhost>:<proxyport> proxy authentication setup for remote storage with username '<proxyuser>'
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl - http proxy setup with host '<proxyhost>'
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - remotePath=
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - Requesting: GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection request: [route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection leased: [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 0; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - Status code: 407
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80] can be kept alive for 30.0 seconds
| 2014-11-25 08:55:25 DEBUG [qtp949677682-69] - org.sonatype.nexus.apachehttpclient.Hc4ProviderImpl$ManagedClientConnectionManager - Connection released: [id: 25][route: {}->http://<proxyhost>:<proxyport>->http://repo1.maven.org:80][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 200]
| 2014-11-25 08:55:25 TRACE [qtp949677682-69] - org.sonatype.nexus.plugins.rrb.MavenRepositoryReader - <HEAD><TITLE>Proxy Authorization Required</TITLE></HEAD>
| <BODY BGCOLOR="white" FGCOLOR="black"><H1>Proxy Authorization Required</H1><HR>
| <FONT FACE="Helvetica,Arial"><B>
| Description: Authorization is required for access to this proxy</B></FONT>
| <HR>
| <!-- default "Proxy Authorization Required" response (407) -->
| </BODY>
Wireshark capture looks like this:
43 1.803445000 <nexus> <proxyhost> HTTP 278 GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1
51 1.814045000 <nexus> <proxyhost> HTTP 278 GET http://repo1.maven.org/maven2/?delimiter=/ HTTP/1.1
55 1.819731000 <proxyhost> <nexus> HTTP 1014 HTTP/1.1 407 Proxy Authorization Required (text/html)
all GET requests doesn't have any authentication headers.
Why Nexus does not repeat the GET request with credentials after HTTP 407?
Does anyone have similar issue?
It sounds like the proxy server might be configured to use NTLM authentication? Try entering the "NT LAN Manager Domain" in the proxy authentication also.