{"action":"created","issue":{"url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/298","repository_url":"https://api.github.com/repos/pgbackrest/pgbackrest","labels_url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/298/comments","events_url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/298/events","html_url":"https://github.com/pgbackrest/pgbackrest/issues/298","id":197408093,"number":298,"title":"cannot create stanza","user":{"login":"sebastianwebber","id":2515929,"avatar_url":"https://avatars.githubusercontent.com/u/2515929?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastianwebber","html_url":"https://github.com/sebastianwebber","followers_url":"https://api.github.com/users/sebastianwebber/followers","following_url":"https://api.github.com/users/sebastianwebber/following{/other_user}","gists_url":"https://api.github.com/users/sebastianwebber/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianwebber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianwebber/subscriptions","organizations_url":"https://api.github.com/users/sebastianwebber/orgs","repos_url":"https://api.github.com/users/sebastianwebber/repos","events_url":"https://api.github.com/users/sebastianwebber/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianwebber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-23T18:01:47Z","updated_at":"2016-12-29T18:05:46Z","closed_at":null,"body":"Hi there,\r\n\r\nPerhaps this issue is related to #289.\r\n\r\nI created a simple lab to test this issue. I have created 3 virtual machines: `masterdb`, `slavedb` and `pgbackrest`. `masterdb` contains the postgresql 9.3 server, and de `slavedb` it's a standby from the `masterdb`.\r\n\r\n**I'm trying to run a backup on the standby server.**\r\n\r\nOn the `pgbackrest` machine, i updated the `/etc/hosts` with:\r\n\r\n```bash\r\n[postgres@pgbackrest ~]$ cat /etc/hosts\r\n...\r\n192.168.100.100 master\r\n192.168.100.150 slave\r\n```\r\n\r\nThen, when i try to create the stanza:\r\n\r\n```bash\r\n[postgres@pgbackrest ~]$ pgbackrest --stanza=default --log-level-console=info stanza-create\r\n2016-12-23 15:53:58.206 P00   INFO: stanza-create start 1.11: --db-host=master --db-path=/var/lib/pgsql/9.3/data/ --db-user=postgres --db2-host=slave --db2-path=/var/lib/pgsql/9.3/data/ --db2-user=postgres --log-level-console=info --repo-path=/var/lib/pgbackrest --stanza=default\r\n2016-12-23 15:53:58.554 P00  ERROR: [116]: remote process terminated on master host: no error on stderr\r\n2016-12-23 15:53:58.555 P00   INFO: stanza-create stop\r\n```\r\n------\r\nMy `/etc/pgbackrest.conf` file:\r\n\r\n```bash\r\n-bash-4.2$ cat /etc/pgbackrest.conf\r\n[default]\r\ndb1-host=master\r\ndb1-user=postgres\r\ndb1-path=/var/lib/pgsql/9.3/data/\r\ndb2-host=slave\r\ndb2-user=postgres\r\ndb2-path=/var/lib/pgsql/9.3/data/\r\n\r\n[global]\r\nrepo-path=/var/lib/pgbackrest\r\nretention-full=1\r\nbackup-standby=y\r\n```\r\n------\r\nI can connect through ssh with the public key without issues:\r\n\r\n```bash\r\n[postgres@pgbackrest ~]$ ssh master hostname\r\nmasterdb\r\n[postgres@pgbackrest ~]$ ssh slave hostname\r\nslavedb\r\n```\r\n----\r\ntrace output:\r\n\r\n```bash\r\n[postgres@pgbackrest ~]$ pgbackrest --stanza=default --log-level-console=trace stanza-create\r\n2016-12-23 15:56:58.426 P00   INFO: stanza-create start 1.11: --db-host=master --db-path=/var/lib/pgsql/9.3/data/ --db-user=postgres --db2-host=slave --db2-path=/var/lib/pgsql/9.3/data/ --db2-user=postgres --log-level-console=trace --repo-path=/var/lib/pgbackrest --stanza=default\r\n2016-12-23 15:56:58.452 P00  TRACE:         Stanza->new()\r\n2016-12-23 15:56:58.452 P00  TRACE:         Stanza->new=>: self = [object]\r\n2016-12-23 15:56:58.452 P00  TRACE:         Stanza->process()\r\n2016-12-23 15:56:58.452 P00  TRACE:         Stanza->stanzaCreate()\r\n2016-12-23 15:56:58.452 P00  DEBUG:     Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [undef], strRemoteType = none\r\n2016-12-23 15:56:58.452 P00  DEBUG:     Protocol::Protocol::protocolGet: create local protocol\r\n2016-12-23 15:56:58.452 P00  TRACE:         Protocol::Common->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressNetworkLevel = 3, iProtocolTimeout = 1830, strName = [undef]\r\n2016-12-23 15:56:58.452 P00  TRACE:         Protocol::Common->new=>: self = [object]\r\n2016-12-23 15:56:58.452 P00  TRACE:         Protocol::Protocol::protocolGet=>: oProtocol = [object]\r\n2016-12-23 15:56:58.452 P00  DEBUG:     File->new(): oProtocol = [object], strBackupPath = /var/lib/pgbackrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strStanza = default\r\n2016-12-23 15:56:58.452 P00  TRACE:         File->new=>: self = [object]\r\n2016-12-23 15:56:58.452 P00  DEBUG:     Db->new(): iRemoteIdx = 1\r\n2016-12-23 15:56:58.452 P00  DEBUG:     Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db\r\n2016-12-23 15:56:58.453 P00  DEBUG:     Protocol::Protocol::protocolGet: create (cached) remote protocol\r\n2016-12-23 15:56:58.453 P00  DEBUG:     Protocol::RemoteMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = /usr/bin/pgbackrest --buffer-size=4194304 --command=stanza-create --compress-level=6 --compress-level-network=3 --protocol-timeout=1830 --repo-path=/var/lib/pgbackrest --stanza=default --type=db remote, strCommandSSH = ssh, strHost = master, strRemoteType = db, strUser = postgres\r\n2016-12-23 15:56:58.453 P00  DEBUG:     Protocol::CommonMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no postgres@master '/usr/bin/pgbackrest --buffer-size=4194304 --command=stanza-create --compress-level=6 --compress-level-network=3 --protocol-timeout=1830 --repo-path=/var/lib/pgbackrest --stanza=default --type=db remote', strId = master, strName = remote, strRemoteType = db\r\n2016-12-23 15:56:58.453 P00  TRACE:         Protocol::Common->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressNetworkLevel = 3, iProtocolTimeout = 1830, strName = remote\r\n2016-12-23 15:56:58.453 P00  TRACE:         Protocol::Common->new=>: self = [object]\r\n2016-12-23 15:56:58.453 P00  TRACE:         Protocol::IO->new3(): iBufferMax = 4194304, iProtocolTimeout = 1830, strCommand = ssh -o LogLevel=error -o Compression=no -o PasswordAuthentication=no postgres@master '/usr/bin/pgbackrest --buffer-size=4194304 --command=stanza-create --compress-level=6 --compress-level-network=3 --protocol-timeout=1830 --repo-path=/var/lib/pgbackrest --stanza=default --type=db remote', strId = master\r\n2016-12-23 15:56:58.463 P00  TRACE:         Protocol::IO->new(): hErr = *Symbol::GEN0, hIn = *Symbol::GEN2, hOut = *Symbol::GEN1, iBufferMax = 4194304, iProtocolTimeout = 1830, pId = 4193, strId = master\r\n2016-12-23 15:56:58.463 P00  TRACE:         Protocol::IO->new=>: self = [object]\r\n2016-12-23 15:56:58.463 P00  TRACE:         Protocol::IO->new3=>: self = [object]\r\n2016-12-23 15:56:58.758 P00  TRACE:         Protocol::CommonMaster->outputRead(): bOutputRequired = <false>, bSuppressLog = [undef], bWarnOnError = <false>\r\n2016-12-23 15:56:58.758 P00  TRACE:         Protocol::CommonMaster->outputRead=>: strOutput = [undef]\r\n2016-12-23 15:56:58.758 P00  TRACE:         Protocol::CommonMaster->new=>: self = [object]\r\n2016-12-23 15:56:58.758 P00  TRACE:         Protocol::RemoteMaster->new=>: self = [object]\r\n2016-12-23 15:56:58.758 P00  TRACE:         Protocol::Protocol::protocolGet=>: oProtocol = [object]\r\n2016-12-23 15:56:58.758 P00  TRACE:         Db->new=>: self = [object]\r\n2016-12-23 15:56:58.758 P00  DEBUG:     Db->configValidate(): strDbPath = /var/lib/pgsql/9.3/data/\r\n2016-12-23 15:56:58.758 P00  DEBUG:     Db->info(): strDbPath = /var/lib/pgsql/9.3/data/\r\n2016-12-23 15:56:58.758 P00  DEBUG:     File->new(): oProtocol = [object], strBackupPath = /var/lib/pgbackrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strStanza = default\r\n2016-12-23 15:56:58.758 P00  TRACE:         File->new=>: self = [object]\r\n2016-12-23 15:56:58.759 P00  TRACE:         File->isRemote(): strPathType = db:absolute\r\n2016-12-23 15:56:58.759 P00  TRACE:         File->pathTypeGet(): strType = db:absolute\r\n2016-12-23 15:56:58.759 P00  TRACE:         File->pathTypeGet=>: strPath = db\r\n2016-12-23 15:56:58.759 P00  TRACE:         File->isRemote=>: bRemote = true\r\n2016-12-23 15:56:58.759 P00  TRACE:         dbInfo: remote (,db-path=/var/lib/pgsql/9.3/data/)\r\n2016-12-23 15:56:58.759 P00  TRACE:         Protocol::CommonMaster->cmdWrite(): oParamRef = [hash], strCommand = dbInfo\r\n2016-12-23 15:56:58.759 P00  TRACE:         Protocol::CommonMaster->cmdWrite: strCommand = dbInfo:\r\n                                            db-path=/var/lib/pgsql/9.3/data/\r\n                                            end\r\n2016-12-23 15:56:58.759 P00  ERROR: [116]: remote process terminated on master host: no error on stderr\r\n2016-12-23 15:56:58.760 P00  TRACE:         File->DESTROY()\r\n2016-12-23 15:56:58.760 P00  TRACE:         File->DESTROY=>\r\n2016-12-23 15:56:58.760 P00  TRACE:         Db->DESTROY()\r\n2016-12-23 15:56:58.760 P00  TRACE:         Db->DESTROY=>\r\n2016-12-23 15:56:58.760 P00  TRACE:         File->DESTROY()\r\n2016-12-23 15:56:58.760 P00  TRACE:         File->DESTROY=>\r\n2016-12-23 15:56:58.760 P00  DEBUG:     Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef]\r\n2016-12-23 15:56:58.760 P00   INFO: stanza-create stop\r\n2016-12-23 15:56:58.761 P00  DEBUG:     Protocol::Protocol::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef]\r\n2016-12-23 15:56:58.761 P00  DEBUG:     Protocol::Protocol::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = db\r\n2016-12-23 15:56:58.761 P00  TRACE:         Protocol::CommonMaster->close(): bComplete = false\r\n2016-12-23 15:56:58.761 P00  TRACE:         Protocol::CommonMaster->close=>: iExitStatus = 0\r\n2016-12-23 15:56:58.761 P00  TRACE:         Protocol::CommonMaster->close(): bComplete = <false>\r\n2016-12-23 15:56:58.761 P00  TRACE:         Protocol::CommonMaster->close=>: iExitStatus = 0\r\n2016-12-23 15:56:58.761 P00  DEBUG:     Protocol::Protocol::protocolDestroy=>: iExitStatus = 0\r\n2016-12-23 15:56:58.761 P00  DEBUG:     Common::Lock::lockRelease(): bFailOnNoLock = false\r\n2016-12-23 15:56:58.761 P00  TRACE:         Common::Lock::lockRelease=>\r\n2016-12-23 15:56:58.761 P00  DEBUG:     Common::Exit::exitSafe=>: iExitCode = 116\r\n```\r\n\r\nI'm doing something wrong here?  any tips to solve this issue?\r\n"},"comment":{"url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/comments/269668903","html_url":"https://github.com/pgbackrest/pgbackrest/issues/298#issuecomment-269668903","issue_url":"https://api.github.com/repos/pgbackrest/pgbackrest/issues/298","id":269668903,"user":{"login":"cmwshang","id":18215932,"avatar_url":"https://avatars.githubusercontent.com/u/18215932?v=3","gravatar_id":"","url":"https://api.github.com/users/cmwshang","html_url":"https://github.com/cmwshang","followers_url":"https://api.github.com/users/cmwshang/followers","following_url":"https://api.github.com/users/cmwshang/following{/other_user}","gists_url":"https://api.github.com/users/cmwshang/gists{/gist_id}","starred_url":"https://api.github.com/users/cmwshang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmwshang/subscriptions","organizations_url":"https://api.github.com/users/cmwshang/orgs","repos_url":"https://api.github.com/users/cmwshang/repos","events_url":"https://api.github.com/users/cmwshang/events{/privacy}","received_events_url":"https://api.github.com/users/cmwshang/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T18:05:46Z","updated_at":"2016-12-29T18:05:46Z","body":"We have seen issues before with SELinux and VMs/Docker Containers (and not with just pgbackrest but other software) even when the enforcement is supposedly disabled. We also found it usually helped to delete the directory so that it could be recreated properly. Glad that worked for you as well. "}}
{"actor":{"display_login":"cmwshang"}}