Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
Hi Ron, We did actually fix this issue for the new update that is coming soon. Let me know if you have any issues with your fix and I can give you the updated version of that file. Thanks, Patrick On Friday, August 21, 2015, Cohen, Ronald wrote: > I think the attached code I edited fixes this problem. > > Ron > --- > Ronald Cohen > Geophysical Laboratory > Carnegie Institution > 5251 Broad Branch Rd., N.W. > Washington, D.C. 20015 > rco...@carnegiescience.edu > office: 202-478-8937 > skype: ronaldcohen > https://twitter.com/recohen3 > https://www.linkedin.com/profile/view?id=163327727 > > > On Fri, Aug 21, 2015 at 12:08 PM, Cohen, Ronald > > wrote: > > Unfortunately the CLI is not correct! I get: > > > > Warning: "Optimizer::Update: Error loading structure at > > /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/" > > > > and when I look at that directory I find on the client: > > > > ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/ > > 3x00051 job.sh structure.state xtal.in > > ucfbcoh@tomcat:~/src/xtalopt2/build$ ls > > /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/3x00051/ > > job.sh pwscf.save xtal.in xtal.out > > > > I had fixed this also long ago, but it is back again. It is storing > > one directory down. > > > > Ron > > > > --- > > Ronald Cohen > > Geophysical Laboratory > > Carnegie Institution > > 5251 Broad Branch Rd., N.W. > > Washington, D.C. 20015 > > rco...@carnegiescience.edu > > office: 202-478-8937 > > skype: ronaldcohen > > https://twitter.com/recohen3 > > https://www.linkedin.com/profile/view?id=163327727 > > > > > > On Fri, Aug 21, 2015 at 1:48 AM, Ronald Cohen > > > wrote: > >> I switched to the CLI ssh and so far no problems! I guess it is a > problem > >> with sshlib. > >> Ron > >> Sent from my iPad > >> > >> On Aug 17, 2015, at 9:41 AM, David Lonie > wrote: > >> > >> On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald < > rco...@carnegiescience.edu > > >> wrote: > >>> > >>> I had fixed this in an earlier version but don't remember how. > >>> Sometimes the connection to the server or nameserver goes down (about > >>> once a day) and I see an error like: > >>> > >>> SSHConnectionLibSSH::isConnected(): server timeout. > >>> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or > >>> service not known) > >>> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" > >>> Warning: "Cannot connect to ssh server" > >> > >> > >> If you're having issues resolving hosts, there's not much that can be > done > >> about that from the XtalOpt side of things. Might be VPN related? > >> > >> Dave > >> > >> > -- > >> > >> ___ > >> Avogadro-Discuss mailing list > >> Avogadro-Discuss@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/avogadro-discuss > -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
I think the attached code I edited fixes this problem. Ron --- Ronald Cohen Geophysical Laboratory Carnegie Institution 5251 Broad Branch Rd., N.W. Washington, D.C. 20015 rco...@carnegiescience.edu office: 202-478-8937 skype: ronaldcohen https://twitter.com/recohen3 https://www.linkedin.com/profile/view?id=163327727 On Fri, Aug 21, 2015 at 12:08 PM, Cohen, Ronald wrote: > Unfortunately the CLI is not correct! I get: > > Warning: "Optimizer::Update: Error loading structure at > /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/" > > and when I look at that directory I find on the client: > > ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/ > 3x00051 job.sh structure.state xtal.in > ucfbcoh@tomcat:~/src/xtalopt2/build$ ls > /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/3x00051/ > job.sh pwscf.save xtal.in xtal.out > > I had fixed this also long ago, but it is back again. It is storing > one directory down. > > Ron > > --- > Ronald Cohen > Geophysical Laboratory > Carnegie Institution > 5251 Broad Branch Rd., N.W. > Washington, D.C. 20015 > rco...@carnegiescience.edu > office: 202-478-8937 > skype: ronaldcohen > https://twitter.com/recohen3 > https://www.linkedin.com/profile/view?id=163327727 > > > On Fri, Aug 21, 2015 at 1:48 AM, Ronald Cohen > wrote: >> I switched to the CLI ssh and so far no problems! I guess it is a problem >> with sshlib. >> Ron >> Sent from my iPad >> >> On Aug 17, 2015, at 9:41 AM, David Lonie wrote: >> >> On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald >> wrote: >>> >>> I had fixed this in an earlier version but don't remember how. >>> Sometimes the connection to the server or nameserver goes down (about >>> once a day) and I see an error like: >>> >>> SSHConnectionLibSSH::isConnected(): server timeout. >>> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or >>> service not known) >>> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" >>> Warning: "Cannot connect to ssh server" >> >> >> If you're having issues resolving hosts, there's not much that can be done >> about that from the XtalOpt side of things. Might be VPN related? >> >> Dave >> >> -- >> >> ___ >> Avogadro-Discuss mailing list >> Avogadro-Discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/avogadro-discuss /** SSHConnection - Connection to an ssh server for execution, sftp, etc. Copyright (C) 2010-2012 by David C. Lonie This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ***/ #ifdef ENABLE_SSH #include #include #include #include namespace GlobalSearch { SSHConnectionCLI::SSHConnectionCLI(SSHManagerCLI *parent) : SSHConnection(parent) { } SSHConnectionCLI::~SSHConnectionCLI() { } bool SSHConnectionCLI::execute(const QString &command, QString &stdout_str, QString &stderr_str, int &exitcode) { return this->executeSSH(command, QStringList(), &stdout_str, &stderr_str, &exitcode); } bool SSHConnectionCLI::copyFileToServer(const QString &localpath, const QString &remotepath) { return this->executeSCPTo(localpath, remotepath); } bool SSHConnectionCLI::copyFileFromServer(const QString &remotepath, const QString &localpath) { return this->executeSCPFrom(remotepath, localpath); } bool SSHConnectionCLI::readRemoteFile(const QString &filename, QString &contents) { return this->executeSSH("cat", QStringList(filename), &contents); } bool SSHConnectionCLI::removeRemoteFile(const QString &filename) { return this->executeSSH("rm", QStringList(filename)); } bool SSHConnectionCLI::copyDirectoryToServer(const QString &localpath, const QString &remotepath) { QStringList args ("-p "); args << remotepath; this->executeSSH("mkdir", args); QString arg1; arg1 = remotepath + "/.." ; return this->executeSCPTo(localpath, arg1, QStringList("-r")); } bool SSHConnectionCLI::copyDirectoryFromServer(const QString &remotepath, const QString &localpath) { QStringList args ("-p "); args << localpath; this->executeSSH(
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
Unfortunately the CLI is not correct! I get: Warning: "Optimizer::Update: Error loading structure at /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/" and when I look at that directory I find on the client: ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/ 3x00051 job.sh structure.state xtal.in ucfbcoh@tomcat:~/src/xtalopt2/build$ ls /home/ucfbcoh/XTALOPT/C12H12/200GPa//3x00051/3x00051/ job.sh pwscf.save xtal.in xtal.out I had fixed this also long ago, but it is back again. It is storing one directory down. Ron --- Ronald Cohen Geophysical Laboratory Carnegie Institution 5251 Broad Branch Rd., N.W. Washington, D.C. 20015 rco...@carnegiescience.edu office: 202-478-8937 skype: ronaldcohen https://twitter.com/recohen3 https://www.linkedin.com/profile/view?id=163327727 On Fri, Aug 21, 2015 at 1:48 AM, Ronald Cohen wrote: > I switched to the CLI ssh and so far no problems! I guess it is a problem > with sshlib. > Ron > Sent from my iPad > > On Aug 17, 2015, at 9:41 AM, David Lonie wrote: > > On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald > wrote: >> >> I had fixed this in an earlier version but don't remember how. >> Sometimes the connection to the server or nameserver goes down (about >> once a day) and I see an error like: >> >> SSHConnectionLibSSH::isConnected(): server timeout. >> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or >> service not known) >> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" >> Warning: "Cannot connect to ssh server" > > > If you're having issues resolving hosts, there's not much that can be done > about that from the XtalOpt side of things. Might be VPN related? > > Dave > > -- > > ___ > Avogadro-Discuss mailing list > Avogadro-Discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/avogadro-discuss -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
I switched to the CLI ssh and so far no problems! I guess it is a problem with sshlib. Ron Sent from my iPad > On Aug 17, 2015, at 9:41 AM, David Lonie wrote: > >> On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald >> wrote: >> I had fixed this in an earlier version but don't remember how. >> Sometimes the connection to the server or nameserver goes down (about >> once a day) and I see an error like: >> >> SSHConnectionLibSSH::isConnected(): server timeout. >> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or >> service not known) >> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" >> Warning: "Cannot connect to ssh server" > > If you're having issues resolving hosts, there's not much that can be done > about that from the XtalOpt side of things. Might be VPN related? > > Dave > -- > ___ > Avogadro-Discuss mailing list > Avogadro-Discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/avogadro-discuss -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
No, it is a xtalopt error. There is no problem for any other application or the command line. I suspect the call is timing out (in a very short amount of time) and not trying again. Ron --- Ronald Cohen Geophysical Laboratory Carnegie Institution 5251 Broad Branch Rd., N.W. Washington, D.C. 20015 rco...@carnegiescience.edu office: 202-478-8937 skype: ronaldcohen https://twitter.com/recohen3 https://www.linkedin.com/profile/view?id=163327727 On Mon, Aug 17, 2015 at 9:41 AM, David Lonie wrote: > On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald > wrote: >> >> I had fixed this in an earlier version but don't remember how. >> Sometimes the connection to the server or nameserver goes down (about >> once a day) and I see an error like: >> >> SSHConnectionLibSSH::isConnected(): server timeout. >> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or >> service not known) >> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" >> Warning: "Cannot connect to ssh server" > > > If you're having issues resolving hosts, there's not much that can be done > about that from the XtalOpt side of things. Might be VPN related? > > Dave > > -- > > ___ > Avogadro-Discuss mailing list > Avogadro-Discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/avogadro-discuss > -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
I can do it myself againi guess my changes from some years ago didn't stick. What is needed is to loop with say 60 second sleeps after testing for success from ssh. Even if a server or network is down for hours then xtalopt won't skip a beat and jobs will complete and be tallied from the server as soon as the network comes back. Sincerely, Ron Sent from my iPad > On Aug 17, 2015, at 9:41 AM, David Lonie wrote: > >> On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald >> wrote: >> I had fixed this in an earlier version but don't remember how. >> Sometimes the connection to the server or nameserver goes down (about >> once a day) and I see an error like: >> >> SSHConnectionLibSSH::isConnected(): server timeout. >> SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or >> service not known) >> "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" >> Warning: "Cannot connect to ssh server" > > If you're having issues resolving hosts, there's not much that can be done > about that from the XtalOpt side of things. Might be VPN related? > > Dave > -- > ___ > Avogadro-Discuss mailing list > Avogadro-Discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/avogadro-discuss -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss
Re: [Avogadro-Discuss] XTALOPT hangs if server connection lost
On Fri, Aug 14, 2015 at 4:35 PM, Cohen, Ronald wrote: > I had fixed this in an earlier version but don't remember how. > Sometimes the connection to the server or nameserver goes down (about > once a day) and I see an error like: > > SSHConnectionLibSSH::isConnected(): server timeout. > SSH error: Failed to resolve hostname legion.rc.ucl.ac.uk (Name or > service not known) > "Cannot connect to ssh server ucfb...@legion.rc.ucl.ac.uk:22" > Warning: "Cannot connect to ssh server" > If you're having issues resolving hosts, there's not much that can be done about that from the XtalOpt side of things. Might be VPN related? Dave -- ___ Avogadro-Discuss mailing list Avogadro-Discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/avogadro-discuss