<div dir="ltr">Hi Ishii,<div>I didn&#39;t share the output earlier, where there is some other pg_hba entry available to fallback. It does fallback in that case. Please see psql output and log snippet below.</div><div><br></div><div>[umarhayat@localhost pgpool2]# psql -U &quot;postgres/myrealm.example@MYREALM.EXAMPLE&quot; -h myrealm.example postgres -p 9999<br>psql (13.0)<br>Type &quot;help&quot; for help.<br></div><div><br></div><div>2020-10-01 07:33:06: pid 21199: DETAIL:  Protocol Major: 1234 Minor: 5680 database:  user: <br>2020-10-01 07:33:06: pid 21199: DEBUG:  selecting backend connection<br>2020-10-01 07:33:06: pid 21199: DETAIL:  GSSAPI request from client<br>2020-10-01 07:33:06: pid 21199: DEBUG:  reading startup packet<br>2020-10-01 07:33:06: pid 21199: DETAIL:  Protocol Major: 1234 Minor: 5679 database:  � 0 user:  � 0<br>2020-10-01 07:33:06: pid 21199: DEBUG:  selecting backend connection<br>2020-10-01 07:33:06: pid 21199: DETAIL:  SSLRequest from client<br>2020-10-01 07:33:06: pid 21199: DEBUG:  reading startup packet<br>2020-10-01 07:33:06: pid 21199: DETAIL:  application_name: psql<br>2020-10-01 07:33:06: pid 21199: DEBUG:  reading startup packet<br>2020-10-01 07:33:06: pid 21199: DETAIL:  Protocol Major: 3 Minor: 0 database: postgres user: postgres/myrealm.example@MYREALM.EXAMPLE<br>2020-10-01 07:33:06: pid 21199: DEBUG:  creating new connection to backend<br>2020-10-01 07:33:06: pid 21199: DETAIL:  connecting 0 backend<br>2020-10-01 07:33:06: pid 21199: DEBUG:  authentication backend<br>2020-10-01 07:33:06: pid 21199: DETAIL:  auth kind:0<br></div><div><br></div><div>Regards</div><div>Umar Hayat</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 2, 2020 at 2:31 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Umar,<br>
<br>
I actually expected that psql connects to Pgpool-II without GSSAPI<br>
auth (i.e. fallback to non-GSSAPI auth). In my understanding the<br>
default behavior of psql does so because of gssencmode=prefer.  Can<br>
you please enable pgpool debug log by log_min_messages=debug1 and show<br>
the log?<br>
<br>
&gt; Thank you!<br>
&gt; <br>
&gt;&gt; Hi Ishii,<br>
&gt;&gt; <br>
&gt;&gt; I tested your patch and was not able to apply it, so I rebased it. I tested<br>
&gt;&gt; it on Pgpool 4.1 and it is working as expected.<br>
&gt;&gt; <br>
&gt;&gt; - GSSAPI Authentication direct to PG13<br>
&gt;&gt; [umarhayat@localhost pgpool2]# psql -U<br>
&gt;&gt; &quot;postgres/myrealm.example@MYREALM.EXAMPLE&quot; -h myrealm.example postgres -p<br>
&gt;&gt; 5432<br>
&gt;&gt; psql (13.0)<br>
&gt;&gt; GSSAPI-encrypted connection<br>
&gt;&gt; Type &quot;help&quot; for help.<br>
&gt;&gt; <br>
&gt;&gt; - GSSAPI Authentication via Pgpool direct to PG13 (before patch)<br>
&gt;&gt; postgres=# \q<br>
&gt;&gt; [umarhayat@localhost pgpool2]# psql -U<br>
&gt;&gt; &quot;postgres/myrealm.example@MYREALM.EXAMPLE&quot; -h myrealm.example postgres -p<br>
&gt;&gt; 9999<br>
&gt;&gt; psql: error: could not connect to server: server closed the connection<br>
&gt;&gt; unexpectedly<br>
&gt;&gt; This probably means the server terminated abnormally<br>
&gt;&gt; before or while processing the request.<br>
&gt;&gt; <br>
&gt;&gt; - GSSAPI Authentication via Pgpool direct to PG13 (after patch)<br>
&gt;&gt; [umarhayat@localhost pgpool2]# psql -U<br>
&gt;&gt; &quot;postgres/myrealm.example@MYREALM.EXAMPLE&quot; -h myrealm.example postgres -p<br>
&gt;&gt; 9999<br>
&gt;&gt; psql: error: could not connect to server: ERROR:  failed to authenticate<br>
&gt;&gt; with backend<br>
&gt;&gt; DETAIL:  unsupported auth kind received from backend: authkind:7<br>
&gt;&gt; <br>
&gt;&gt; Regards<br>
&gt;&gt; Umar Hayat<br>
&gt;&gt; <br>
&gt;&gt; On Wed, Sep 23, 2020 at 8:15 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt;&gt; <br>
&gt;&gt;&gt; As you might already know, Pgpool-II currently does not support<br>
&gt;&gt;&gt; GSSAPI.  Until we support it, I think we need to tell frontend that<br>
&gt;&gt;&gt; Pgpool-II does not support GSSAPI when frontend requests it. Otherwise<br>
&gt;&gt;&gt; frontend will have a confusing message from Pgpool-II.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; <a href="https://www.pgpool.net/pipermail/pgpool-general/2020-September/007353.html" rel="noreferrer" target="_blank">https://www.pgpool.net/pipermail/pgpool-general/2020-September/007353.html</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Attached patch should do it. I don&#39;t have GSSAPI enabled frontend and<br>
&gt;&gt;&gt; I cannot test it. I would appreciate if someone tests it out.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; pgpool-hackers mailing list<br>
&gt;&gt;&gt; <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
&gt;&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
&gt;&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; pgpool-hackers mailing list<br>
&gt; <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div>