Hi,
Thank you for checking this up. Indeed I was missing the sponsor source and
after testing with that added I do not get the error anymore.
All good now ☺ and great that you got the error in the codebase fixed.
Regards
Michel
Fra: Derek Wuelfrath [mailto:[email protected]]
Sendt: 17. juni 2016 15:59
Til: ML PF <[email protected]>
Emne: Re: [PacketFence-users] Granting access through sponsor fails
Hello Michel,
Caught exception in
captiveportal::Controller::Activate::Email->doSponsorRegistration "Can't locate
object method "destinationUrl" via package
"captiveportal::Model::Portal::Session" at
/usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm
line 242."
After reading your message, we found two issues;
- One related to your configuration
- One related to the codebase
You are actually hitting the codebase error due to a missing parameter in your
configuration.
You seems to be missing a ‘sponsor’ source configured (or enabled on the portal
profile that you are using.)
To be sure that I can help you as much as possible, can you send
conf/authentication.conf and conf/profiles.conf (make sure to remove any
sensitive data)
As for the codebase issue, we fixed it (thanks for your report)
https://github.com/inverse-inc/packetfence/commit/faaabeef4fb748711e0b698e49fa6537ed060777
You might want to run pf-maint script to get latest patchs.
Thanks!
Cheers!
-dw.
—
Derek Wuelfrath
[email protected]<mailto:[email protected]> :: +1.514.447.4918 (x110)
:: +1.866.353.6153 (x110)
Inverse inc. :: Leaders behind SOGo (www.sogo.nu<http://www.sogo.nu>) and
PacketFence (www.packetfence.org<http://www.packetfence.org>)
On Jun 15, 2016, at 07:00, Pedersen Michel
<[email protected]<mailto:[email protected]>> wrote:
Hi,
I’ve setup PF 6.0.3 (with the latest patches as of 15.06.2016) but I’m hitting
some issues with activating guests users using a sponsor. Setup is against a
Cisco WLC using webauth.
Sponsor lookup is done using Active Directory defined under sources and they
receive the email with the activation link. When they click on the link however
they get the following exception:
Caught exception in
captiveportal::Controller::Activate::Email->doSponsorRegistration "Can't locate
object method "destinationUrl" via package
"captiveportal::Model::Portal::Session" at
/usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm
line 242."
A local user account is created for the guest email but I do not see any
devices attached to this (I would expect the registering device to be attached
to this user account)
I have tried looking through the code without figuring out what is wrong. Is
this a known problem/bug in PF 6.03?
Other login methods like Active Directory work fine in the portal and the user
gets access.
A bit of info from the packetfence.log
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] Instantiate
profile default (pf::Portal::ProfileFactory::_from_profile)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] registering
guest through a sponsor
(captiveportal::PacketFence::DynamicRouting::Module::Authentication::Sponsor
::do_sponsor_registration)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] Using sources
local, file1, htpasswd, SVV-AD for matching (pf::authentication::match)
Jun 15 12:51:15 httpd.portal(39972) ERROR: [mac:34:02:86:60:67:1a] Error
binding 'Connection reset by peer' (pf::LDAP::bind)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] Matched rule
(Sponsor) in source SVV-AD, returning actions.
(pf::Authentication::Source::match)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] Adding guest
person
[email protected]<mailto:[email protected]>(captiveportal::PacketFence::DynamicRouting::Module::Authentication
::Sponsor::do_sponsor_registration)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] new
activation code successfully generated (pf::activation::create)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] Email sent to
[email protected]<mailto:[email protected]>
(vegvesen.no<http://vegvesen.no/>: Guest access request) (pf::activation::try
{...} )
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] User
[email protected]<mailto:[email protected]> has authenticated
on the portal. (Class::MOP::Class:::after)
Jun 15 12:51:15 httpd.portal(39972) INFO: [mac:34:02:86:60:67:1a] person
[email protected]<mailto:[email protected]> added
(pf::person::person_add)
Jun 15 12:51:20 httpd.portal(40007) INFO: [mac:unknown] External captive portal
detected !
(captiveportal::PacketFence::Model::Portal::Session::_build_dispatcherSession)
Jun 15 12:51:20 httpd.portal(40007) INFO: [mac:unknown] Detected external
portal client. Using the IP 10.250.170.253 address in it's session.
(captiveportal::PacketFence::Model::P
ortal::Session::_build_clientIp)
Jun 15 12:51:20 httpd.portal(40007) ERROR: [mac:unknown] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:20 httpd.portal(40007) INFO: [mac:34:02:86:60:67:1a] External
captive portal detected !
(captiveportal::PacketFence::Model::Portal::Session::_build_dispatcherSession)
Jun 15 12:51:20 httpd.portal(40007) INFO: [mac:34:02:86:60:67:1a] Detected
external portal client. Using the IP 10.250.170.253 address in it's session.
(captiveportal::PacketFence
::Model::Portal::Session::_build_clientIp)
Jun 15 12:51:20 httpd.portal(40007) ERROR: [mac:34:02:86:60:67:1a] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:20 httpd.portal(40007) INFO: [mac:34:02:86:60:67:1a] Instantiate
profile default (pf::Portal::ProfileFactory::_from_profile)
Jun 15 12:51:23 httpd.portal(42629) ERROR: [mac:unknown] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:23 httpd.portal(42629) WARN: [mac:unknown] Unable to match MAC
address to IP '10.252.0.126' (pf::iplog::ip2mac)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:unknown] Instantiate profile
default (pf::Portal::ProfileFactory::_from_profile)
Jun 15 12:51:23 httpd.portal(42629) ERROR: [mac:unknown] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:23 httpd.portal(42629) WARN: [mac:unknown] Unable to match MAC
address to IP '10.252.0.126' (pf::iplog::ip2mac)
Jun 15 12:51:23 httpd.portal(42629) ERROR: [mac:0] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:23 httpd.portal(42629) WARN: [mac:0] Unable to match MAC address
to IP '10.252.0.126' (pf::iplog::ip2mac)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] Instantiate profile default
(pf::Portal::ProfileFactory::_from_profile)
Jun 15 12:51:23 httpd.portal(42629) ERROR: [mac:0] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:23 httpd.portal(42629) WARN: [mac:0] Unable to match MAC address
to IP '10.252.0.126' (pf::iplog::ip2mac)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] Instantiate profile default
(pf::Portal::ProfileFactory::_from_profile)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] Updating node user_agent with
useragent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like
Gecko' (captiveportal::P
acketFence::DynamicRouting::Application::process_user_agent)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] database query failed with:
Duplicate entry '0' for key 'PRIMARY' (errno: 1062) (pf::db::db_query_execute)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::6 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::912 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::902 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::906 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::904 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::1401 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::507 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::512 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::400 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] violation not added, MAC 0 is
invalid! trigger useragent::505 (pf::violation::violation_trigger)
Jun 15 12:51:23 httpd.portal(42629) INFO: [mac:0] [34:02:86:60:67:1a]
Activation code sent to email
[email protected]<mailto:[email protected]> from
[email protected]<mailto:[email protected]> successfully verifie
d. for activation type: sponsor (pf::activation::validate_code)
Jun 15 12:51:23 httpd.portal(42629) ERROR: [mac:0] Caught exception in
captiveportal::Controller::Activate::Email->doSponsorRegistration "Can't locate
object method "destinationUr
l" via package "captiveportal::Model::Portal::Session" at
/usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm
line 242." (captiveportal::P
acketFence::Controller::Root::end)
Jun 15 12:51:25 httpd.portal(42614) INFO: [mac:unknown] External captive portal
detected !
(captiveportal::PacketFence::Model::Portal::Session::_build_dispatcherSession)
Jun 15 12:51:25 httpd.portal(42614) INFO: [mac:unknown] Detected external
portal client. Using the IP 10.250.170.253 address in it's session.
(captiveportal::PacketFence::Model::P
ortal::Session::_build_clientIp)
Jun 15 12:51:25 httpd.portal(42614) ERROR: [mac:unknown] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Jun 15 12:51:25 httpd.portal(42614) INFO: [mac:34:02:86:60:67:1a] External
captive portal detected !
(captiveportal::PacketFence::Model::Portal::Session::_build_dispatcherSession)
Jun 15 12:51:25 httpd.portal(42614) INFO: [mac:34:02:86:60:67:1a] Detected
external portal client. Using the IP 10.250.170.253 address in it's session.
(captiveportal::PacketFence
::Model::Portal::Session::_build_clientIp)
Jun 15 12:51:25 httpd.portal(42614) ERROR: [mac:34:02:86:60:67:1a] Can't bind :
IO::Socket::INET: connect: Connection refused
(pf::iplog::_get_lease_from_omapi)
Best regards
Michel Pedersen
Norwegian Public Roads Administration
Postal address: Statens vegvesen Vegdirektoratet, Postboks 8142 Dep, 0033 OSLO
Office address: Brynsengfaret 6A, OSLO
Mobile: +47 99117502 e-mail/Lync:
[email protected]<mailto:[email protected]>
www.vegvesen.no<http://www.vegvesen.no/> e-mail:
[email protected]<mailto:[email protected]>
Please consider the environment before printing this e-mail
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.
http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381_______________________________________________
PacketFence-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users