Ask Your Question
0

every nova command i receive this "'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)"

asked 2014-09-07 15:35:16 -0500

pabloli150 gravatar image

updated 2014-09-07 19:21:13 -0500

larsks gravatar image

I've been the whole weekend tring to avoid this error: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) everytime i execute nova --whatever

[pablo@localhost devstack]$ nova list 
ERROR (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
[pablo@localhost devstack]$ nova flavor-list
ERROR (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
[pablo@localhost devstack]$ nova image-list
ERROR (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
[pablo@localhost devstack]$ ./unstack.sh

i have installed devstack on ubuntu, fedora, centos, on virtual machine , directly on my laptop and in all i have the same problem...

It finish to install like this:

Horizon is now available at http://192.168.1.36/
Keystone is serving at http://192.168.1.36:5000/v2.0/
Examples on using novaclient command line is in exercise.sh
The default users are: admin and demo
The password: 1234
This is your host ip: 192.168.1.36
2014-09-07 19:56:45.407 | stack.sh completed in 3224 seconds.

and i can login into horizon , launch an instance, but from command line as i put at the begining in this post,i always get the same error.

I do a source from the cli to this

[pablo@localhost devstack]$ cat credrc.sh 
#!/bin/bash
export OS_AUTH_URL=http://192.168.1.36:5000/v2.0/
export OS_TENANT_NAME=”admin”
export OS_USERNAME=”admin”
export OS_PASSWORD=”1234”
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2014-12-07 10:45:34 -0500

dbaxps gravatar image

updated 2014-12-07 14:53:38 -0500

Your credrc.sh seems to have non printable characters.

Issue reproduced :-

Non ascii characters generated

[root@juno1 ~(keystone_kashyap)]# cat testUnicode
export OS_USERNAME=”kashyap”
export OS_TENANT_NAME=”os7tenant”
export OS_PASSWORD=”fedora”
export OS_AUTH_URL=http://192.168.1.127:5000/v2.0/
export OS_REGION_NAME=”RegionOne”
export PS1='[\u@\h \W(keystone_kashyap)]\$ '
[root@juno1 ~(keystone_kashyap)]# . ./testUnicode
[root@juno1 ~(keystone_kashyap)]# env | grep OS_
OS_REGION_NAME=”RegionOne”
OS_PASSWORD=”fedora”
OS_AUTH_URL=http://192.168.1.127:5000/v2.0/
OS_USERNAME=”kashyap”
OS_TENANT_NAME=”os7tenant”
[root@juno1 ~(keystone_kashyap)]# nova list
ERROR (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

Non ascii characters deleted

[root@juno1 ~(keystone_kashyap)]# vi  testUnicode
[root@juno1 ~(keystone_kashyap)]# cat testUnicode
export OS_USERNAME=kashyap
export OS_TENANT_NAME=os7tenant
export OS_PASSWORD=fedora
export OS_AUTH_URL=http://192.168.1.127:5000/v2.0/
export OS_REGION_NAME=RegionOne
export PS1='[\u@\h \W(keystone_kashyap)]\$ '
[root@juno1 ~(keystone_kashyap)]# . ./testUnicode
[root@juno1 ~(keystone_kashyap)]# env | grep OS_
OS_REGION_NAME=RegionOne
OS_PASSWORD=fedora
OS_AUTH_URL=http://192.168.1.127:5000/v2.0/
OS_USERNAME=kashyap
OS_TENANT_NAME=os7tenant
[root@juno1 ~(keystone_kashyap)]# nova list
+--------------------------------------+---------------+-----------+------------+-------------+------------------------------------------+
| ID                                   | Name          | Status    | Task State | Power State | Networks                                 |
+--------------------------------------+---------------+-----------+------------+-------------+------------------------------------------+
| 95a8c989-2d15-4889-994e-cf88a3a8a836 | UbuntuRSX0512 | SUSPENDED | -          | Shutdown    | kashyap_private=40.0.0.16, 192.168.1.155 |
+--------------------------------------+---------------+-----------+------------+-------------+------------------------------------------+
edit flag offensive delete link more
0

answered 2014-11-09 08:11:44 -0500

Though the question is somewhat old: This points to non-printable characters in the endpoint strings for nova. You can see them by looking into the database, for example:

mysql -u root -p
<enter password>
> use keystone;
> select * from endpoint;
> exit

To solve the problem, delete the endpoints in question and recreate them.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-07 15:35:16 -0500

Seen: 3,152 times

Last updated: Dec 07 '14