Обсуждение: invalid value for parameter "client_encoding": "ISO_8859_8"

Поиск
Список
Период
Сортировка

invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
Hi,
My postgresql env consist of 3 nodes(9.6 version) and 2 pgpool`s that acts as a load balancer. I'm using postgresql as a database for the next apps : bitbucket,jira and crowd. However, I'm getting alot of errors in the pgpool log about the client_encoding for every connection that comes from one of those application : 

invalid value for parameter "client_encoding": "ISO_8859_8"
Cannot change "client_encoding" now.

The client_encoding is set to default in the database.

Any idea what can I check ? I dont think that it is something of the application layer. The encoding of all those databases is UTF8 and the collate and ctype is en_US.UTF-8.

I want to get the idea if the error connected to the app level / pool level / database level ?

Thanks.


Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Tom Lane
Дата:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> My postgresql env consist of 3 nodes(9.6 version) and 2 pgpool`s that acts
> as a load balancer. I'm using postgresql as a database for the next apps :
> bitbucket,jira and crowd. However, I'm getting alot of errors in the pgpool
> log about the client_encoding for every connection that comes from one of
> those application :

> invalid value for parameter "client_encoding": "ISO_8859_8"
> Cannot change "client_encoding" now.

[ digs around ... ] The "Cannot change" bit seems to indicate that this
error is coming from check_client_encoding(), and it's failing because
it cannot change client_encoding for an existing session outside a
transaction.  The comment about it is:

     * ... This would only happen if someone tries to change
     * client_encoding in postgresql.conf and then SIGHUP existing sessions.
     * It seems like a bad idea for client_encoding to change that way anyhow,
     * so we don't go out of our way to support it.

I'm not very sure how you'd get into a state where this was affecting
new sessions as well as pre-existing ones, or why it would affect only
some sessions.  Maybe the latter could be explained if all but this one
app explicitly set client_encoding for themselves.

Anyway, I think it's impossible for the client app to trigger this
by itself.  There must be some server-side source of this value,
if not postgresql.conf then maybe ALTER DATABASE/ROLE SET?

            regards, tom lane


Re: [pgpool-general: 6154] invalid value for parameter"client_encoding": "ISO_8859_8"

От
Tatsuo Ishii
Дата:
> Hi,
> My postgresql env consist of 3 nodes(9.6 version) and 2 pgpool`s that acts
> as a load balancer. I'm using postgresql as a database for the next apps :
> bitbucket,jira and crowd. However, I'm getting alot of errors in the pgpool
> log about the client_encoding for every connection that comes from one of
> those application :
> 
> invalid value for parameter "client_encoding": "ISO_8859_8"
> Cannot change "client_encoding" now.
> 
> The client_encoding is set to default in the database.
> 
> Any idea what can I check ? I dont think that it is something of the
> application layer. The encoding of all those databases is UTF8 and the
> collate and ctype is en_US.UTF-8.
> 
> I want to get the idea if the error connected to the app level / pool level
> / database level ?

It's database level. I suggest you try to connect your application
without Pgpool-II, and check to see if you still get the error message.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
It happens to all the sessions I have to all the databases. In other words, different apps are connected to different databases but I still keep getting those errors. I queried pg_shadow and I didnt see that a specific user has a different client_encoding configured. Moreover, the client_encoding is set to default in postgresql.conf.

What else can I check ? I'm trying to check the if the problem is in the pool as tatsuo suggested but is there anything else that I can check ?

2018-07-01 18:33 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> My postgresql env consist of 3 nodes(9.6 version) and 2 pgpool`s that acts
> as a load balancer. I'm using postgresql as a database for the next apps :
> bitbucket,jira and crowd. However, I'm getting alot of errors in the pgpool
> log about the client_encoding for every connection that comes from one of
> those application :

> invalid value for parameter "client_encoding": "ISO_8859_8"
> Cannot change "client_encoding" now.

[ digs around ... ] The "Cannot change" bit seems to indicate that this
error is coming from check_client_encoding(), and it's failing because
it cannot change client_encoding for an existing session outside a
transaction.  The comment about it is:

     * ... This would only happen if someone tries to change
     * client_encoding in postgresql.conf and then SIGHUP existing sessions.
     * It seems like a bad idea for client_encoding to change that way anyhow,
     * so we don't go out of our way to support it.

