Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jun 27, 2012 12:35 pm 
Offline
Newbie

Joined: Wed Jun 27, 2012 12:22 pm
Posts: 2
Has anyone found a fix for this?

Setting up iptables-persistent (0.5.3ubuntu2) ...
dpkg: error processing iptables-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)


I tried the workaround described in the following url:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1002078

Kindest.


Top
   
PostPosted: Sat Jul 07, 2012 2:20 pm 
Offline
Newbie

Joined: Wed Jun 27, 2012 12:22 pm
Posts: 2
Even after multiple apt-get upgrades.... I'm still getting:

Setting up iptables-persistent (0.5.3ubuntu2) ...
dpkg: error processing iptables-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up cron (3.0pl1-120ubuntu4) ...
No apport report written because MaxReports is reached already
Installing new version of config file /etc/default/cron ...
cron start/running, process 11980
Setting up libgnutls26 (2.12.14-5ubuntu3.1) ...
Setting up language-pack-en (1:12.04+20120618) ...
Setting up libaccountsservice0 (0.6.15-2ubuntu9.1) ...
Setting up accountsservice (0.6.15-2ubuntu9.1) ...
Setting up linux-libc-dev (3.2.0-26.41) ...
Setting up python-crypto (2.4.1-1ubuntu0.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)



Any ideas?


Top
   
PostPosted: Mon Jul 09, 2012 10:01 am 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
I've ran in to this problem before. It's an issue with the installation script provided by the package maintainer. Here's my previous write-up about it:

theckman wrote:
It appears the maintainer of the package, or the person who built the post-installation script, made the assumption that any error experienced while the script is running should indicate a complete failure.

On our platform, we compile a large number of common modules in to our kernel and you are unable to use modprobe if you wish to enable a specific module. As a result, any attempts to load a kernel module using modprobe will fail, and error status 1 will be returned.

Having extracted the .deb package, and looked at the "postinst" script, I found that it tries to run these two commands:

modprobe -q iptable_filter
modprobe -q ip6table_filter

In your case, it never makes it to the second command. When the first command is executed, it returns a status 1 error code. This wouldn't be an issue if the script was doing the error checking. However, because "set -e" is done at the top of the script, it immediately exits with status 1. Dpkg then intercepts this status, and assumes it has failed.

This is indeed a bug with the package itself. The postinst script should be refactored so that it doesn't blindly assume an error return from modprobe is an actual issue.

At this point, it appears that "iptables-persistent" should work as it has been installed. However, apt-get is most likely going to try to reconfigure "iptables-persistent" when doing any package installations in the future. This shouldn't cause the process to fail, but it will return a failure status code.


-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
PostPosted: Mon Jul 09, 2012 10:04 am 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
Here's the script, as it existed when I did that write-up, if you are curious: http://privatepaste.com/1b3b56739f

-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
PostPosted: Fri May 24, 2013 4:15 pm 
Offline
User avatar

Joined: Mon Nov 03, 2008 11:40 am
Posts: 1
I just ran into this with a fresh Ubuntu 12.04 machine.

Based on the info provided by theckman and this ref:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1002078

...I was able to get it working!

TL;DR? Here the simple fix (copy-paste this block into the terminal):
Code:
sudo sed \
    -i 's/\(modprobe -q ip6\?table_filter\)/\1 || true/g' \
    /var/lib/dpkg/info/iptables-persistent.postinst; \
sudo aptitude install iptables-persistent



Thanks! Saved me the time and trouble of trying to figure it out myself.


Top
   
PostPosted: Mon May 27, 2013 11:34 pm 
Offline
Sysop

Joined: Sat Nov 27, 2010 3:32 am
Posts: 180
Website: https://blog.timheckman.net/
Location: San Francisco, CA
Glad to see an old comment of mine could help!

-Tim

_________________
'If debugging is the process of removing bugs, then programming must be the process of putting them in.' //Edsger Dijkstra
'Nothing is withheld from us which we have conceived to do.' | 'Do things that have never been done.' //Russell Kirsch


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group