Creating a package repository error
-
I followed the directions at
http://doc.pfsense.org/index.php/Creating_Your_Own_Package_Repository
to create my own repository, but get the following error when i try access it from my pfsense box:
"Unable to retrieve package info from 192.168.0.5. Cached data will be used."
i am using easyphp as the server, and the test files work as they should. the easyphp server is accessable from other computers on the lan so its not a firewall issue. any ideas would be appreciated!
-
its like it wants the web server on the wan, not lan, any ideas?
-
Last I knew it didn't care if it was on WAN or LAN, as long as the box was reachable.
Can you try to access the test pages from the pfSense console (or ssh) with fetch or links?
e.g. links http://192.168.0.5/pfSense/test.php
-
links http://192.168.0.5/pfSense/test.php
that works fine. unless im missing something its only the one line in /etc/inc/globals.inc i should have to change on the pfsense box?
find attached the root dir of my server, i had to do the git with msysgit, but it was pretty straight forward…
-
xmlrpcbaseurl is the only setting you need to change.
That error can also happen if one of the files it expects is not in the proper format. What is under packages/ ?
-
see attached
-
When you went to test.php, what was the output?
It should look like:
Array ( [0] => foo [1] => baz )
And what if you try http://192.168.0.5/pfSense/pkg_tester.php ?
It should look like this:
Array ( [Pubkey] => Array ( [name] => Pubkey [version] => 1.0 ) [AutoConfigBackup] => Array ( [name] => AutoConfigBackup [version] => 1.18 ) [spamd] => Array ( [name] => spamd [version] => 4.3.7 ) [siproxd] => Array ( [name] => siproxd [version] => 0.7.1 ) [OpenBGPD] => Array ( [name] => OpenBGPD [version] => 0.5 ) [Lightsquid] => Array ( [name] => Lightsquid [version] => 1.7.1 ) [Dashboard] => Array ( [name] => Dashboard [version] => 0.8.8 ) [Dashboard Widget: Snort] => Array ( [name] => Dashboard Widget: Snort [version] => 0.3 ) [Dashboard Widget: HAVP] => Array ( [name] => Dashboard Widget: HAVP [version] => 0.1 ) [phpSysInfo] => Array ( [name] => phpSysInfo [version] => 2.5.3 ) [dns-server] => Array ( [name] => dns-server [version] => 1.0.6.3 ) [arping] => Array ( [name] => arping [version] => 2.05 ) [bsdstats] => Array ( [name] => bsdstats [version] => 3.9 ) [clamav] => Array ( [name] => clamav [version] => 0.1 ) [phpmrss] => Array ( [name] => phpmrss [version] => 0.13 ) [p3scan-pf] => Array ( [name] => p3scan-pf [version] => 0.1 ) [clamsmtp] => Array ( [name] => clamsmtp [version] => 0.1 ) [viralator] => Array ( [name] => viralator [version] => 0.1 ) [nmap] => Array ( [name] => nmap [version] => 4.20_1 ) [imspector] => Array ( [name] => imspector [version] => 0.4 ) [nut] => Array ( [name] => nut [version] => 2.0.4_1 ) [diag_new_states] => Array ( [name] => diag_new_states [version] => 0.2 ) [freenas] => Array ( [name] => freenas [version] => 0.68 ) [dspam] => Array ( [name] => dspam [version] => 3.6.8 ) [sshterm] => Array ( [name] => sshterm [version] => 0.1 ) [spamassassin] => Array ( [name] => spamassassin [version] => 0.1 ) [darkstat] => Array ( [name] => darkstat [version] => 3.0.619 ) [pfflowd] => Array ( [name] => pfflowd [version] => 0.6 ) [widentd] => Array ( [name] => widentd [version] => 1.03_1 ) [freeradius] => Array ( [name] => freeradius [version] => 1.1.2_1 ) [bandwidthd] => Array ( [name] => bandwidthd [version] => 2.0.1.1 ) [stunnel] => Array ( [name] => stunnel [version] => 4.18.2 ) [iperf] => Array ( [name] => iperf [version] => 2.0.2_1 ) [netio] => Array ( [name] => netio [version] => 1.26 ) [ifdepd] => Array ( [name] => ifdepd [version] => 20050420 ) [mtr-nox11] => Array ( [name] => mtr-nox11 [version] => 0.65_2 ) [squid] => Array ( [name] => squid [version] => 2.6.21_11 ) [LCDproc] => Array ( [name] => LCDproc [version] => lcdproc-0.5.2_3 ) [arpwatch] => Array ( [name] => arpwatch [version] => 2.1.a13 ) [squidGuard] => Array ( [name] => squidGuard [version] => 1.2.0_1-2 ) [Zabbix Agent (1.4)] => Array ( [name] => Zabbix Agent (1.4) [version] => 0.22 ) )
-
yes, i can use the browser on the computer hosting the web server, or by using links on the pfsense box via putty and have the same result as what you posted.
-
Not sure what to tell you then. It looks like it should be correct, but there may be some quirk in how the web server is processing the data that it doesn't like. Personally, I've only set it up on Apache. I know others have used lighttpd.
-
I found something else to check for. When you set the xmlrpcbaseurl, how did you set it? It should look like this:
"xmlrpcbaseurl" => "192.168.0.5",
-
I found something else to check for. When you set the xmlrpcbaseurl, how did you set it? It should look like this:
"xmlrpcbaseurl" => "192.168.0.5",
exactly how it looks, tried without the quotes as well, just for kicks, but no go. looks like im out of look
easyphp is apache with php5 based, so i though it would work!
-
was looking through it a bit more, and through the apache logs narrowed it down to a single varible that seemed to be causing the issue:
[Tue Jun 29 21:19:36 2010] [error] [client 192.168.0.1] PHP Notice: Undefined index: freebsd_machine in C:\Program Files (x86)\EasyPHP5.2.10\www\pfSense\xmlrpc.php on line 133
[Tue Jun 29 21:19:36 2010] [error] [client 192.168.0.1] PHP Notice: Undefined variable: freebsd_machine in C:\Program Files (x86)\EasyPHP5.2.10\www\pfSense\xmlrpc.php on line 139so i tried hardcoding the variable $freebsd_machine to match my setup and voila, it works!
-
Do you mind sharing exactly what change you made and to which file?
It might be possible to work around this in the source, or at least document the issue for someone trying this in the future.
-
in xmlrpc.php, i commented out 4 lines as follows (lines 133-136 in the file)
function get_pkgs($raw_params) { $path_to_files = '../packages/'; $pkg_rootobj = 'pfsensepkgs'; $apkgs = array(); $toreturn = array(); $params = array_shift(xmlrpc_params_to_php($raw_params)); if($params['freebsd_version']) $freebsd_version = "." . $params['freebsd_version']; else $freebsd_version = ""; /*if($params['freebsd_machine']) if($params['freebsd_machine'] != "i386") $freebsd_machine = "." . $params['freebsd_machine']; else*/ $freebsd_machine = ""; $pkg_config = parse_xml_config_pkg($path_to_files . 'pkg_config' . $freebsd_version . '.xml' . $freebsd_machine, $pkg_rootobj); foreach($pkg_config['packages']['package'] as $pkg) { if(($params['pkg'] == 'all') or (in_array($pkg['name'], $params['pkg']))) { if($params['info'] == 'all') { $apkgs[$pkg['name']] = $pkg; } else { $apkgs[$pkg['name']] = array_intersect_key($pkg, array_flip($params['info'])); } } } $response = XML_RPC_encode($apkgs); return new XML_RPC_Response($response); }
-
Ah, ok. Not sure that could be worked around since it seems to be a specific need for your server. It might break something else when run on a traditional platform. Having it here in the forum may be enough, since it should turn up on a search.
-
for those who you try to use easyphp as your web server for a repositry you need to do the following
- hardcode $freebsd_machine as described above
- edit your httdp.conf for two things: listen on your interface (not just localhost) and change your default directory allowoverride to all (from none)
- add a .htaccess file to /packages/config directory that contains 'AddType text/plain php inc xml' to stop easyphp from trying to render the files rather than just transfering them.