sks init script bug in ubuntu 12.04

rohan dighe rohandighe18 at gmail.com
Fri Aug 30 19:45:43 UTC 2013


Hi Thomas,

Thanks for providing me the steps for setting up sks,I will try this steps
on my server and let you know the output of it.

Thanks,
Rohan


On Fri, Aug 30, 2013 at 11:12 PM, Thomas Ward <teward at ubuntu.com> wrote:

> Oh, I miswrote those steps.
>
> Use these:
>
> (1) sudo apt-get purge sks
> (2) sudo rm -rf /var/lib/sks
> (3) sudo apt-get install sks
> (4) sudo sks build
> (5) sudo chown -R debian-sks:debian-sks /var/lib/sks/DB
> (6) sudo nano /etc/default/sks  (change initstart to "yes")
> (7) sudo /etc/init.d/sks start
> (8) sudo pidof sks  (should show PIDs now)
>
> On Fri, Aug 30, 2013 at 1:38 PM, Thomas Ward <teward at ubuntu.com> wrote:
> > Rohan,
> >
> > On Fri, Aug 30, 2013 at 1:16 PM, rohan dighe <rohandighe18 at gmail.com>
> wrote:
> >>
> >> Hi Thomas,
> >>
> >> I did check the  /etc/init.d/sks directory and found that the code >Edit
> >> /etc/init.d/sks to automatically create the/var/run/sks directory on
> >> startup.
> >>
> >>>At (approx) line 71 (after the check for /etc/default/sks & before
> 'echo -n
> >>> "sksdb.."') add
> >>>mkdir -p `dirname "$SKSDBPID"`
> >>>chown debian-sks `dirname "$SKSDBPID"`
> >>
> >> Was present in the init script of sks so I skip that configuration and
> also
> >> I skip the  configuration  In /etc/cron.daily/sks change db4.1_archive
> to
> >> db4.6_archive.mentioned in that link.
> >>
> >> and tried to configure the setup.but still not able to configure sks.
> >>
> >> I really appreciate your efforts.
> >>
> >>
> >>
> >>
> >> On Fri, Aug 30, 2013 at 10:33 PM, Thomas Ward <teward at ubuntu.com>
> wrote:
> >>>
> >>> I'm... confused by why they're having you create a directory...
> >>>
> >>> The tutorial you linked has this:
> >>>
> >>> >Edit /etc/init.d/sks to automatically create the/var/run/sks
> directory on
> >>> > startup.
> >>> >At (approx) line 71 (after the check for /etc/default/sks & before
> 'echo
> >>> > -n "sksdb.."') add
> >>> >mkdir -p `dirname "$SKSDBPID"`
> >>> >chown debian-sks `dirname "$SKSDBPID"`
> >>>
> >>> I'm a little confused by why they have you do this.  The init script
> >>> that already exists already does this in Precise.
> >>>
> >>> (
> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/sks/precise-updates/view/head:/debian/sks.init#L71
> )
> >>>
> >>> So, because I'm completely unsure of whether what they're doing works
> >>> or not, give me a minute to spin up a new server instance and test
> >>> this with the tutorial you linked... I think they did something wonky
> >>> somewhere...
> >>>
> >>> ------
> >>> Thomas
> >>>
> >>> On Fri, Aug 30, 2013 at 12:46 PM, rohan dighe <rohandighe18 at gmail.com>
> >>> wrote:
> >>> > Hi Thomas,
> >>> >
> >>> > Thanks for sending me the link for setup of the sks,and yes i did run
> >>> > the
> >>> > sks build command on the server while configuring sks server.But
> still
> >>> > getting the error.
> >>> >
> >>> > I followed the below link on how to setup the sks server.
> >>> >
> >>> > http://www.rainydayz.org/content/installing-opensks-keyserver
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > On Fri, Aug 30, 2013 at 9:50 PM, Thomas Ward <teward at ubuntu.com>
> wrote:
> >>> >>
> >>> >> Rohan,
> >>> >>
> >>> >> On Fri, Aug 30, 2013 at 10:04 AM, rohan dighe <
> rohandighe18 at gmail.com>
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > Hi Team,
> >>> >> >
> >>> >> > Thanks for the immediate response I really appreciate your
> efforts on
> >>> >> > providing me the solution for sks server.
> >>> >> >
> >>> >> > Here are the steps I am following to setup the sks server on
> ubuntu
> >>> >> > 12.04
> >>> >> >
> >>> >> > # aptitude install sks
> >>> >> >
> >>> >> > Set database permissions on the database used by sks to store keys
> >>> >> >
> >>> >> > # chown -Rc debian-sks:debian-sks /var/lib/sks/DB
> >>> >> >
> >>> >> > To start the server automatically, set initstart=yes in
> >>> >> > /etc/default/sks
> >>> >> >
> >>> >> > # Here I start the sks service
> >>> >> >
> >>> >> > # /etc/init.d/sks start
> >>> >> > Stopping sks daemons: sksrecon..start-stop-daemon: warning:
> failed to
> >>> >> > kill 31643: No such process
> >>> >> > sksdb..start-stop-daemon: warning: failed to kill 31640: No such
> >>> >> > process
> >>> >> > done.
> >>> >> >
> >>> >> > Starting sks daemons: sksdb.. sksrecon.. done.
> >>> >> >
> >>> >> > Then I configure webinterface for sks
> >>> >> >
> >>> >> > I install the sks winzip from internet
> >>> >> >
> >>> >> > Then I created a www directory in /var/lib/sks
> >>> >> >
> >>> >> > unzip the sks in /var/lib/sks/www folder
> >>> >> >
> >>> >> > After that 2 files gets downloaded in /var/lib/sks/www folder.
> >>> >> >
> >>> >> > 1) index.html
> >>> >> >
> >>> >> > 2) keys.jpg
> >>> >> >
> >>> >> > I Edit index.html and change the three references to
> your.site.name
> >>> >> > (currently at lines 20, 36 & 62) to the url of your keyserver) (
> In
> >>> >> > my case
> >>> >> > its my server ip )
> >>> >> >
> >>> >> > Then I change the permission on the files
> >>> >> >
> >>> >> > # chown -R debian-sks:debian-sks /var/lib/sks/www
> >>> >> >
> >>> >> > After that when I tried to browse http://myserverip:11371 its not
> >>> >> > working.
> >>> >> >
> >>> >> > I also tried to get the pid of the sks but the pid is not running
> on
> >>> >> > the
> >>> >> > server below is the given output.
> >>> >> >
> >>> >> > # ps -aufx | grep sks
> >>> >> > Warning: bad ps syntax, perhaps a bogus '-'? See
> >>> >> > http://procps.sf.net/faq.html
> >>> >> > root 31950 0.0 0.0 9384 900 pts/1 S+ 19:26 0:00 \_ grep
> --color=auto
> >>> >> > sks
> >>> >> >
> >>> >> > Here I cant see the 2 process running for sks one for the DB, one
> for
> >>> >> > recon.
> >>> >> >
> >>> >> > The ps output shows here that sks pid is not running ,It will be
> >>> >> > helpful
> >>> >> > if you let me know where exact the problem lies in sks.
> >>> >> >
> >>> >> >
> >>> >> > Thanks,
> >>> >> > Rohan
> >>> >> >
> >>> >> > On Fri, Aug 30, 2013 at 12:48 AM, Thomas Ward <teward at ubuntu.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> Rohan,
> >>> >> >>
> >>> >> >> On Thu, Aug 29, 2013 at 3:08 PM, Thomas Ward <teward at ubuntu.com>
> >>> >> >> wrote:
> >>> >> >>>
> >>> >> >>> I took a look at that bug, the bug went inactive because it had
> no
> >>> >> >>> activity or updates when the bug was marked "Incomplete".  Since
> >>> >> >>> the
> >>> >> >>> original poster and nobody else provided any additional
> information
> >>> >> >>> the bug
> >>> >> >>> auto expired.
> >>> >> >>>
> >>> >> >>> I can try confirming this bug, however if I remember when I was
> >>> >> >>> configuring sks back in the days of 11.04 and 11.10, you had to
> >>> >> >>> configure it
> >>> >> >>> before you could actually start or restart the sks process.
> >>> >> >>>
> >>> >> >>> I'll take a look and see if I can reproduce, but there's
> probably
> >>> >> >>> logs
> >>> >> >>> somewhere for sks explaining why it didn't start or such.
> >>> >> >>>
> >>> >> >>> I'll check back with this in a little bit after I've done some
> >>> >> >>> testing.
> >>> >> >>>
> >>> >> >>> ------
> >>> >> >>> Thomas
> >>> >> >>> Ubuntu Member
> >>> >> >>> Bug Squad Member
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> On Thu, Aug 29, 2013 at 7:56 AM, rohan dighe
> >>> >> >>> <rohandighe18 at gmail.com>
> >>> >> >>> wrote:
> >>> >> >>>>
> >>> >> >>>> Hi Team,
> >>> >> >>>>
> >>> >> >>>> I am working on setting up a gpg key server on ubuntu
> server,but
> >>> >> >>>> facing some issue as the init script of sks has some bug.when I
> >>> >> >>>> set up the
> >>> >> >>>> gpg key server and starts sks service
> >>> >> >>>>
> >>> >> >>>> I get the below output on command prompt its shows service
> running
> >>> >> >>>> but its actually not running and also I cant get the pid
> process
> >>> >> >>>> of sks
> >>> >> >>>> service showing running.
> >>> >> >>>>
> >>> >> >>>> root at tripwiretest: sks]# /etc/init.d/sks start
> >>> >> >>>> Starting sks daemons: sksdb.. sksrecon.. done.
> >>> >> >>>>
> >>> >> >>>> The ubuntu showing the bug on this link.
> >>> >> >>>>
> >>> >> >>>> https://bugs.launchpad.net/ubuntu/+source/sks/+bug/820354
> >>> >> >>>>
> >>> >> >>>> I also followed the solution given on the link but with no
> >>> >> >>>> success.
> >>> >> >>>>
> >>> >> >>>> As the sks comes from the ubuntu 12.04 repository do we have
> any
> >>> >> >>>> permanent fix for the init script of sks.
> >>> >> >>>>
> >>> >> >>>> Please help me regarding the init script of sks.
> >>> >> >>>>
> >>> >> >>>> Thanks,
> >>> >> >>>> Rohan
> >>> >> >>>>
> >>> >> >>>> --
> >>> >> >>>> Ubuntu-bugsquad mailing list
> >>> >> >>>> Ubuntu-bugsquad at lists.ubuntu.com
> >>> >> >>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugsquad
> >>> >> >>>>
> >>> >> >>>
> >>> >> >>
> >>> >> >> Using a properly configured 'sks' instance, I am unable to
> reproduce
> >>> >> >> this bug, and using the init.d script correctly launches the two
> sks
> >>> >> >> processes, one for the DB, one for recon.
> >>> >> >>
> >>> >> >> Also, the package 'sks' does not by default set up the key
> database
> >>> >> >> or
> >>> >> >> other items just by installing.  Did you actually configure 'sks'
> >>> >> >> first
> >>> >> >> before attempting to run it with the init script?
> >>> >> >>
> >>> >> >> ------
> >>> >> >> Thomas
> >>> >> >>
> >>> >> >
> >>> >>
> >>> >> Typically, when I configured sks on several systems, I always had to
> >>> >> do this step to get the key db built after installing, then
> afterwards
> >>> >> I chown'd /var/lib/sks/DB:  sudo sks build
> >>> >>
> >>> >> Did you run the build command for sks before attempting to launch
> sks?
> >>> >>  If you did that and are still getting this error, then perhaps we
> >>> >> should purge sks from your system and start anew?  This link here
> [1]
> >>> >> was able to help me get a brand new sks instance set up correctly
> >>> >> without incident, though, and it correctly runs the sks process and
> >>> >> builds the key database so it works.
> >>> >>
> >>> >> [1]
> >>> >>
> >>> >>
> https://kura.io/2011/12/17/running-your-own-pgp-keyserver-with-sks-on-debian-6ubuntu-10-04/
> >>> >>
> >>> >> ------
> >>> >> Thomas
> >>> >
> >>> >
> >>
> >>
> >
> > Okay, I tested using the link that you provided and also tested with
> > the link I provided.
> >
> > The link you provided asks you to run `sudo sks db` after you've build
> > the key database.  I'm not entirely certain, however I think that
> > command, and then later closing out of it, is somehow causing it to
> > break.  I am drawing this conclusion because in one tutorial I don't
> > run `sudo sks db` and it correctly launches later.
> >
> > So, let's start from the beginning, doing everything in your tutorial
> > *but* running `sudo sks db` after building it, but using these steps
> > to get it to launch, then using the rest of the tutorial for the web
> > interface, and see if that works:
> >
> > (1) sudo apt-get purge sks
> > (2) sudo apt-get install sks
> > (3) sudo sks build
> > (4) sudo chown -R debian-sks:debian-sks /var/lib/sks/DB
> > (5) sudo nano /etc/default/sks  (change initstart to "yes")
> > (6) sudo /etc/init.d/sks start
> > (7) sudo pidof sks  (should show PIDs now)
> >
> > ------
> > Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-bugsquad/attachments/20130831/b95a9c5c/attachment-0001.html>


More information about the Ubuntu-bugsquad mailing list