---
name: "serrno"
section: "3"
platform: "linux"
package: "liblcgdm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/serrno"
---

# serrno(3)

LCG internal error variable

## NAME

**serrno** - LCG internal error variable

## SYNOPSIS

**#include \<***serrno.h***\>**

**extern int** *serrno***;**\
 **extern char \*sstrerror(int** *serrno\_value* **);**\
 **extern void sperror(char \*** *message* **);**

## DESCRIPTION

The **serrno** variable is the LCG's equivalent to system error variable **errno**. This variable, accessible only trough LCG API's and related functions below is guaranteed to be thread-safe.\
 The serrno variable is divided into common values and per package values, that are:

- **COPYTAPE**

  - **DB**

  \- Database

- **MSG**

  \- Message daemon

- **NS**

  \- Name server

- **RFIO**

  \- Remote File I/O

- **RTCOPY**

  \- Remote Tape Copy

- **STAGE**

  \- Stager

- **SYSREQ**

  - **TAPE**

  \- Tape operations

- **VMGR**

  \- Volume Manager

- **VDQM**

  \- Volume and Drive Queue Manager

- **RMC**

  \- Remote SCSI Media Changer Server

- **MON**

  \- Monitoring

- **UPV**

  \- User Privilege

- **DPM**

  \- Disk Pool Manager

- **SECURITY**

  ## COMMON ERRORS

The following error values might be returned by any package:

- **SENOSHOST**

  (1001) Host unknown

- **SENOSSERV**

  (1002) Service unknown

- **SENOTRFILE**

  (1003) Not a remote file

- **SETIMEDOUT**

  (1004) Has timed out

- **SEBADFFORM**

  (1005) Bad fortran format specifier

- **SEBADFOPT**

  (1006) Bad fortran option specifier

- **SEINCFOPT**

  (1007) Incompatible fortran options

- **SENAMETOOLONG**

  (1008) File name too long

- **SENOCONFIG**

  (1009) Can't open configuration file

- **SEBADVERSION**

  (1010) Version ID mismatch

- **SEUBUF2SMALL**

  (1011) User buffer too small

- **SEMSGINVRNO**

  (1012) Invalid reply number

- **SEUMSG2LONG**

  (1013) User message too long

- **SEENTRYNFND**

  (1014) Entry not found

- **SEINTERNAL**

  (1015) Internal error

- **SECONNDROP**

  (1016) Connection closed by rem. end

- **SEBADIFNAM**

  (1017) Can't get interface name

- **SECOMERR**

  (1018) Communication error

- **SENOMAPDB**

  (1019) Can't open mapping database

- **SENOMAPFND**

  (1020) No user mapping

- **SERTYEXHAUST**

  (1021) Retry count exhausted

- **SEOPNOTSUP**

  (1022) Operation not supported

- **SEWOULDBLOCK**

  (1023) Resource temporarily unavailable

- **SEINPROGRESS**

  (1024) Operation now in progress

- **SECTHREADINIT**

  (1025) Cthread initialization error

- **SECTHREADERR**

  (1026) Thread interface call error

- **SESYSERR**

  (1027) System error

- **SEADNSINIT**

  (1028) adns\_init() error

- **SEADNSSUBMIT**

  (1029) adns\_submit() error

- **SEADNS**

  (1030) adns resolving error

- **SEADNSTOOMANY**

  (1031) adns returned more than one entry

- **SENOTADMIN**

  (1032) requestor is not administrator

- **SEUSERUNKN**

  (1033) User unknown

- **SEDUPKEY**

  (1034) Duplicate key value

- **SEENTRYEXISTS**

  (1035) The entry already exists

- **SEGROUPUNKN**

  (1036) Group Unknown

- **SECHECKSUM**

  (1037) Bad checksum

- **SELOOP**

  (1038) Too many symbolic links encountered

## COPYTAPE ERRORS

None yet

## DB ERRORS

The following error values are returned only by the database package:

- **EDB\_A\_ESESSION**

  (1201) Cdb api           : invalid session

- **EDB\_A\_EDB**

  (1202) Cdb api           : invalid db

