Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gwcli error: REST API failure, code: 500 #259

Open
c-stewa20 opened this issue Apr 21, 2022 · 0 comments
Open

gwcli error: REST API failure, code: 500 #259

c-stewa20 opened this issue Apr 21, 2022 · 0 comments

Comments

@c-stewa20
Copy link

c-stewa20 commented Apr 21, 2022

Fresh Centos 8 Stream (CentOS Stream release 8 & Linux 4.18.0-373.el8,c86_64)
ceph version 16.2.7
ceph-iscsi (3.5)
ceph-iscsi-config (2.7)

I installed the cluster with ansible-ceph, but did not install the iscsi gateway with it as I had nothing but issues with the install around the dependencies getting downloaded properly. So I manually did the install and fought with it for some time not realizing that you needed to have ipv6 enabled on the system to work. Also had to manually download different python3 packages and rename some of them to work, such as ConfigParser to configparser, but all of the services are running; tcmu-runner, rbd-target-api and rbd-target-gw

I'm just trying to get the iscsi gateway working. The issue is when launching I get the following error:

sudo gwcli -d
Adding ceph cluster 'ceph' to the UI
Fetching ceph osd information
Querying ceph for state information
REST API failure, code : 500
Unable to access the configuration object
Traceback (most recent call last):
File "/bin/gwcli", line 194, in
main()
File "/bin/gwcli", line 108, in main
"({})".format(settings.config.api_endpoint))
AttributeError: 'Settings' object has no attribute 'api_endpoint'

The cluster is up and running:

cluster:
id: 8b4527f9-89cb-4c89-89c6-e1d18a9d882a
health: HEALTH_OK

services:
mon: 3 daemons, quorum d100es00100,d100es00200,d100es00300 (age 4d)
mgr: d100es00200(active, since 13d), standbys: d100es00100, d100es00300
osd: 64 osds: 64 up (since 8d), 64 in (since 2w)

data:
pools: 7 pools, 169 pgs
objects: 89 objects, 6.3 MiB
usage: 641 GiB used, 466 TiB / 466 TiB avail
pgs: 169 active+clean

Just trying to add an iscsi gateway, here is my config:

[config]
cluster_name: ceph
api_secure: false
gateway_keyring = ceph.client.admin.keyring
api_user = admin
api_password = admin
api_port = 5000
trusted_ip_list = 192.168.59.18

/var/log/rbd-target-api/rbd-target-api.log
2022-04-20 20:28:05,390 DEBUG [common.py:141:_open_ioctx()] - (_open_ioctx) Opening connection to rbd pool
2022-04-20 20:28:05,394 DEBUG [common.py:148:_open_ioctx()] - (_open_ioctx) connection opened

/var/log/rbd-target-gw/rbd-target-gw.log
2022-04-20 19:36:25,333 [ INFO] - Integrated Prometheus exporter is enabled
2022-04-20 19:36:25,343 [ INFO] - * Running on http://[::]:9287/ (Press CTRL+C to quit)
2022-04-20 19:42:46,533 [ INFO] - Integrated Prometheus exporter is enabled
2022-04-20 19:42:46,540 [ INFO] - * Running on http://[::]:9287/ (Press CTRL+C to quit)
2022-04-20 20:28:05,268 [ INFO] - Integrated Prometheus exporter is enabled
2022-04-20 20:28:05,278 [ INFO] - * Running on http://[::]:9287/ (Press CTRL+C to quit)

I tried:
curl --insecure --user admin:admin -X GET http://localhost:5000/api/config
curl: (7) Failed to connect to localhost port 5000: Connection refused

in /var/log/messages:
journal[2230]: ::ffff:192.168.59.10 - - [21/Apr/2022 12:34:25] "GET /metrics HTTP/1.1" 404 -

Firewalld is disabled on the system

Interfaces:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 80:18:44:e0:57:14 brd ff:ff:ff:ff:ff:ff
inet 192.168.59.18/24 brd 192.168.59.255 scope global dynamic noprefixroute eno1
valid_lft 71516sec preferred_lft 71516sec
inet6 fe80::8218:44ff:fee0:5714/64 scope link noprefixroute
valid_lft forever preferred_lft forever

Not sure where to look to see what is going on or how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant