Project

General

Profile

pubsub rest api can not work.

flame fire
Added almost 2 years ago

1.init.properties

--comp-class-1 = tigase.muc.MUCComponent

--virt-hosts = localhost

--user-db-uri = jdbc:mysql://localhost/tigasedb?user=tigase&password=tigase12

--user-db = mysql

--admins = admin@localhost,http.localhost,pubsub.localhost,admin.localhost,http@localhost,rest@http.localhost,admin@http.localhost,http.localhost,rest.http.localhost,admin.http.localhost

--comp-name-6 = message-archive

--comp-name-5 = http

--comp-name-3 = proxy

config-type = --gen-config-def

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136

--comp-class-6 = tigase.archive.MessageArchiveComponent

--debug = server,xmpp.impl,db,pubsub,rest

--comp-class-5 = tigase.http.HttpMessageReceiver

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.PubSubComponent

http/rest/api-keys[s]=open_access

here is my init.properties.

my tigase is 7.1.0

I use "HTTP GET" to visit "http://localhost:8080/rest/pubsub/pubsub.localhost/create-node",the response is "".

Do you have any idea?pls help me,thx


Replies (2)

(1)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam almost 2 years ago

I think that this issue is caused by the fact that most likely you did not properly configure permissions for PubSub.

I see that you added a bunch of jids to admins list @http@localhost,rest@http.localhost,admin@http.localhost,http.localhost,rest.http.localhost,admin.http.localhost@.

However, you need to pass jid of the HTTP component, which in your case is named http@. So you need to add @http@computerName where computerName is the name of your computer on which you are running Tigase XMPP Server. You may get this name by running hostname in the console of your OS and it will return the proper name to use.

Added by flame fire almost 2 years ago

it works!very nice of u ,thx!

    (1-2/2)