Score:0

Ubuntu 20.04 / 22.04 - Remote ssh or rsync killing all process from user

in flag

I got a weird strange odd behavior (there's not enough adjectives for that) on Ubuntu 20.04 LTS and Ubuntu 22.04 LTS.

This is a IBM Db2 test server. The server runs a Db2 service under db2inst1 user id (UID 1002). The server name is srv-db2-teste.

Everytime I run a scp or a rsync from a remote machine to srv-db2-teste server using the db2inst1 user id, after the successful copy of the files ALL services running under the user id (I say ALL SERVICES) are killed! No matter what process is running, all processes runing under db2inst1 user goes down.

Db2 is running on port 50000, but I have tested other ports and it still killing processes.

Example: into a remote machine, I execute this copy command:

dba@workstation1:~$ scp /db2/files/* db2inst1@srv-db2-teste:/db2/files/

I have tested with other user ids, and the behavior is the same: all process down, except for user root (did not understand why root is intact).

When into db2top (Db2 application) when it crashes after the remote scp, this is the error:

SQL1224N  The database manager is not able to accept new requests, has
terminated all requests in progress, or has terminated the specified request
because of an error or a forced interrupt.  SQLSTATE=55032


(semctl (*id,0,IPC_RMID, (union semun) x)): Invalid argument
db2inst1@srv-db2-teste:~$

The journal of the test server says:

Nov 14 11:09:21 srv-db2-teste sshd[5247]: Accepted password for db2inst1 from 192.168.172.10 port 33032 ssh2
Nov 14 11:09:21 srv-db2-teste sshd[5247]: pam_unix(sshd:session): session opened for user db2inst1(uid=1002) by (uid=0)
Nov 14 11:09:21 srv-db2-teste systemd[1]: Created slice User Slice of UID 1002.
Nov 14 11:09:21 srv-db2-teste systemd[1]: Starting User Runtime Directory /run/user/1002...
Nov 14 11:09:21 srv-db2-teste systemd-logind[1110]: New session 15 of user db2inst1.
Nov 14 11:09:21 srv-db2-teste systemd[1]: Finished User Runtime Directory /run/user/1002.
Nov 14 11:09:21 srv-db2-teste systemd[1]: Starting User Manager for UID 1002...
Nov 14 11:09:21 srv-db2-teste systemd[5254]: pam_unix(systemd-user:session): session opened for user db2inst1(uid=1002) by (uid=0)
Nov 14 11:09:21 srv-db2-teste ntpd[1141]: Soliciting pool server 137.184.81.69
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Queued start job for default target Main User Target.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Created slice User Application Slice.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Reached target Paths.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Reached target Timers.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Starting D-Bus User Message Bus Socket...
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on GnuPG network certificate management daemon.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on GnuPG cryptographic agent and passphrase cache.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on debconf communication socket.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on REST API socket for snapd user session agent.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Listening on D-Bus User Message Bus Socket.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Reached target Sockets.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Reached target Basic System.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Reached target Main User Target.
Nov 14 11:09:21 srv-db2-teste systemd[5254]: Startup finished in 87ms.
Nov 14 11:09:21 srv-db2-teste systemd[1]: Started User Manager for UID 1002.
Nov 14 11:09:21 srv-db2-teste systemd[1]: Started Session 15 of User db2inst1.
Nov 14 11:09:22 srv-db2-teste sshd[5333]: Received disconnect from 192.168.172.10 port 33032:11: disconnected by user
Nov 14 11:09:22 srv-db2-teste sshd[5333]: Disconnected from user db2inst1 192.168.172.10 port 33032
Nov 14 11:09:22 srv-db2-teste sshd[5247]: pam_unix(sshd:session): session closed for user db2inst1
Nov 14 11:09:22 srv-db2-teste systemd[1]: session-15.scope: Deactivated successfully.
Nov 14 11:09:22 srv-db2-teste systemd-logind[1110]: Session 15 logged out. Waiting for processes to exit.
Nov 14 11:09:22 srv-db2-teste systemd-logind[1110]: Removed session 15.
Nov 14 11:09:32 srv-db2-teste systemd[1]: Stopping User Manager for UID 1002...
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Stopped target Main User Target.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Stopped target Basic System.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Stopped target Paths.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Stopped target Sockets.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Stopped target Timers.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed D-Bus User Message Bus Socket.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed GnuPG network certificate management daemon.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed GnuPG cryptographic agent and passphrase cache.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed debconf communication socket.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Closed REST API socket for snapd user session agent.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Removed slice User Application Slice.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Reached target Shutdown.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Finished Exit the Session.
Nov 14 11:09:32 srv-db2-teste systemd[5254]: Reached target Exit the Session.
Nov 14 11:09:32 srv-db2-teste systemd[5255]: pam_unix(systemd-user:session): session closed for user db2inst1
Nov 14 11:09:32 srv-db2-teste systemd[1]: [email protected]: Deactivated successfully.
Nov 14 11:09:32 srv-db2-teste systemd[1]: Stopped User Manager for UID 1002.
Nov 14 11:09:32 srv-db2-teste systemd[1]: Stopping User Runtime Directory /run/user/1002...
Nov 14 11:09:32 srv-db2-teste systemd[1]: run-user-1002.mount: Deactivated successfully.
Nov 14 11:09:32 srv-db2-teste systemd[1]: [email protected]: Deactivated successfully.
Nov 14 11:09:32 srv-db2-teste systemd[1]: Stopped User Runtime Directory /run/user/1002.
Nov 14 11:09:32 srv-db2-teste systemd[1]: Removed slice User Slice of UID 1002.

I never saw something like this... any help is very much appreciated!

jp flag
Does this answer your question? [Does getting disconnected from an SSH session kill your programs?](https://serverfault.com/questions/463366/does-getting-disconnected-from-an-ssh-session-kill-your-programs)
jp flag
https://unix.stackexchange.com/questions/490267/prevent-logoff-from-killing-tmux-session
adamitj avatar
in flag
I appreciate but both links regards to local processes, not a remote-initiated like the copy of files I'm using. By any means a remote scp / rsync against a server should kill any other process for the same user in the target server. I still with no clue...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.