- **EDB\_A\_EINVAL**

  (1203) Cdb api           : invalid value

- **EDB\_A\_RESHOST**

  (1204) Cdb api           : host res error

- **EDB\_A\_TOOMUCH**

  (1205) Cdb api           : data size rejected

- **EDB\_AS\_SOCKET**

  (1206) Cdb api    system : socket() error

- **EDB\_AS\_SOCKOPT**

  (1207) Cdb api    system : \[set/get\]sockopt() error

- **EDB\_AS\_MALLOC**

  (1208) Cdb api    system : malloc() error

- **EDB\_A\_NOERROR**

  (1209) Cdb api           : no last error

- **EDB\_A\_IEINVAL**

  (1200) Cdb api           : interface invalid value

- **EDB\_AS\_BIND**

  (1201) Cdb api           : bind() error

- **EDB\_AS\_LISTEN**

  (1202) Cdb api           : listen() error

- **EDB\_AS\_GETSOCKNAME**

  (1203) Cdb api         : getsockname() error

- **EDB\_AS\_ACCEPT**

  (1204) Cdb api           : accept() error

- **EDB\_AS\_GETPEERNAME**

  (1205) Cdb api        : getpeername() error

- **EDB\_A\_WHOISIT**

  (1206) Cdb api        : Connection from bad host

- **EDB\_D\_EINVAL**

  (1220) Cdb daemon        : invalid value

- **EDB\_D\_EAGAIN**

  (1221) Cdb daemon        : yet done

- **EDB\_D\_AUTH**

  (1222) Cdb daemon        : unauthorized

- **EDB\_D\_LOGIN**

  (1223) Cdb daemon        : login refused

- **EDB\_D\_PWDCORR**

  (1224) Cdb daemon        : pwd file corrupted

- **EDB\_D\_ANA**

  (1225) Cdb daemon        : db analysis error

- **EDB\_D\_HASHSIZE**

  (1226) Cdb daemon        : bad hash size

- **EDB\_D\_UNKNOWN**

  (1227) Cdb daemon        : unkn. db/table/key

- **EDB\_D\_NOLOCK**

  (1228) Cdb daemon        : lock is required

- **EDB\_D\_CORRUPT**

  (1229) Cdb daemon        : probably corrupted

- **EDB\_D\_TOOMUCH**

  (1230) Cdb daemon        : data size rejected

- **EDB\_D\_ENOENT**

  (1231) Cdb daemon        : no entry

- **EDB\_D\_ETYPE**

  (1232) Cdb daemon        : unknown member type

- **EDB\_D\_EVALUE**

  (1233) Cdb daemon        : unknown member val

- **EDB\_D\_NULLVALUE**

  (1234) Cdb daemon        : null member value

- **EDB\_D\_LOCK**

  (1235) Cdb daemon        : cannot gain lock

- **EDB\_D\_FREE**

  (1236) Cdb daemon        : unsafe free attempt

- **EDB\_D\_SHUTDOWN**

  (1237) Cdb daemon        : shutdown in progress

- **EDB\_D\_DEADLOCK**

  (1238) Cdb daemon        : shutdown in progress

- **EDB\_D\_EXIST**

  (1239) Cdb daemon        : yet exists

- **EDB\_D\_NOSPC**

  (1240) Cdb daemon        : no more space

- **EDB\_D\_DUMPEND**

  (1241) Cdb daemon        : end of dump

- **EDB\_D\_UNIQUE**

  (1242) Cdb daemon        : uniqued key yet exist

- **EDB\_D\_LISTEND**

  (1243) Cdb daemon        : end of list

- **EDB\_D\_NOTDUMP**

  (1244) Cdb daemon        : not in dump mode

- **EDB\_D\_DNSCHECK**

  (1245) Cdb daemon        : double DNS check error

- **EDB\_D\_REJECTED**

  (1246) Cdb daemon        : Connection rejected (not authorised)

- **EDB\_D\_INIT**

  (1247) Cdb daemon        : init in progress

- **EDB\_D\_INCONST**

  (1248) Cdb daemon        : Cdb daemon        : inconsistent request (unstop and no previous stop, unfreeze and no previous freeze)

