Diagnostics

This page shows some tests which make it easier to hunt down why things are not working as they should

Table of contents

Email settings
Git
Subversion
Trac

Email support correctly configured:

  • [test:!diag.email_commit_set

    The 'commit_email_from' option is used when sending commit emails. This will be set as the 'From:' field and the envelope.

    If no 'commit_email_from' is set, the mail is sent from a warning email address. This does not always work. To ensure delivery to everyone (and because it looks nicer), please consider setting it to a sane value. To set the commit_email_from, run the following command:

    submin2-admin [val subminenv] config set commit_email_from "Submin <submin@example.tld>"
    ]
  • [test:diag.email_commit_set
  • [test:!diag.email_commit_sane

    The 'commit_email_from' option is used when sending commit emails. This will be set as the 'From:' field and the envelope. It should contain a name and a valid email address between angle brackets, e.g. Submin <submin@example.tld>

    The current value is: [val diag.email_commit_current_value]

    To set the commit_email_from option, run the following command:

    submin2-admin [val subminenv] config set commit_email_from "Submin <submin@example.tld>"
    ]
  • ]
  • [test:!diag.email_from_set

    The 'smtp_from' option is the From: email address used when sending account (re)set emails.

    If no 'smtp_from' is set, the mail is sent from 'root@localhost'. This does not always work. To ensure delivery to everyone (and because it looks nicer), please consider setting it to a sane value. To set the smtp_from, run the following command:

    submin2-admin [val subminenv] config set smtp_from "Submin <submin@example.tld>"
    ]
  • [test:diag.email_from_set
  • [test:!diag.email_from_sane

    The 'smtp_from' option is the From: email address used when sending account (re)set emails. It should contain a name and a valid email address between angle brackets, e.g. Submin <submin@example.tld>

    The current value is: [val diag.email_from_current_value]

    To set the commit_email_from option, run the following command:

    submin2-admin [val subminenv] config set smtp_from "Submin <submin@example.tld>"
    ]
  • ]
  • [test:!diag.email_might_work_smtp_from

    There are probably (see disclaimer below) problems sending email:

    [val diag.email_might_work_smtp_from_msg]

    For normal sending (not this test) Submin will first try to send via SMTP with the various smtp_* options (using sane defaults if not set). If that fails, it will fallback to local (via sendmail executable).

    For this test only SMTP will be tested if smtp_hostname is set, otherwise only local will be tested.

    Due to the nature of e-mail, you will only find out if you can send e-mail by actually sending an e-mail. This test does not send e-mails to prevent annoyance. Therefore, these tests are very limited and can only give an indication; If this test does not detect any problem, it does not guarantee that the email will be deliverd, and if this test does detect a problem in some cases there is none. YMMV.

    ]

Git support working correctly:

  • [test:diag.enabled_git To disable, run the following command: submin2-admin [val subminenv] config set vcs_plugins svn] [else To enable, run the following command: submin2-admin [val subminenv] git init]
  • [test:diag.enabled_git
  • [test:!diag.git_dir_set

    To set the git_dir, run the following command:

    submin2-admin [val subminenv] config set git_dir git
    ]
  • [@test:!diag.git_dir_perms

    The following subdirs of git_dir have wrong permissions:

      [iter:diag.git_dir_perms_wrong
    • [ival.dir] ([ival.reason])
    • ]

    They should be either:

    • owned by git-user:web-user and have at least rwx permissions for 'user' and r-x permissions for 'group' (final git dir, subdirs)
    • have at least r-x permissons for 'other' (subdirs)
    ]
  • [test:!diag.git_hooks_all_new

    The following repositories have outdated hooks:

      [iter:diag.git_old_hook_repos
    • [ival.0] ([ival.1])
    • ]

    They can be upgraded with:

    submin2-admin [val subminenv] git hook update reponame

    If you want to upgrade all repositories at once, run the following command:

    submin2-admin [val subminenv] git hook update (note: without any repository name)
    ]
  • [test:!diag.git_admin_test

    Could not issue admin commands through SSH. Error message:

    [val diag.git_admin_test_errmsg]

    1) Run 'git init'

    Have you run 'git init' yet? This command is necessary since it needs root privileges (to add a unix user and to set permissions).

    submin2-admin [val subminenv] git init

    2) Re-run diagnostics

    After running 'git init', please re-run diagnostics to see if this solved the problem. If not, continue

    3) Check config

    Please check that git_ssh_host_internal, git_ssh_port and git_user are setup correctly. You can check this with:

    submin2-admin [val subminenv] config get value

    4) Check if SSH can connect

    Next check that you can actually connect to SSH:

    ssh [val diag.git_user]@[val diag.git_ssh_host_internal] -p [val diag.git_ssh_port] -i [val subminenv]/conf/id_dsa

    (it should give a message like: submin2-admin git admin is not supposed to be called by users.)

    ]
  • [test:!diag.git_hostname_ok

    The 'git_ssh_host' config is not set, or it is set to a local address. Is 'git init' run? If not, do this first before re-checking:

    submin2-admin [val subminenv] git init

    If 'git init' has been run and the problem still exists, please set a hostname reachable by everyone with the following command:

    submin2-admin [val subminenv] config set git_ssh_host public_hostname
    ]
  • ]

