Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBKQs-0006aP-9O for pgsql-general@arkaria.postgresql.org; Tue, 02 Apr 2019 14:30:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBKQr-0003HV-0C for pgsql-general@arkaria.postgresql.org; Tue, 02 Apr 2019 14:30:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBKQp-0003Er-JD for pgsql-general@lists.postgresql.org; Tue, 02 Apr 2019 14:30:32 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hBKQm-0004Dk-L8 for pgsql-general@lists.postgresql.org; Tue, 02 Apr 2019 14:30:30 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 02AE9223A3; Tue, 2 Apr 2019 10:30:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 02 Apr 2019 10:30:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=H Pf3khJUvzCHjV7LBh7nB9lPtcLpL08nStybt9z4MkQ=; b=tlO6+NeoHQ/JZbCxd qoc1SsqQKHYfov+jiTLjFcnUblbQ3a4r5poIBzcGs3GUD4b0FZEZeA68Ed6/vIGf MrNJTVR7QEfCmaPBVUonILlLKlKNC6wG46c0T3xsY66kOyb+HIeVeVnsPqbEqXRV 5oRVFWHVASGMbkYYZPwbjQPoxPTJeSNBgmEPsTR/HkyAVLiYk3Rj7/h1BvqE/xA+ 7YJ65W0dJ2rQ3SrFGXAyzSTqDTzeuuQtZgxJJN2oMJqywOxiFqkBZdvUWnEDnPka th596X25Ka1++x66gYZ1I5F6LQFXo95UM4WzoZQ2yU2yriFxtjoqdOggQ8B+e5do EHrYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=HPf3khJUvzCHjV7LBh7nB9lPtcLpL08nStybt9z4M kQ=; b=WK5iFfn7O9GLxJTnStL3u7Th7e7RkI3egzuKo/qSe3JZOzM3b8C0bCXdD kmjGsF265BXgTIbaAbYOfDUyv7fn62Y1ve2A1tUbbBup4aMJzbBLJyANFKpB+z73 iSZpOsiD20eyJxXUbHaS0iE2r6nlMuJKoaEBfFX19NcKrKFrvpEOKiPNzGMTTeLW eM+Oha0mfGfH1v4QsJs4L3vqZ4/eld1r9V00KyudY5joiovGRN/6PuA0MMOytoRg mayXATNWrZz0/pSDzSSpcSphS8PnX81y/r/btyYFNT2RSh3rqgLxSuNCd4icepXC QComxSeYAdLbpmIqcH8mQf21D9hnA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrtddtgdehjeculddtuddrgedutddrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfh fhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgv rhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrg hinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvdduvddrudehtddrvddt vdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklh grvhgvrhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id F130010393; Tue, 2 Apr 2019 10:30:25 -0400 (EDT) Subject: Re: Fwd: Postgresql with nextcloud in Windows Server To: =?UTF-8?B?6rmA7KSA7ZiV?= , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: Date: Tue, 2 Apr 2019 07:30:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/1/19 10:03 PM, 김준형 wrote: > > 보낸사람: *김준형* > > Date: 2019년 4월 2일 (화) 오후 2:02 > Subject: Re: Postgresql with nextcloud in Windows Server > To: Adrian Klaver > > > > Thanks for your reply and I hope this answers can help your questions > > 1) The nextcloud is running on PostgreSQL server. Cloud system needs > PostgreSQL server. Well I got that backwards. Forget that Nextcloud is an ownCloud fork. > > 2) Nextcloud system try to connect PostgreSQL server all time. > 2019-03-27 20:46:59.396 LOG:  connection received: host=xxx.xxx.xxx.xxx > port=xxxx > 2019-03-27 20:46:59.403 LOG:  connection authorized: user=user_name > database=db_name > 2019-03-27 20:46:59.463 LOG:  disconnection: session time: 0:00:00.067 > user=user_name database=db_name host=xxx.xxx.xxx.xxx port=xxxx > this connections repeat almost per 10sec. > Other clients well... use this PostgreSQL but not so much.(almost 30 > people use this PostgreSQL include nextcloud system users) There is nothing unusual about the above, just shows a client successfully connecting and then disconnecting. I set up an ownCloud server years ago as a test and as I remember it was constantly talking to the Postgres server. In postgresql.conf you could set log_statement = 'all' to see what is actually being done by the client(s). Just be aware this will generate a lot of logs so you probably want to do this for short period only. > > > 3) Yes. log files doesn't shows problems clearly. I just checked log > files and saw difference when server couldn't connected. > 2019-03-27 20:46:59.396 LOG:  connection received: host=xxx.xxx.xxx.xxx > port=xxxx > 2019-03-27 20:46:59.403 LOG:  connection authorized: user=user_name > database=db_name > this log repeated and no disconnection log. This shows a successful connection. The disconnection maybe much further in the future or has not happened at all. To see current connections select from pg_stat_activity: www.postgresql.org/docs/11/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW > > 4) After problem occur, if try to connect to windows server, windows > remote access shows time-out error. PostgreSQL server also too. What problem occurs? Where is the Windows server? > > 5) Before the server doesn't work normally, there is no problem to use > PostgreSQL (even nextcloud system, too.) > > 6) No, It doesn't work. PostgreSQL service status doesn't changed. Not sure you know that if you cannot connect to the Windows server? > > 7) When I restart server, I check PostgreSQL data and I see some schema > data disappeared(only data). log files says 'db system was not properly > shut down' so 'automatic recover in progress' when PostgreSQL server > started after Windows Server get restarted. > I think this 'not properly shut down' causes windows server cold > booting.(I need to turn on the server quickly for some reason and my > server spends a lot of time to restart.) To me it looks like the OS is crashing and bringing the Postgres server down with it. There is a chance it is the other way around. To figure this out I would suggest looking at what is the below just before/at time of crash/after restart: 1) The Windows system logs 2) The Postgres log > > 2019년 4월 2일 (화) 오후 1:21, Adrian Klaver >님이 작성: > > On 4/1/19 6:21 PM, 김준형 wrote: > > Hi Community, I have problem so I wanna help from PostgreSQL > community. > > My problem is using PostgreSQL with nextcloud(cloud system) and > It can > > make no more connection to server. I checked log files and knew > reason. > > PostgreSQL prevented to disconnecting connection but still tried to > > connect PostgreSQL server. This problem blocks to connect server and > > can't stop PostgreSQL service. What I can do is just restart the > server > > and recover PostgreSQL data(I don't know why some data disappear.). > > Can I get some help about this problem? > > Not sure I entirely understand the above, so to help can you answer the > following: > > 1) The Postgres server is running on nextcloud, correct? > > 2) The client you are using to connect to the server is on nextcloud > also or somewhere else? > > 3) The log files do not show a problem, is this correct? > > 4) Do you see an error message on the client end when you try to > connect? > > 5) Have you looked at your pg_hba.conf to see if allows connections > from > your client? > > 6) Not sure what you mean when you say you cannot stop the service, but > that you can restart it? > > 7) How do you know that data has disappeared? > > > > > My OS and PostgreSQL version is > > PostgreSQL 10.5 > > Windows Server 2012 R2 > > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com