Skip to content

Troubleshoot

Yoann Valeri edited this page Mar 15, 2023 · 10 revisions

In this section we will describe common questions and issues, and how to resolve them.

Connection to database failed: FATAL: database "phobos" does not exist or failed: relation "media" does not exist when attempting to use Phobos

The problem is that the database and tables where not properly set, use the following command to do so:

sudo -u postgres scripts/phobos_db_local setup_db -s -d <database name> -p phobos

This will use the script provided by Phobos (in scripts/phobos_db_local) to setup the DB. It needs to be run as the postgres user because only it can create databases. You then ask the script to setup the database with the name you provided (for instance, phobos_test for our own testing) and create the user phobos to access it.


Cannot contact 'phobosd': will abort: Transport endpoint is not connected when trying to put or get objects

The phobosd hasn't been started, use the following command:

systemctl start phobosd

Cannot PUT '<file>' to objid(s) '<oid>' (No space left on device) when trying to put an object

This issue can stem from multiple sources, but the main ones are that the medium you are trying to put the object on wasn't unlocked and/or formatted, or that you didn't specify the family to use. Check the below points in order and try putting data after each to see if your issue is solved.

  • If you use the list command of the medium type you want to use (for instance, phobos dir list) and see that its adm_status is locked, you must unlock your medium by using:
# phobos <medium type> unlock <medium name>
phobos dir unlock <dir name>
  • If you use the same list command and see that its fs.status is blank, you must format your medium by using:
# phobos <medium type> format <medium name>
phobos dir format <dir name>
  • Specify at put the family you want to use. If not specified, it will use the one in the configuration file by default, which may not be the family you want. For instance, to put on a directory, use:
phobos put --family dir <file name> <object id>
  • At this point, try again your put command. If it still fails, then it most likely is that your media do not have enough space left. To know this, check the stats.logc_spc_used and stats.phys_spc_free columns of the list command for the medium type you want to use, and compare them to the size of the data you want to put. To rectify this, either add more media of that type, or try using another type.

Invalid argument when trying to use the SCSI library

If you check the phobos logs when seeing this error, and see this:

<WARNING> SCSI ERROR: scsi_masked_status=0x1, adapter_status=0, driver_status=0x8
<WARNING> req_sense_error=0x70, sense_key=0x5 (Illegal Request)
<WARNING> asc=0x24, ascq=0 (Additional sense: Invalid field in cbd)
<ERROR> Sense key 0x5 (converted to -22): Invalid argument
<ERROR> scsi_element_status failed for type 'drives': Invalid argument

The issue comes from a tape library limitation. For some type of tape libraries, for instance IBM libraries, you can't query a drive's serial number and it's volume label in the same request. To prevent this, Phobos can separate the query in two by activating the parameter 'sep_sn_query' in the [lib_scsi] section, with the value either 0 to not separate the requests or 1 to separate them.

[lib_scsi]
sep_sn_query = 0

When this modification to the configuration file is done, restart the daemon, and try your put again.

Clone this wiki locally