Svn support working correctly:

  • [test:diag.enabled_svn To disable, run the following command: submin2-admin [val subminenv] config set vcs_plugins git] [else To enable, run the following command: submin2-admin [val subminenv] config set vcs_plugins git,svn]
  • [test:diag.enabled_svn
  • [test:!diag.svn_dir_set

    To set the svn_dir, run the following command:

    submin2-admin [val subminenv] config set svn_dir svn
    ]
  • [test:!diag.svn_apache_modules_exec_ok
  • Could not execute apachectl or load the server-info URL to test if modules are loaded. Error message was:

    [val diag.svn_apache_modules_errmsg]

    If the above commands all fail with 'No such file or directory', then maybe the 'apachectl' binary is named differently on your system. Please report this as a bug.

    If the above commands can be found, but fail to verify because 'apachectl' complains about lack of permissions, you can make sure that the apache module 'info' is loaded and reachable from localhost. Submin will then try to get the list of modules from the 'info' modules by retrieving a URL.

    By default, this URL is 'http://localhost/server-info?list', but if you need to change it for some reason, you can do so with the following command: submin2-admin [val subminenv] config set apache_server_info_url "http://localhost/server-info?list"

    If the 'internal URL get' fails this URL could not be used, please check the error message there and try to correct the error.

  • ][else [iter:diag.svn_apache_modules
  • [test:!ival
    The module '[ikey]' was not loaded. Please make sure it is.
    ]
  • ] ] ]

Trac support working correctly:

  • [test:diag.enabled_trac To disable, run the following command: submin2-admin [val subminenv] config set enabled_trac no] [else To enable, run the following command: submin2-admin [val subminenv] config set enabled_trac yes]
  • [test:diag.enabled_trac
  • [test:!diag.installed_trac

    The 'trac-admin' command was not found, please install Trac. If you have installed Trac, but it cannot be found, check if the env_path config value is set correctly:

    submin2-admin [val subminenv] config get env_path.

    Set it with:

    submin2-admin [val subminenv] config set env_path yourpath
    ]
  • [test:!diag.trac_dir_set

    To set the trac_dir, run the following command:

    submin2-admin [val subminenv] config set trac_dir trac
    ]
  • [test:!diag.trac_acl_hook

    The variable 'acl_hook' has not been set. It probably works on the defaults, but leaving it unconfigured can cause slow down during commits because of DNS resolving if trac sync is enabled. We recommend setting the ACL like this:

    submin2-admin [val subminenv] config set acl_hook [val diag.trac_acl_hook_recommendation]

    ]
  • [test:!diag.trac_sync_access

    Git hook does not have access to submin to sync trac. Please make sure that the IP-address is in the ACL. Set it with:

    submin2-admin [val subminenv] config set acl_hook [val diag.trac_acl_hook_recommendation]

    The error message was:

    [val diag.trac_sync_access_msg]
    ]
  • [test:diag.trac_htpasswd_file [test:!diag.trac_htpasswd_dir_exists

    The setting htpasswd_file is set, but the directory does not exist. To export the htpasswd_file, please make sure that [val diag.trac_htpasswd_dir] exists.

    ] ][else

    The setting htpasswd_file is not set. We will not export an htpasswd file for trac. If you don't use tracd for running your trac-environment you are probably fine. Otherwise, please point htpasswd_file to the proper location for your password file.

    ]
  • [test:!diag.trac_envs_all_connected

    The following Trac environments are orphaned:

      [iter:diag.trac_envs_orphaned
    • [ival]
    • ]

    No repository is found that connects to them (should be the same name as the trac name). Maybe it is the result of a deleted repository?

    ]
  • [test:!diag.trac_envs_complete

    The following Trac environments have missing/incorrect configuration. Please correct the values to the one below:

      [iter:diag.trac_envs_missing_config
    • [ival.trac_env] (Trac admin panel)
      • [iter:ival.missing_configs \[[ikey]\] [iter:ival [ival.option] = [ival.value] ][test:!ilast ]]
        The trac.ini file is: [val diag.trac_dir]/[ival.trac_env]/conf/trac.ini
    • ]

    Options from the 'components' section can be enabled in its Trac admin panel (Trac may ask you to login first). Other options have to be configured in the trac.ini of the corresponding trac environment.

    ]
  • ]