- **EDB\_D\_FREEHASHSIZE**

  (1249) Cdb daemon        : bad free hash size

- **EDB\_DS\_MALLOC**

  (1250) Cdb daemon system : malloc() error

- **EDB\_DS\_CALLOC**

  (1251) Cdb daemon system : calloc() error

- **EDB\_DS\_REALLOC**

  (1252) Cdb daemon system : realloc() error

- **EDB\_DS\_OPEN**

  (1253) Cdb daemon system : open() error

- **EDB\_DS\_FSTAT**

  (1254) Cdb daemon system : fstat() error

- **EDB\_DS\_LSEEK**

  (1255) Cdb daemon system : lseek() error

- **EDB\_DS\_READ**

  (1256) Cdb daemon system : read() error

- **EDB\_DS\_WRITE**

  (1257) Cdb daemon system : write() error

- **EDB\_DS\_RENAME**

  (1258) Cdb daemon system : rename() error

- **EDB\_DS\_FTRUNC**

  (1259) Cdb daemon system : ftruncate() error

- **EDB\_DS\_TMPNAM**

  (1260) Cdb daemon system : tmpnam() error

- **EDB\_DS\_FCNTL**

  (1261) Cdb daemon system : fcntl() error

- **EDB\_DS\_MKDIR**

  (1262) Cdb daemon system : mkdir() error

- **EDB\_DS\_TIMES**

  (1263) Cdb daemon system : times() error

- **EDB\_DS\_SYSCONF**

  (1264) Cdb daemon system : sysconf() err/unav

- **EDB\_DS\_GETHOSTNAME**

  (1265) Cdb daemon system : gethostname() error

- **EDB\_DS\_GETPEERNAME**

  (1266) Cdb daemon system : getpeername() error

- **EDB\_DS\_INET\_NTOA**

  (1267) Cdb daemon system : getpeername() error

- **EDB\_DS\_REMOVE**

  (1268) Cdb daemon system : remove() error

- **EDB\_DS\_SIGACTION**

  (1269) Cdb daemon system : sigaction() error

- **EDB\_DS\_GETSOCKNAME**

  (1270) Cdb daemon system : getsockname() error

- **EDB\_DS\_BIND**

  (1271) Cdb daemon system : bind() error

- **EDB\_DS\_LISTEN**

  (1272) Cdb daemon system : listen() error

- **EDB\_DS\_CONNECT**

  (1273) Cdb daemon system : connect() error

- **EDB\_DS\_SOCKET**

  (1274) Cdb daemon system : socket() error

- **EDB\_DS\_SOCKOPT**

  (1275) Cdb daemon system : \[set/get\]sockopt() error

- **EDB\_D\_RESHOST**

  (1276) Cdb daemon     : host res error

- **EDB\_D\_REQSIZE**

  (1277) Cdb daemon     : request too big

- **EDB\_C\_EINVAL**

  (1280) Cdb config        : invalid value

- **EDB\_C\_ENOENT**

  (1281) Cdb config        : configuration error

- **EDB\_C\_TOOMUCH**

  (1282) Cdb config        : conf. size rejected

- **EDB\_CS\_GETHOSTNAME**

  (1283) Cdb config system : gethostname() error

- **EDB\_NOMOREDB**

  (1290) Cdb : nomoredb (the API retries automatically in such a case so you should never see this error number)

## MSG ERRORS

The following error values are returned only by the message package:

- **EMSMSGU2REP**

  (1301) msg daemon unable to reply

- **EMSMSGSYERR**

  (1302) msg daemon system error

- **EMSNOPERM**

  (1303) Permission denied

## NS ERRORS

The following error values are returned only by the name server package:

- **ENSNACT**

  (1401) name server not active or service being drained

## RFIO ERRORS

The following error values are returned only by the remote file I/O package:

- **ERFNORCODE**

  (1501) RFIO communication error

- **ERFHOSTREFUSED**

  (1502) RFIO rejected connect attempt

- **ERFXHOST**

  (1503) Cross-host link (rename())

- **ERFPROTONOTSUP**

  (1504) RFIO protocol not supported

## RTCOPY ERRORS

