Need Help--RS4OTRS-JOSNAPI

Moderator: crythias

Post Reply
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Dear all
I'm trying to install RS4OTRS_API Addon From Radiant.(https://rs4otrs.com/collections/free-ad ... s/json-api)

I followed the directions that for install completion in the file zzz_otrs.conf inside section <Location /otrs> write:
RewriteEngine on
RewriteRule "/api/(\w+)/(\w+)" "/otrs/json.pl?Action=$1&Subaction=$2" [QSA,L]
and restart Apache.

After that Apache startup failed.I don't know how to solve the problem. Will you help me out?
I really appreciate your help!
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by reneeb »

Can you run

Code: Select all

apache2ctl configtest
? Are there any errors reported?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by root »

Hi,

I guess you don't have the rewrite module enabled.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Thank you very much for your help!
I enabled the rewrite module then apache can be run,but run apachectl configtest got the error message as below:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Syntax OK

I'm trying to fix it.
Thanks for your help again.
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Dear reneeb and admin
Add the ServerName 127.0.0.1 line to the end of /etc/httpd/conf/httpd.conf
run apachectl configtest got synatax ok ! :lol:

How do I make sure the JOSNAPI works?

Thanks for your help!
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by zzz »

Hey,

Just as an information: "AH00558: httpd..." is just a notice/warning and not an error and should have nothing to do with this issue.

— Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by reneeb »

If Apache runs, you can call

https://your.otrs.domain/api/Ticket/Get

and see what the error log says. I guess the module ships a documentation file. So you should read that to know what's possible. I do not know that addon.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Dear Reneeb
Thanks again !
You are like a god in my heart about otrs .
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by alexus »

tune6688 wrote: 08 Jun 2021, 04:45 Dear all
I'm trying to install RS4OTRS_API Addon From Radiant.(https://rs4otrs.com/collections/free-ad ... s/json-api)

I followed the directions that for install completion in the file zzz_otrs.conf inside section <Location /otrs> write:
RewriteEngine on
RewriteRule "/api/(\w+)/(\w+)" "/otrs/json.pl?Action=$1&Subaction=$2" [QSA,L]
and restart Apache.

After that Apache startup failed.I don't know how to solve the problem. Will you help me out?
I really appreciate your help!
This is the part of working apache config

Code: Select all

  # general mod_perl2 options
    <Location /otrs>
    # Mobile application API
        RewriteEngine on
        RewriteRule "/api/(\w+)/(\w+)" "/otrs/json.pl?Action=$1&Subaction=$2" [QSA,L]
        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        SetHandler  perl-script
        PerlResponseHandler ModPerl::Registry
        Options +ExecCGI
        PerlOptions +ParseHeaders
        PerlOptions +SetupEnv
        <IfModule mod_version.c>
            <IfVersion < 2.4>
                Order allow,deny
                Allow from all
            </IfVersion>
            <IfVersion >= 2.4>
                Require all granted
            </IfVersion>
        </IfModule>
        <IfModule !mod_version.c>
            Order allow,deny
            Allow from all
        </IfModule>
    </Location>
Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Dear alexus
Thanks for your help!
I'm add your code to /etc/httpd/conf/httpd.conf, and run http://localhost/otrs/api/ticket/getslalist to test the api ,got message"Please contact the administrator!" Response "ERROR".

can you tutor me ?

Another question, I improt Web Service from var_webservices_AndroidNotification.yml,
default setting is Network Transport-*Endpoint:https://fcm.googleapis.com, I open it from the browser got 404 error. How should I modify it?

I' m sorry my English is poor and technology is worse.

Thanks you for your great help!
alexus
Znuny wizard
Posts: 380
Joined: 20 Sep 2010, 16:54
Znuny Version: OTRS 6 CE
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Need Help--RS4OTRS-JOSNAPI

Post by alexus »

tune6688 wrote: 08 Jun 2021, 14:31
I'm add your code to /etc/httpd/conf/httpd.conf, and run http://localhost/otrs/api/ticket/getslalist to test the api ,got message"Please contact the administrator!" Response "ERROR".
Please share you apache and OTRS logs
Alexey Yusov

Production: OTRS CE ITSM 6.0.28 on CentOS 7 + Apache 2.4 + MariaDB 10.4.13 + Radiant Customer Portal

Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
((OTRS)) Community Edition - what next?
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

alexus wrote: 08 Jun 2021, 14:41
tune6688 wrote: 08 Jun 2021, 14:31
I'm add your code to /etc/httpd/conf/httpd.conf, and run http://localhost/otrs/api/ticket/getslalist to test the api ,got message"Please contact the administrator!" Response "ERROR".
Please share you apache and OTRS logs
Hi Sir,

Here is apache and OTRS logs,Kindly help to check,thinks.
httpd.conf.txt
20210609110038.png
You do not have the required permissions to view the files attached to this post.
tune6688
Znuny newbie
Posts: 61
Joined: 19 Nov 2020, 14:33
Znuny Version: 6.030
Real Name: wei

Re: Need Help--RS4OTRS-JOSNAPI

Post by tune6688 »

Dear Alexey and all
I have two questions to ask you, I'd be very grateful if you could help me .

1.I input "http://localhost/otrs/api/auth/login"in my browser, got message message"Login failed! Your user name or password was entered incorrectly."
Response"ERROR".
Would you please tell me what is the correct command or where can I input username and password?

2.Follow the instructions in manual for using API from OTRS addon RS4OTRS_API 6.41.0,
"Mobile notifications-
Preparation
...At first you should get Server key in Project list here:
firebase.google.com , https://firebase.google.com/docs/cloud-messaging/
auth-server.
Then in the file PushNotify.yml add it as additional header:
Headers:
Authorization: "key=AIzaSyAAz4rPdvewnTId2Xj7k83VLXpAUM"
Create Webservice by importing PushNotify.yml.
Where is "PushNotify.yml" file? This file is not in the plug-in package.

Thank your for your help and I am looking forward to your replay.
Post Reply