I'm not very sure how you'd get into a state where this was affecting
new sessions as well as pre-existing ones, or why it would affect only
some sessions.  Maybe the latter could be explained if all but this one
app explicitly set client_encoding for themselves.

Anyway, I think it's impossible for the client app to trigger this
by itself.  There must be some server-side source of this value,
if not postgresql.conf then maybe ALTER DATABASE/ROLE SET?

                        regards, tom lane

Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
I realized that it happens immediatly when I reload my cluster settings via pg_ctl reload. Immediatly raised the curremt message for every database in my cluster :
2018-07-11 17:17:56 IDTjiradbuserjiradbERROR:  invalid value for parameter "client_encoding": "ISO_8859_8"
2018-07-11 17:17:56 IDTjiradbuserjiradbDETAIL:  Cannot change "client_encoding" now.

What can I check in my postgresql.conf ?

2018-07-04 12:01 GMT+03:00 Mariel Cherkassky <mariel.cherkassky@gmail.com>:
It happens to all the sessions I have to all the databases. In other words, different apps are connected to different databases but I still keep getting those errors. I queried pg_shadow and I didnt see that a specific user has a different client_encoding configured. Moreover, the client_encoding is set to default in postgresql.conf.

What else can I check ? I'm trying to check the if the problem is in the pool as tatsuo suggested but is there anything else that I can check ?