The following error values are returned only by the remote tape copy package:

- **ERTTMSERR**

  (1601) TMS call failed

- **ERTBLKSKPD**

  (1602) Blocks were skipped in file

- **ERTTPE\_LSZ**

  (1603) Blocks skipped and file truncated

- **ERTMNYPARY**

  (1604) Too many skipped blocks

- **ERTLIMBYSZ**

  (1605) File limited by size

- **ERTUSINTR**

  (1606) Request interrupted by user

- **ERTOPINTR**

  (1607) Request interrupted by operator

- **ERTNOTCLIST**

  (1608) Request list is not circular

- **ERTBADREQ**

  (1609) Bad request structure

## STAGE ERRORS

The following error values are returned only by the stager package:

- **ESTCLEARED**

  (1701) aborted by stageclr

- **ESTENOUGHF**

  (1702) enough free space

- **ESTLNKNCR**

  (1703) symbolic link not created

- **ESTLNKNSUP**

  (1704) symbolic link not supported

- **ESTNACT**

  (1705) Stager not active

- **ESTGROUP**

  (1706) Your group is invalid

- **ESTGRPUSER**

  (1707) No GRPUSER in configuration

- **ESTUSER**

  (1708) Invalid user

- **ESTHSMHOST**

  (1709) HSM HOST not specified

- **ESTTMSCHECK**

  (1710) tmscheck error

- **ESTLINKNAME**

  (1711) User link name processing error

- **ESTWRITABLE**

  (1712) User path in a non-writable directory

- **ESTKILLED**

  (1713) aborted by kill

- **ESTMEM**

  (1714) request too long (api)

- **ESTCONF**

  (1715) stage configuration error

## SYSREQ ERRORS

The following error value is returned only by the sysreq package:

- **ESQTMSNOTACT**

  (1801) TMS not active

## TAPE ERRORS

The following error values are returned only by the tape package:

- **ETDNP**

  (1901) daemon not available

- **ETSYS**

  (1902) system error

- **ETPRM**

  (1903) bad parameter

- **ETRSV**

  (1904) reserv already issued

- **ETNDV**

  (1905) too many drives requested

- **ETIDG**

  (1906) invalid device group name

- **ETNRS**

  (1907) reserv not done

- **ETIDN**

  (1908) no drive with requested characteristics

- **ETLBL**

  (1909) bad label structure

- **ETFSQ**

  (1910) bad file sequence number

- **ETINTR**

  (1911) interrupted by user

- **ETEOV**

  (1912) EOV found in multivolume set

- **ETRLSP**

  (1913) release pending

- **ETBLANK**

  (1914) blank tape

- **ETCOMPA**

  (1915) compatibility problem

- **ETHWERR**

  (1916) device malfunction

- **ETPARIT**

  (1917) parity error

- **ETUNREC**

  (1918) unrecoverable media error

- **ETNOSNS**

  (1919) no sense

- **ETRSLT**

  (1920) reselect server

- **ETVBSY**

  (1921) volume busy or inaccessible

- **ETDCA**

  (1922) drive currently assigned

- **ETNRDY**

  (1923) drive not ready

- **ETABSENT**

  (1924) volume absent

- **ETARCH**

  (1925) volume archived

- **ETHELD**

  (1926) volume held or disabled

- **ETNXPD**

  (1927) file not expired

- **ETOPAB**

  (1928) operator cancel

- **ETVUNKN**

  (1929) volume unknown

- **ETWLBL**

  (1930) wrong label type

- **ETWPROT**

  (1931) cartridge write protected

- **ETWVSN**

  (1932) wrong vsn

- **ETBADMIR**

  (1933) Tape has a bad MIR

## VMGR ERRORS

The following error values are returned only by the volume manager package:

- **EVMGRNACT**

  (2001) volume manager not active or service being drained

## VDQM ERRORS

The following error values are returned only by the volume and drive queue manager package:

- **EVQSYERR**

  (2101) Failed system call

- **EVQINCONSIST**

  (2102) Internal DB inconsistency

- **EVQREPLICA**

  (2103) DB replication failed

- **EVQNOVOL**

  (2104) No volume request queued

