The Network People Support Forums

Other TNPI Software => NicTool => Topic started by: xray-hope on October 19, 2013, 03:02:15 PM

Title: SOAP: transport error: http://localhost:8082/soap: 404 Not Found
Post by: xray-hope on October 19, 2013, 03:02:15 PM
i am having a issue with: SOAP: transport error: http://localhost:8082/soap: 404 Not Found
nictool version 2.20
OS debian 7

nictoolserver.conf
#!/usr/bin/perl

use Apache::DBI();
use Apache::SOAP;
#use Apache2::SOAP;  # might be needed on systems where Apache::SOAP is stale
use DBIx::Simple;
use XML::Parser;
use SOAP::Lite;

use strict;
use NicToolServer;
use NicToolServer::SOAP;
use NicToolServer::Client::SOAP;
use NicToolServer::Client;
use NicToolServer::Session;
use NicToolServer::Response;
use NicToolServer::Permission;
use NicToolServer::Zone;
use NicToolServer::Zone::Sanity;
use NicToolServer::Zone::Record;
use NicToolServer::Zone::Record::Sanity;
use NicToolServer::Group;
use NicToolServer::Group::Sanity;
use NicToolServer::User;
use NicToolServer::User::Sanity;
use NicToolServer::Nameserver;
use NicToolServer::Nameserver::Sanity;

BEGIN {
    $NicToolServer::dsn = "DBI:mysql:database=nictool;host=localhost;port=3306";
    $NicToolServer::db_user     = 'nictool';
    $NicToolServer::db_pass     = '******';

    @NicToolServer::default_groups = qw(NicTool 0-9); # see NicToolServer::Session::verify

    $NicToolServer::session_timeout = 60*45; # 45 minutes

    Apache::DBI->connect_on_init($NicToolServer::dsn, $NicToolServer::db_user, $NicToolServer::db_pass);
}

1;

__END__

=head1 SYNOPSIS


=cut

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nictoolclient.conf

#!/usr/bin/perl
#
# NicTool v2.00-rc1 Copyright 2001 Damon Edwards, Abe Shelton & Greg Schueler
# NicTool v2.01 Copyright 2004 The Network People, Inc.
#
# NicTool is free software; you can redistribute it and/or modify it under
# the terms of the Affero General Public License as published by Affero,
# Inc.; either version 1 of the License, or any later version.
#
# NicTool is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the Affero GPL for details.
#
# You should have received a copy of the Affero General Public License
# along with this program; if not, write to Affero Inc., 521 Third St,
# Suite 225, San Francisco, CA 94107, USA
#

use strict;

use CGI();

BEGIN {
    $NicToolClient::app_dir     = '/usr/local/nictool/client';

    #Interface options
    $NicToolClient::app_title   = 'NicTool';

    $NicToolClient::image_dir   = 'images';

    $NicToolClient::generic_error_message = qq(If you continue to get this error, please contact the system administrator, or your corporate contact.);

    #show the "help" links
    $NicToolClient::show_help_links = 1;

    #go to detail view after creating a new zone
    $NicToolClient::edit_after_new_zone = 1;

    #is the "include subgroups" checkbox automatically checked?
    $NicToolClient::include_subgroups_checked = 1;

    #is the "exact match" checkbox automatically checked?
    $NicToolClient::exact_match_checked = 0;

    $NicToolClient::template_dir                = "$NicToolClient::app_dir/templates";
    $NicToolClient::login_template              = "$NicToolClient::template_dir/login.html";
    $NicToolClient::setup_error_template        = "$NicToolClient::template_dir/setup_error.html";
    $NicToolClient::frameset_template           = "$NicToolClient::template_dir/frameset.html";
    $NicToolClient::start_html_template         = "$NicToolClient::template_dir/start_html.html";
    $NicToolClient::end_html_template           = "$NicToolClient::template_dir/end_html.html";
    $NicToolClient::body_frame_start_template   = "$NicToolClient::template_dir/body_frame_start.html";

    $NicToolClient::page_length = 50;

    #default values for zones/nameservers
    $NicToolClient::default_zone_ttl = '86400';
    $NicToolClient::default_zone_mailaddr = 'hostmaster.ZONE.TLD.';
    $NicToolClient::default_zone_refresh= '16384';    # RFC 1912 range (20 min to 12 hours)
    $NicToolClient::default_zone_retry  = '900';      # RFC 1912 range (180-900 sec)
    $NicToolClient::default_zone_expire = '1048576';  # RFC 1912 range (14 - 28 days)
    $NicToolClient::default_zone_minimum = '2560';    # RFC 2308 range (1 - 3 hours)

    $NicToolClient::default_zone_record_ttl = '86400';
    $NicToolClient::default_nameserver_ttl  = '86400';

    #NicToolServer connection settings
    $NicToolServerAPI::server_host         = "192.168.98.73";
    $NicToolServerAPI::server_port         = "8082";
    $NicToolServerAPI::data_protocol       = "soap";   # 'soap' or 'xml_rpc'
    $NicToolServerAPI::debug_soap_setup    = 0;        # debug soap calls
    $NicToolServerAPI::debug_soap_request  = 0;
    $NicToolServerAPI::debug_soap_response = 0;
}

use lib "$NicToolClient::app_dir/lib";
use NicToolClient;

1;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
apache2.conf

<IfDefine !MODPERL2>
  PerlFreshRestart On
</IfDefine>
PerlTaintCheck Off

Listen 8082

PerlRequire /usr/local/nictool/server/lib/nictoolserver.conf

<VirtualHost 192.168.98.73:8082>
    KeepAlive Off
    <Location />
        SetHandler perl-script
        PerlResponseHandler NicToolServer
    </Location>
    <Location /soap>
        SetHandler perl-script
        PerlResponseHandler Apache::SOAP
        #PerlResponseHandler Apache2::SOAP
        PerlSetVar dispatch_to "/usr/local/nictool/server, NicToolServer::SOAP"
    </Location>
</VirtualHost>


<VirtualHost *:80>
    # force a https connection
    ServerName dns.xray-hope.net
    Redirect / https://dns.xray-hope.net/
</VirtualHost>

<VirtualHost 192.168.98.73:443>
    ServerName dns.xray-hope.net
    Alias /images/ "/usr/local/nictool/client/htdocs/images/"
    DocumentRoot /usr/local/nictool/client/htdocs
    DirectoryIndex index.cgi
    #SSLEngine on
    #SSLCertificateFile /secure/path/to/certs/example.net.crt
    #SSLCertificateKeyFile /secure/path/to/certs/example.net.key

    <Files "*.cgi">
       SetHandler perl-script
       PerlResponseHandler ModPerl::Registry
       PerlOptions +ParseHeaders
       Options +ExecCGI
    </Files>

    <Directory "/usr/local/nictool/client/htdocs">
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>




Title: Re: SOAP: transport error: http://localhost:8082/soap: 404 Not Found
Post by: matt on October 21, 2013, 05:39:35 AM
Your apache config has the VirtualHost listening on 192.168.98.73:8082. Your client config shows that you have updated nictoolclient.conf, but it appears you didn't restart apache afterwards.