2018-07-01 18:33 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> My postgresql env consist of 3 nodes(9.6 version) and 2 pgpool`s that acts
> as a load balancer. I'm using postgresql as a database for the next apps :
> bitbucket,jira and crowd. However, I'm getting alot of errors in the pgpool
> log about the client_encoding for every connection that comes from one of
> those application :

> invalid value for parameter "client_encoding": "ISO_8859_8"
> Cannot change "client_encoding" now.

[ digs around ... ] The "Cannot change" bit seems to indicate that this
error is coming from check_client_encoding(), and it's failing because
it cannot change client_encoding for an existing session outside a
transaction.  The comment about it is:

     * ... This would only happen if someone tries to change
     * client_encoding in postgresql.conf and then SIGHUP existing sessions.
     * It seems like a bad idea for client_encoding to change that way anyhow,
     * so we don't go out of our way to support it.

I'm not very sure how you'd get into a state where this was affecting
new sessions as well as pre-existing ones, or why it would affect only
some sessions.  Maybe the latter could be explained if all but this one
app explicitly set client_encoding for themselves.

Anyway, I think it's impossible for the client app to trigger this
by itself.  There must be some server-side source of this value,
if not postgresql.conf then maybe ALTER DATABASE/ROLE SET?

                        regards, tom lane

Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Tom Lane
Дата:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> I realized that it happens immediatly when I reload my cluster settings via
> pg_ctl reload. Immediatly raised the curremt message for every database in
> my cluster :
> 2018-07-11 17:17:56 IDTjiradbuserjiradbERROR:  invalid value for parameter
> "client_encoding": "ISO_8859_8"
> 2018-07-11 17:17:56 IDTjiradbuserjiradbDETAIL:  Cannot change
> "client_encoding" now.

That's exactly what I'd expect if the setting were coming from
postgresql.conf, so I think you need to look harder.  Are you sure
you are looking at the right copy of postgresql.conf (check "show
config_file" to be sure)?  Maybe it's in some file included by
postgresql.conf?  What about postgresql.auto.conf?

            regards, tom lane


Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
Yes indeed.
postgres=# show config_file;
             config_file              
--------------------------------------
 /PostgreSQL/9.6/data/postgresql.conf

and I opened this file.. What would you suggest to look in the conf file ? The only thing that i thought about is the next parameter : 
#client_encoding = ISO_8859_8

but its default..
So what next ?

2018-07-11 17:34 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> I realized that it happens immediatly when I reload my cluster settings via
> pg_ctl reload. Immediatly raised the curremt message for every database in
> my cluster :
> 2018-07-11 17:17:56 IDTjiradbuserjiradbERROR:  invalid value for parameter
> "client_encoding": "ISO_8859_8"
> 2018-07-11 17:17:56 IDTjiradbuserjiradbDETAIL:  Cannot change
> "client_encoding" now.

That's exactly what I'd expect if the setting were coming from
postgresql.conf, so I think you need to look harder.  Are you sure
you are looking at the right copy of postgresql.conf (check "show
config_file" to be sure)?  Maybe it's in some file included by
postgresql.conf?  What about postgresql.auto.conf?

                        regards, tom lane

Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Tom Lane
Дата:
Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:
> The only thing that i thought about is the next parameter :
> #client_encoding = ISO_8859_8
> but its default..

Maybe there's another occurrence elsewhere in the file?
Did you look for include lines?  Did you check postgresql.auto.conf?

            regards, tom lane


Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Tom Lane
Дата:
... btw, another possible aid is

select * from pg_file_settings where name = 'client_encoding';

https://www.postgresql.org/docs/current/static/view-pg-file-settings.html

            regards, tom lane


Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
postgres=# select * from pg_file_settings where name = 'client_encoding';
 sourcefile | sourceline | seqno | name | setting | applied | error 
------------+------------+-------+------+---------+---------+-------

nothing..

2018-07-11 17:46 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
... btw, another possible aid is

select * from pg_file_settings where name = 'client_encoding';

https://www.postgresql.org/docs/current/static/view-pg-file-settings.html

                        regards, tom lane

Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
Hi guys,
Any idea what else can I check ? it seems client_encoding isnt set or is default when I query pg_file_settings.

2018-07-11 17:49 GMT+03:00 Mariel Cherkassky <mariel.cherkassky@gmail.com>:
postgres=# select * from pg_file_settings where name = 'client_encoding';
 sourcefile | sourceline | seqno | name | setting | applied | error 
------------+------------+-------+------+---------+---------+-------

nothing..

2018-07-11 17:46 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
... btw, another possible aid is

select * from pg_file_settings where name = 'client_encoding';

https://www.postgresql.org/docs/current/static/view-pg-file-settings.html

                        regards, tom lane

Re: invalid value for parameter "client_encoding": "ISO_8859_8"

От
Mariel Cherkassky
Дата:
Hi all,
I dont know what else to check.It seems that every time I reload my settings I'm getting the next error for all connections to all my databases : 
2018-07-25 10:13:07 IDTLOG:  received SIGHUP, reloading configuration files
2018-07-25 10:13:08 IDTsonarusrsonarERROR:  invalid value for parameter "client_encoding": "ISO_8859_8"
2018-07-25 10:13:08 IDTsonarusrsonarDETAIL:  Cannot change "client_encoding" now.
2018-07-25 10:13:08 IDTbitbucketuserbitbucketERROR:  invalid value for parameter "client_encoding": "ISO_8859_8"
2018-07-25 10:13:08 IDTbitbucketuserbitbucketDETAIL:  Cannot change "client_encoding" now.
2018-07-25 10:13:08 IDTbitbucketuserbitbucketERROR:  invalid value for parameter "client_encoding": "ISO_8859_8"
2018-07-25 10:13:08 IDTbitbucketuserbitbucketDETAIL:  Cannot change "client_encoding" now.
2018-07-25 10:13:08 IDTbitbucketuserbitbucketERROR:  invalid value for parameter "client_encoding": "ISO_8859_8"
2018-07-25 10:13:08 IDTbitbucketuserbitbucketDETAIL:  Cannot change "client_encoding" now.

Any idea what can it be ?



2018-07-15 10:26 GMT+03:00 Mariel Cherkassky <mariel.cherkassky@gmail.com>:
Hi guys,
Any idea what else can I check ? it seems client_encoding isnt set or is default when I query pg_file_settings.

2018-07-11 17:49 GMT+03:00 Mariel Cherkassky <mariel.cherkassky@gmail.com>:
postgres=# select * from pg_file_settings where name = 'client_encoding';
 sourcefile | sourceline | seqno | name | setting | applied | error 
------------+------------+-------+------+---------+---------+-------

nothing..

2018-07-11 17:46 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
... btw, another possible aid is

select * from pg_file_settings where name = 'client_encoding';

https://www.postgresql.org/docs/current/static/view-pg-file-settings.html

                        regards, tom lane