FAQ
Public bug reported:

The command "mailman info" crashes if the database path "url" points to
a location that does not exist yet:

root at mailman:~/mailman/bin# ./mailman info
Traceback (most recent call last):
File "./mailman", line 32, in <module>
mailman.bin.mailman.main()
File "/root/mailman/src/mailman/bin/mailman.py", line 98, in main
initialize(config_file)
File "/root/mailman/src/mailman/core/initialize.py", line 175, in initialize
initialize_2(propagate_logs=propagate_logs)
File "/root/mailman/src/mailman/core/initialize.py", line 146, in initialize_2
database.initialize(debug)
File "/root/mailman/src/mailman/database/stock.py", line 64, in initialize
self._create(debug)
File "/root/mailman/src/mailman/database/stock.py", line 98, in _create
touch(url)
File "/root/mailman/src/mailman/database/stock.py", line 141, in touch
fd = os.open(path, os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, 0666)
OSError: [Errno 2] No such file or directory: '/opt/mailman/data/mailman.db'

** Affects: mailman
Importance: Undecided
Status: New


** Tags: 3.0 mailman

--
command mailman info fails when Database url does not exist
https://bugs.launchpad.net/bugs/543620
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.

Search Discussions

  • Barry Warsaw at Mar 21, 2010 at 9:38 pm
    ** Changed in: mailman
    Milestone: None => 3.0.0a6

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 27, 2010 at 11:49 pm
    Can you post your mailman.cfg file? 'bin/mailman info' will try to
    create the mailman.db file if it doesn't exist, but of course that could
    fail if say the process doesn't have permission to create the paths,
    e.g.

    -----mailman.cfg-----
    [mailman]
    layout: foo

    [paths.foo]
    var_dir: /foo/mailman
    ----------

    % bin/mailman info
    Traceback (most recent call last):
    File "bin/mailman", line 31, in <module>
    mailman.bin.mailman.main()
    File "/home/barry/projects/mailman/3.0/src/mailman/bin/mailman.py", line 98, in main
    initialize(config_file)
    File "/home/barry/projects/mailman/3.0/src/mailman/core/initialize.py", line 174, in initialize
    initialize_1(config_path)
    File "/home/barry/projects/mailman/3.0/src/mailman/core/initialize.py", line 117, in initialize_1
    mailman.config.config.load(config_path)
    File "/home/barry/projects/mailman/3.0/src/mailman/config/config.py", line 106, in load
    self._post_process()
    File "/home/barry/projects/mailman/3.0/src/mailman/config/config.py", line 126, in _post_process
    Switchboard.initialize()
    File "/home/barry/projects/mailman/3.0/src/mailman/queue/__init__.py", line 94, in initialize
    config.switchboards[name] = Switchboard(name, path)
    File "/home/barry/projects/mailman/3.0/src/mailman/queue/__init__.py", line 119, in __init__
    makedirs(self.queue_directory, 0770)
    File "/home/barry/projects/mailman/3.0/src/mailman/utilities/filesystem.py", line 66, in makedirs
    os.makedirs(path, mode)
    File "/usr/lib/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.6/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/foo'

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 28, 2010 at 12:09 am
    ** Changed in: mailman
    Assignee: (unassigned) => Barry Warsaw (barry)

    ** Changed in: mailman
    Status: New => Incomplete

    ** Also affects: mailman/3.0
    Importance: Undecided
    Assignee: Barry Warsaw (barry)
    Status: Incomplete

    ** Tags added: mailman3
    ** Tags removed: 3.0 mailman

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Patrick Ben Koetter at Mar 28, 2010 at 7:09 am
    When the error occured /opt/mailman existed AND /etc/mailman.cfg used to
    be like this:

    p at mailman:~$ cat /etc/mailman.cfg
    [mailman]
    site_owner: postmaster at state-of-mind.de

    # Which paths.* file system layout to use.
    layout: dev

    [paths.master]
    var_dir: /opt/mailman

    # [database]
    # The class implementing the IDatabase.
    # class: mailman.database.stock.StockDatabase

    # Use this to set the Storm database engine URL. You generally have one
    # primary database connection for all of Mailman. List data and most rosters
    # will store their data in this database, although external rosters may access
    # other databases in their own way. This string supports standard
    # 'configuration' substitutions.
    # url: sqlite:///opt/mailman/data/mailman.db
    # debug: no

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 28, 2010 at 9:23 pm
    I just noticed a problem with the mailman.cfg file you posted. You've
    set the layout to be 'dev' but you're overriding var_dir in the
    [paths.master] section. That doesn't match, so it's not picking that
    up. You can verify by running

    bin/mailman info -p

    See if

    s/paths.master/paths.dev/

    fixes your problem.

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Patrick Ben Koetter at Mar 28, 2010 at 9:43 pm

    * Barry Warsaw <543620 at bugs.launchpad.net>:
    I just noticed a problem with the mailman.cfg file you posted. You've
    set the layout to be 'dev' but you're overriding var_dir in the
    [paths.master] section. That doesn't match, so it's not picking that
    up. You can verify by running

    bin/mailman info -p

    See if

    s/paths.master/paths.dev/

    fixes your problem.
    I noticed that too when I posted the config to you. The problem probably is -
    which is good in this case - that I am not an experienced python user nor
    developer and the relation between the two didn't strike me.

    I think I've even looked for a correlation in the original
    mailman/../mailman.cfg and didn't find one.

    Anyway. I will change it and see what happens.

    p at rick

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a direct subscriber
    of the bug.

    Status in GNU Mailman: Incomplete
    Status in GNU Mailman 3.0 series: Incomplete

    Bug description:
    The command "mailman info" crashes if the database path "url" points to a location that does not exist yet:

    root at mailman:~/mailman/bin# ./mailman info
    Traceback (most recent call last):
    File "./mailman", line 32, in <module>
    mailman.bin.mailman.main()
    File "/root/mailman/src/mailman/bin/mailman.py", line 98, in main
    initialize(config_file)
    File "/root/mailman/src/mailman/core/initialize.py", line 175, in initialize
    initialize_2(propagate_logs=propagate_logs)
    File "/root/mailman/src/mailman/core/initialize.py", line 146, in initialize_2
    database.initialize(debug)
    File "/root/mailman/src/mailman/database/stock.py", line 64, in initialize
    self._create(debug)
    File "/root/mailman/src/mailman/database/stock.py", line 98, in _create
    touch(url)
    File "/root/mailman/src/mailman/database/stock.py", line 141, in touch
    fd = os.open(path, os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, 0666)
    OSError: [Errno 2] No such file or directory: '/opt/mailman/data/mailman.db'

    To unsubscribe from this bug, go to:
    https://bugs.launchpad.net/mailman/+bug/543620/+subscribe
    --
    state of mind
    Digitale Kommunikation

    http://www.state-of-mind.de

    Franziskanerstra?e 15 Telefon +49 89 3090 4664
    81669 M?nchen Telefax +49 89 3090 4666

    Amtsgericht M?nchen Partnerschaftsregister PR 563

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Patrick Ben Koetter at Mar 29, 2010 at 10:53 am

    * Barry Warsaw <543620 at bugs.launchpad.net>:
    I just noticed a problem with the mailman.cfg file you posted. You've
    set the layout to be 'dev' but you're overriding var_dir in the
    [paths.master] section. That doesn't match, so it's not picking that
    up. You can verify by running

    bin/mailman info -p

    See if

    s/paths.master/paths.dev/

    fixes your problem.
    It fixed the problem.

    p at rick


    --
    state of mind
    Digitale Kommunikation

    http://www.state-of-mind.de

    Franziskanerstra?e 15 Telefon +49 89 3090 4664
    81669 M?nchen Telefax +49 89 3090 4666

    Amtsgericht M?nchen Partnerschaftsregister PR 563

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 28, 2010 at 9:24 pm
    BTW I am going to change 'bin/mailman info --paths/-p' to '--verbose/-v'
    in the trunk ;)

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 29, 2010 at 2:41 am
    Cool, let me know. I do think we could use better documentation for the
    configuration options. ;/

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.
  • Barry Warsaw at Mar 29, 2010 at 2:09 pm
    ** Changed in: mailman/3.0
    Status: Incomplete => Invalid

    --
    command mailman info fails when Database url does not exist
    https://bugs.launchpad.net/bugs/543620
    You received this bug notification because you are a member of Mailman
    Coders, which is subscribed to GNU Mailman.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-coders @
categoriespython
postedMar 21, '10 at 6:22p
activeMar 29, '10 at 2:09p
posts11
users2
websitelist.org

People

Translate

site design / logo © 2022 Grokbase