Server closed the connection unexpectedly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Server closed the connection unexpectedly
# 1  
Old 11-03-2017
Server closed the connection unexpectedly

Hi,

I have a bash script which connects HP Vertica DB and executes few sql files in sequential manner. One sql file has commands related to one table(stage , base schema tables)and contains 7-8 commands such as creating temp table, inserting data into tables etc.
For few tables, which have high volume of data, I'm facing a weird issue.

For those tables, the sql file execution happens partially and returns the below error :

"server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. connection to server was lost "

However, in database there are no errorful transactions. Even the query(during which error was returned) completed normally in database side.


Also, the next sql file in the sequence is picked up for the execution normally.

If i execute the same sql file directly inside DB, no issue comes.

Anyone can help identifying the issue?

Thanks in advance
# 2  
Old 11-05-2017
Certainly not a script problem with the script.
Maybe there is a limit (e.g. max transfer size) exceeded in the DB server?
Check all its error logs.
Also there might be a bug (or a tunable limit) in the HP-UX.
# 3  
Old 11-06-2017
Some quick things to ponder
-execute script with same user id as interactive execution?
-shell used in script; may be different
-limits on batch script execution
# 4  
Old 11-07-2017
Quote:
Originally Posted by joeyg
Some quick things to ponder
-execute script with same user id as interactive execution?
-shell used in script; may be different
-limits on batch script execution
-When I execute in interactive db session, I dont get the error. The server from which shell script is invoked and the server where the vertica DB is installed are different.
- shell used is ksh; but I have single shell script for 60 tables for an application, which returns error for those tables which have huge data and takes lot of time to execute sql commands. Smaller tables don't get this error.
- no limits imposed in shell script
# 5  
Old 11-07-2017
Is this some kind of network time-out?

What is the physical distance between these servers?

What is the network infrastructure between them?
# 6  
Old 11-07-2017
Most likely there is a time-out on the DB server.
Like this:
https://my.vertica.com/docs/8.1.x/HT...hlight=timeout
# 7  
Old 02-05-2018
For the db user, max idle session timeout is set to unlimited.

I got the below points for fixing the issue(at linux server side).

Update the settings as below :
Code:
echo 600 > /proc/sys/net/ipv4/tcp_keepalive_time
echo 60 > /proc/sys/net/ipv4/tcp_keepalive_intvl 
echo 20 > /proc/sys/net/ipv4/tcp_keepalive_probes


I did the changes(didn't restart the linux server) but still getting the same error. Restart of server is required for above changes to be applied?

Last edited by Scott; 02-05-2018 at 05:19 AM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

2. UNIX for Advanced & Expert Users

fork: Resource temporarily unavailable , server unexpectedly unavailable network connection

Solaris 10 Server refuse to connect :wall: fork: Resource temporarily unavailable , server unexpectedly unavailable network connection , refuse error, disconnect message, fatal error type2, (protocol error type2) Issue has been resolved after taken few steps :b: First of all need to check... (1 Reply)
Discussion started by: taherahmed
1 Replies

3. AIX

ssh connection closed by ip

Hi i am trying to do ssh without password between 2 aix servers. before i generate the keys, i am able to do the ssh & it is asking for password & i am able to login. ======================== # ssh 172.29.150.77 root@172.29.150.77's password: ======================== but when i generate rsa... (1 Reply)
Discussion started by: makarand.bhatka
1 Replies

4. UNIX for Advanced & Expert Users

Problem with rsync - connection unexpectedly closed

Hi i am running a rsync between two remote servers but it errors. The rsync command is a follows rsync -aWv -e rsh --stats progress --delete --ignore-errors --exclude .DS_Store --exclude .HSancillary --exclude .HSxmap --exclude .HSResource /raid1/PRODUCTION/ ... (0 Replies)
Discussion started by: treds
0 Replies

5. UNIX for Advanced & Expert Users

Tomcat Connection closed

Hi how can do why a process closed a connection? # lsof -i tcp:8080 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME java 5851 tomcat 29u IPv6 73216185 TCP *:webcache (LISTEN) # telnet localhost 8080 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1).... (0 Replies)
Discussion started by: lain
0 Replies

6. HP-UX

ftp first connection closed

Hi, Have anyone seen this problem, there is one remote side where their ftp connection to our server will always fail with connection closed by remote host and the second connection will be working. is this an OS issue or network issue? Thanks Robert (4 Replies)
Discussion started by: robertngo
4 Replies

7. Solaris

Server unexpectedly closed network connection error in passwordless in ssh through

Hi , when i try to passwordless connection login in ssh through putty, i am getting the "Server unexpectedly closed network connection" error.i have already finished the public and private key settings for the particular user. thanks MaroV (1 Reply)
Discussion started by: vr_mari
1 Replies

8. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

9. UNIX for Advanced & Expert Users

SFTP Connection Closed

Hey when trying to connect to a server using a key I get sftp -o 'Port=22' -o'IdentityFile=/home/datatel/.ssh/id_dsa_xei' becker_xei@host Connecting to host... ANGEL SFTP ServerConnection closed by host Connection closed Any ideas? (1 Reply)
Discussion started by: ed.browne
1 Replies

10. Cybersecurity

"421 service not available, remote server has closed connection."?

"421 service not available, remote server has closed connection." I tried to do ftp to one of the unix server . ftp hostname password It get connects when i do any command it throws error ftp> ls "421 service not available, remote server has closed connection." (1 Reply)
Discussion started by: vishaldsh
1 Replies
Login or Register to Ask a Question