Can you login to the VCL website as vclsystem? Also try running the test script as admin instead of vclsystem. Same result?
On Mon, Oct 15, 2012 at 12:00 PM, Michael Jinks <[email protected]> wrote: > Hi Andy. > > I get: > > $ ~/test-xmlrpc.pl > Username: vclsystem > Password: created RPC::XML client object RPC::XML::Client::send_request > fault occurred, fault code: 3, fault string: Access denied > > ...which looks like I'm entering the wrong password, but I'm pretty sure > that's not the case. > > vcld.log doesn't show anything in response to the attempt but I don't > know if it should. > > I wonder if my database is hosed (again, still). > > > > On Mon, Oct 15, 2012 at 11:31:36AM -0400, Andy Kurth wrote: > > What output does the following script produce? You should only have > to > > change the URL. (Made minor changes to Aaron's) > > > > #---BEGIN--- > > > > #!/usr/bin/perl -w > > use strict; > > use warnings; > > use diagnostics; > > use RPC::XML::Client; > > use Term::ReadKey; > > use Data::Dumper; > > my $VCL_LOCATION = 'https://<URL>/index.php?mode=xmlrpccall'; > > $|++; > > print "Username: "; > > chomp(my $username = <>); > > print "Password: "; > > ReadMode 2; > > chomp(my $password = <>); > > ReadMode 0; > > my $client = RPC::XML::Client->new($VCL_LOCATION, useragent => > > ['ssl_opts' => {verify_hostname => 0}]); > > if (defined($client)) { > > print "created RPC::XML client object\n"; > > } > > else { > > print "failed to create a new RPC::XML client object, error: " . > > ($RPC::XML::ERROR || '<none>') . "\n"; > > exit; > > } > > $client->useragent->default_header('X-User' => $username); > > $client->useragent->default_header('X-Pass' => $password); > > $client->useragent->default_header('X-APIVERSION' => 2); > > my $response = $client->send_request(("system.listMethods")); > > if (!ref($response)) { > > print "RPC::XML::Client::send_request failed, error: " . > > ($RPC::XML::ERROR || '<none>') . "\n" . Dumper($response) . "\n"; > > exit; > > } > > elsif ($response->is_fault) { > > print "RPC::XML::Client::send_request fault occurred, fault code: " . > > $response->code . ", fault string: " . $response->string . "\n"; > > exit; > > } > > for my $method (@$response) { > > print $method->value . "\n"; > > } > > > > #---END--- > > > > On Fri, Oct 12, 2012 at 5:54 PM, Michael Jinks <[1] > [email protected]> > > wrote: > > > > On Fri, Oct 12, 2012 at 09:36:08PM +0000, Aaron Coburn wrote: > > > > > > > Oh, good! I was wishing for something like this. > > > > > > > > This looks familiar: > > > > > > > > $ ./[2]vcl-rpcxml.pl > > > > Username: vclsystem > > > > Password: > > > > Can't locate object method "value" via package > > > > "RPC::XML::Client::send_request: HTTP server error: Can't connect > > to > > > > [3]vlab-a.uchicago.edu:443 (certificate verify failed)" (perhaps > > you forgot > > > > to load "RPC::XML::Client::send_request: HTTP server error: Can't > > > > connect to [4]vlab-a.uchicago.edu:443 (certificate verify > > failed)"?) at > > > > ./[5]vcl-rpcxml.pl line 28, <> line 2. > > > > > > > > I get the same result whether I enter the correct password or > > something > > > > deliberately wrong. So I'm guessing that this is indicating > > something > > > > missing in my environment, but I know from looking previously that > > the > > > > RPC::XML::Client directory is complete with a send_request script. > > > > > > > > > > But are you not using a custom-built perl interpreter? You should > > invoke the script with the same perl interpreter that vcld is using; > > otherwise, it will use /usr/bin/perl > > > > I adjusted the script: > > #!/usr/local/vcl/perl/bin/perl -w > > > > > The error you see relates to a package not being installed -- either > > LWP or RPC::XML > > > > Yeah, that sure is what it looks like... but both modules are > > present: > > $ sudo /usr/local/vcl/perl/bin/cpan LWP > > Reading '/root/.cpan/Metadata' > > Database was generated on Fri, 12 Oct 2012 09:07:03 GMT > > LWP is up to date (6.04). > > $ sudo /usr/local/vcl/perl/bin/cpan RPC::XML > > Reading '/root/.cpan/Metadata' > > Database was generated on Fri, 12 Oct 2012 09:07:03 GMT > > RPC::XML is up to date (1.56). > > > > -- > > Michael Jinks :: [6][email protected] > > University of Chicago IT Services > > > > References > > > > 1. mailto:[email protected] > > 2. http://vcl-rpcxml.pl/ > > 3. http://vlab-a.uchicago.edu:443/ > > 4. http://vlab-a.uchicago.edu:443/ > > 5. http://vcl-rpcxml.pl/ > > 6. mailto:[email protected] > > -- > Michael Jinks :: [email protected] :: 773-469-9688 > University of Chicago IT Services >