- **EVQNODRV**

  (2105) No free drive available

- **EVQNOSVOL**

  (2106) Specified vol. req. not found

- **EVQNOSDRV**

  (2107) Specified drv. req. not found

- **EVQALREADY**

  (2108) Specified vol. req. already exists

- **EVQUNNOTUP**

  (2109) Unit not up

- **EVQBADSTAT**

  (2110) Bad unit status request

- **EVQBADID**

  (2111) Incorrect vol.req or job ID

- **EVQBADJOBID**

  (2112) Incorrect job ID

- **EVQNOTASS**

  (2113) Unit not assigned

- **EVQBADVOLID**

  (2114) Attempt to mount with wrong VOLID

- **EVQREQASS**

  (2115) Attempt to delete an assigned req

- **EVQDGNINVL**

  (2116) Vol. req. for non-existing DGN

- **EVQPIPEFULL**

  (2117) Replication pipe is full

- **EVQHOLD**

  (2118) Server is held

- **EVQEOQREACHED**

  (2119) End of query reached

## RMC ERRORS

The following error values are returned only by the Remote SCSI media changer server package:

- **ERMCNACT**

  (2201) Remote SCSI media changer server not active or service being drained

- **ERMCRBTERR**

  (2202) Remote SCSI media changer error

- **ERMCUNREC**

  (2203) Remote SCSI media changer unrec. error

- **ERMCSLOWR**

  (2204) Remote SCSI media changer error (slow retry)

- **ERMCFASTR**

  (2205) Remote SCSI media changer error (fast retry)

- **ERMCDFORCE**

  (2206) Remote SCSI media changer error (demount force)

- **ERMCDDOWN**

  (2207) Remote SCSI media changer error (drive down)

- **ERMCOMSGN**

  (2208) Remote SCSI media changer error (ops message)

- **ERMCOMSGS**

  (2209) Remote SCSI media changer error (ops message + retry)

- **ERMCOMSGR**

  (2210) Remote SCSI media changer error (ops message + wait)

- **ERMCUNLOAD**

  (2211) Remote SCSI media changer error (unload + demount)

## MON ERRORS

The following error values are returned only by the Monitoring package:

- **EMON\_SYSTEM**

  (2301) System error

- **EMON\_NO\_HOST**

  (2302) Monitor Host not specified

- **EMON\_NO\_PORT**

  (2303) Monitor Port not specified

- **EMON\_NO\_CLIENTPORT**

  (2304) No port for client requests defined in the configuration

## UPV ERRORS

The following error values are returned only by the User Privilege Validation package:

- **ECUPVNACT**

  (2401) UPV not active or service being drained

## DPM ERRORS

The following error values are returned only by the Disk Pool Manager package:

- **EDPMNACT**

  (2601) DPM not active or service being drained

## SECURITY ERRORS

The following error values are returned only by the Security package:

- **ESEC\_SYSTEM**

  (2701) System error in the security package

- **ESEC\_BAD\_CREDENTIALS**

  (2702) Bad credentials

- **ESEC\_NO\_CONTEXT**

  (2703) Could not establish context

- **ESEC\_BAD\_MAGIC**

  (2704) Bad magic number

- **ESEC\_NO\_USER**

  (2705) Could not map username to uid/gid

- **ESEC\_NO\_PRINC**

  (2706) Could not map principal to username

- **ESEC\_NO\_SECMECH**

  (2707) Could not load security mechanism

- **ESEC\_CTX\_NOT\_INITIALIZED**

  (2708) Context not initialized

- **ESEC\_PROTNOTSUPP**

  (2709) Security protocol not supported

- **ESEC\_NO\_SVC\_NAME**

  (2710) Service name not set

- **ESEC\_NO\_SVC\_TYPE**

  (2711) Service type not set

- **ESEC\_NO\_SECPROT**

  (2712) Could not lookup security protocol

- **ESEC\_BAD\_CSEC\_VERSION**

  (2713) Csec incompatability

- **ESEC\_BAD\_PEER\_RESP**

  (2714) Unexpected response from peer

## AUTHOR

**LCG Grid Deployment** Team
