Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Synchronized projects over RSE connections

Currently RSE does not expose "exec" connections - it only has "shell" connections. Which means that the connection dumps echo, shell prompts and such.

Currently I have this implementation that can actually synchronize & compile the project over the remote connection - https://github.com/NVIDIA/ptp-nsight/commit/28993d3a80e3b984265abc70586f8ce6f146072c

What this implementation does is (by using internal RSE APIs) it detects if the connection is RSE/SSH, then it obtains JSch channel and works with that channel directly. I am currently testing the implementation but so far found no new unique issues.

I don't know if this would work with non-SSH RSE connections and I don't have time to test it right now. I believe the proper fix would be to use "exec" channel for RSE IShellService::runCommand - but I don't know how involving that would be.

Currently it looks like we will build on top of this hack for our projects (e.g. fix bugs, implement enhancements). We would gladly contribute this to PTP (and all subsequent fixes) if there is any interest. I can also try to implement any suggestions if there are any.

Best regards,
Eugene

On Jun 10, 2013, at 7:21 PM, Roland Schulz <roland@xxxxxxx> wrote:

> Hi,
> 
> we use connection.getRemoteServices().getProcessBuilder(connection,
> commandList).start() in
> org.eclipse.ptp.internal.rdt.sync.git.core.GitRemoteSyncConnection.PTPSession.exec(String,
> int)
> which calls org.eclipse.rse.services.shells.IShellService.runCommand(String,
> String, String[], IProgressMonitor) from
> org.eclipse.ptp.internal.remote.rse.core.RSEProcessBuilder.launchCommandWithRSE(String,
> String) and org.eclipse.rse.services.shells.IHostShell.getStandardOutputReader()
> from org.eclipse.ptp.internal.remote.rse.core.RSEProcess.RSEProcess(IHostShell,
> boolean).
> 
> For some reason this returns the "Last login" before returning the
> command output.
> See also http://eclipse.1072660.n5.nabble.com/RSEProcessBuilder-td24657.html
> 
> I think it doesn't make sense that RSE returns this login message.
> Instead it should only return the command output the same way as
> RemoteTools behave. Even if RSE considers this a feature and not a
> bug, I think this should be fixed in how the
> org.eclipse.ptp.internal.remote.rse.core.RSEProcess works not how sync
> executes commands.
> 
> Any hints on why RSE behaves this way, whether this behavior can be
> changed, and how other people who executes command over RSE deal with
> that would be appreciated.
> 
> I would assume that if this issue is fixed it should work over RSE.
> But given that this never worked, I can't say for sure.
> 
> Roland
> 
> 
> On Mon, Jun 10, 2013 at 8:16 PM, Eugene Ostroukhov
> <eostroukhov@xxxxxxxxxx> wrote:
>> Dear PTP developers,
>> our product currently relies on RSE for our remote development needs (e.g.
>> we need the RSE perspective, remote debugging uses RSE connections, we also
>> tie our per-connection settings to RSE). Now we are looking to add
>> synchronized projects support to our product.
>> 
>> I am currently building PTP and JGit plugins from head. When I am trying to
>> build my synchronized project on another system I get:
>> org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException:
>> org.eclipse.jgit.errors.TransportException: Invalid packet line header: Last
>> at
>> org.eclipse.ptp.internal.rdt.sync.git.core.GitRemoteSyncConnection.sync(GitRemoteSyncConnection.java:912)
>> at
>> org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:443)
>> at
>> org.eclipse.ptp.internal.rdt.sync.core.SyncRunner.synchronize(SyncRunner.java:38)
>> … yada-yada-yada …
>> Caused by: org.eclipse.jgit.errors.TransportException: Invalid packet line
>> header: Last
>> at
>> org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:182)
>> at
>> org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:269)
>> at
>> org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
>> … yada-yada-yada …
>> 
>> I traced this problem, apparently what happens is that JGit receives
>> unexpected "Last login … " SSH greeting. The code is trying to read packet
>> length message (I see a sequence of "0000" at a later point - though I'm not
>> sure if that's what JGit expects). I can build fine if I use "remote tools"
>> connection.
>> 
>> My questions:
>> 1. Is RSE integration complete and in working order?
>> 2. If not, is there a list of outstanding issues or some notes? We can
>> prepare necessary patches if needed.
>> 
>> Best regards,
>> Eugene
>> ________________________________
>> This email message is for the sole use of the intended recipient(s) and may
>> contain confidential information.  Any unauthorized review, use, disclosure
>> or distribution is prohibited.  If you are not the intended recipient,
>> please contact the sender by reply email and destroy all copies of the
>> original message.
>> ________________________________
> 
> 
> 
> -- 
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev



Back to the top