Fossil User Forum

(Deleted)
Login

(Deleted)

Error 500: SQLite table missing and segfault on OpenBSD httpd + CGI server

(1) By Jony (jonypost) on 2024-03-02 17:24:13 [source]

I'm currently encountering some challenges while setting up Fossil server on my OpenBSD 7.3 system and would greatly appreciate your assistance in resolving them.

Here's a brief overview of my situation:

  • I've followed all the steps outlined in the documentation, excluding the HTTPS setup and certificate configuration as I'm opting for a simple HTTP setup within my local network.

  • Even though I followed the instructions closely, when I try to visit the local address (http://fossil.pb.local) in my web browser, I get a 500 Internal Server Error from the web server, despite all the Fossil files are in the repo directory.

  • Upon checking the error log, I found the following messages:

------------- 2024-03-02 16:42:11 UTC ------------ panic: Segfault during process_one_web_page HTTP_HOST=fossil.pb.local HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0 REMOTE_ADDR=192.168.1.224 REQUEST_METHOD=GET REQUEST_URI=/ SCRIPT_NAME=/ ------------- 2024-03-02 16:42:11 UTC ------------ warning: SQLITE_ERROR(1): no such table: config in "SELECT 'fossil-' || substr(value,1,16) FROM config WHERE name IN ('project-code','login-group-code') ORDER BY name /sort/" SQL: SELECT pathname FROM sfile ORDER BY pathname COLLATE nocase; HTTP_HOST=fossil.pb.local HTTP_USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0 REMOTE_ADDR=192.168.1.224 REQUEST_METHOD=GET REQUEST_URI=/ SCRIPT_NAME=/

I'd really appreciate some help troubleshooting and fixing this issue, and I'm happy to provide more information if necessary.

(2) By Andy Bradford (andybradford) on 2024-03-03 04:34:06 in reply to 1 [link] [source]

> I'm  currently encountering  some challenges  while setting  up Fossil
> server  on my  OpenBSD 7.3  system and  would greatly  appreciate your
> assistance in resolving them.

Are you running using httpd(8) from base?

I  run it  and  it works  fine  with  Fossil. I  have  the following  in
httpd.conf:

        root "/website"
        location "*.fss*" {
                authenticate with "/auth/htpasswd"
                fastcgi socket "/run/fossil.sock"
        }

I have a script in /var/www/website/projects.fss that looks like:

#!/usr/local/bin/fossil
directory: /fossils
repolist

Then in /var/www/fossils I have all the repositories (e.g. *.fossil).

Because httpd(8) runs in a chroot you need to have a copy of fossil in:

/var/www/usr/local/bin/fossil

If you  don't compile it statically  then you'll have to  figure out all
the different libraries  that it needs and copy them  into the chroot as
well in the appropriate location.

You also need to have a  slowcgi configuration for Fossil that opens its
socket in /var/www/run/fossil.sock.

Because  I'm using  HTTP  AUTH, the  username  that httpd  authenticates
can  be  used in  my  Fossil  repositories. I  just  add  a username  to
each  repository that  matches the  username that  I use  with HTTP  and
then  enable  REMOTE_USER  support  on the  repository,  i.e.  configure
remote_user_ok in the config table of  the database which can be reached
using the UI at the /setup_access URI.

I don't think I've missed anything.

Have you looked at the httpd logs to see what's going on? What about the
slowcgi logs?  What about permissions on all the various components?

Andy