Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code reloading on remote nodes #207

Closed
wireless-net opened this issue Dec 12, 2014 · 9 comments
Closed

Code reloading on remote nodes #207

wireless-net opened this issue Dec 12, 2014 · 9 comments

Comments

@wireless-net
Copy link

Hi,

Does code reloading on remote nodes (on another machine) work? As a test, I have created a simple module like so:

-module(testing).
-export([dotest/0]).

dotest() ->
io:format("test...~n").

Also setup run configuration for my remote (already running) node. I can run it and it loads and works:
(remote@dbl)1> testing:dotest().
test...
ok

Then I change the code to this and save it:
dotest() ->
io:format("test2...~n").

But I still see this:
(remote@dbl)2> testing:dotest().
test...
ok

Looking at output from the console I see this every time I make a change:

11:27:38,102 I: (InternalBuilder.java:81) : USAGE: build: Start test: AUTO
11:27:38,107 F: (InternalBuilder.java:193) : Will compile 1 resource(s)
11:27:38,152 F: (BuilderHelper.java:399) : compiling testing.erl
11:27:38,178 F: (BuilderHelper.java:553) : :: loading testing in remote@dbl
11:27:38,257 I: (InternalBuilder.java:117) : USAGE: build: Done test took 155

So it looks like it loads the code, but somehow it isn't??

Any ideas?

@wireless-net
Copy link
Author

Sorry forgot to mention I am running the latest release of Erlide along with OTP 17.

@vladdu
Copy link
Collaborator

vladdu commented Dec 13, 2014

Thanks for the report. I tried it with 0.29.6 and it worked fine. It's possible that it's the same issue as in the other ticket you opened. Please attach the full log.

@wireless-net
Copy link
Author

Hi Vlad,

Here's everything I see from the console:

(java:22682): Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth",

(java:22682): Gtk-WARNING *: Unable to locate theme engine in module_path: "smooth",
11:07:13,030 F: (BackendActivator.java:19) : Backend plugin starting
11:07:13,038 F: (ErlangPlugin.java:73) : Core starting
11:07:13,066 I: (ErlangCore.java:58) : Erlide log is in /home/dbutter/workspace3
11:07:13,072 I: (ErlangCore.java:64) : Starting CORE Thread[main,6,main]
11:07:13,076 I: (ErlangCore.java:79) : *
* starting Erlide v0.29.6.201411211407 (core=0.24.11.201411211407) (model api=0.24.11.201411211407) *** (UTF-8) ui
11:07:13,083 I: (ErlangCore.java:86) : Started CORE
11:07:13,083 F: (ErlangPlugin.java:88) : Core started
11:07:14,086 F: (ErlangHostnameRetriever.java:40) : Test long hostname: null
11:07:14,088 W: (ErlangHostnameRetriever.java:46) : Can't use null as long name
11:07:15,063 F: (ErlangHostnameRetriever.java:40) : Test long hostname: db
11:07:16,087 W: (ErlangHostnameRetriever.java:46) : Can't use db as long name
11:07:16,377 F: (ErlangHostnameRetriever.java:40) : Test short hostname: db
11:07:16,393 F: (HostnameUtils.java:74) : Detected:: db && null
11:07:16,415 F: (BackendActivator.java:25) : Backend plugin started
11:07:16,419 I: (ErlideUIPlugin.java:130) : Starting UI Thread[main,6,main]
11:07:16,422 F: (ModelActivator.java:19) : Starting Erlang model api
11:07:16,439 F: (BackendFactory.java:43) : Create ide backend 17.0.0
11:07:16,439 F: (BackendFactory.java:57) : Create backend 65bea_dbutter_c3854_erlide
11:07:16,486 F: (ManagedOtpNodeProxy.java:62) : START node :> [/usr/lib/erlang/bin/erl, -sname, 65bea_dbutter_c3854_erlide@db, -setcookie, erlide] *** /home/dbutter/workspace3
11:07:16,487 F: (OtpNodeProxy.java:309) : Runtime 65bea_dbutter_c3854_erlide@db starting
11:07:16,497 F: (OtpNodeProxy.java:214) : 65bea_dbutter_c3854_erlide@db: waiting connection to peer...
11:07:17,012 F: (OtpNodeProxy.java:314) : Runtime 65bea_dbutter_c3854_erlide@db running
11:07:17,122 F: (LogEventHandler.java:27) : info: {"Monitoring java node",jerlide_50c388d@db}
11:07:17,123 F: (LogEventHandler.java:27) : info: {"Start monitor process: ",10000000,50000000}
11:07:17,204 F: (ModelActivator.java:30) : Started model api
11:07:17,220 I: (ErlideUIPlugin.java:152) : Started UI
11:07:25,935 F: (BackendFactory.java:50) : Create build backend 17
11:07:25,936 F: (BackendFactory.java:57) : Create backend 17_65bea_dbutter_c5d70
11:07:25,938 F: (OtpNodeProxy.java:309) : Runtime 17_65bea_dbutter_c5d70@db starting
11:07:25,938 F: (ManagedOtpNodeProxy.java:62) : START node :> [/usr/lib/erlang/bin/erl, -sname, 17_65bea_dbutter_c5d70@db, -setcookie, erlide] *** /home/dbutter/workspace3
11:07:25,945 F: (OtpNodeProxy.java:214) : 17_65bea_dbutter_c5d70@db: waiting connection to peer...
11:07:26,460 F: (OtpNodeProxy.java:314) : Runtime 17_65bea_dbutter_c5d70@db running
11:07:26,562 F: (LogEventHandler.java:27) : info: {"Monitoring java node",jerlide_50c5d76@db}
11:07:26,564 F: (LogEventHandler.java:27) : info: {"Start monitor process: ",10000000,50000000}
11:07:26,602 F: (ErlTextHover.java:296) : otp doc {error,error}
11:08:01,999 F: (RuntimeTab.java:371) : state.mode=LOCAL_STANDALONE, state.host=NONE
11:08:02,059 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:02,063 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:02,063 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:02,064 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:18,847 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:18,859 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:18,871 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:18,882 F: (RuntimeTab.java:371) : state.mode=REMOTE, state.host=SHORT
11:08:31,383 F: (InternalBuilder.java:202) : Will compile 1 resource(s)
11:08:31,786 F: (BackendManager.java:90) : create execution backend remote@dbl
11:08:31,787 F: (BackendFactory.java:57) : Create backend remote@dbl
11:08:31,788 F: (OtpNodeProxy.java:309) : Runtime remote@dbl starting
11:08:31,790 F: (OtpNodeProxy.java:214) : remote@dbl: waiting connection to peer...
11:08:31,919 F: (OtpNodeProxy.java:314) : Runtime remote@dbl running
11:08:31,966 F: (CodeManager.java:84) : loading org.erlide.tracing.ttbe_0.1.12.201411211407 [687] for erlang
11:08:31,979 F: (CodeManager.java:84) : loading org.erlide.kernel.common_0.24.12.201411211407 [673] for erlang
11:08:31,997 F: (CodeManager.java:84) : loading org.erlide.tracing.erlang_0.2.14.201411211407 [685] for erlang
11:08:32,033 S: (Backend.java:113) : Bad RPC: {badrpc,{'EXIT',{undef,[{erlide_common_app,init,[#Pidjerlide_50d5ead@db.1.0,false,10,50,4],[]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,205}]}]}}}
org.erlide.runtime.rpc.RpcException: Bad RPC: {badrpc,{'EXIT',{undef,[{erlide_common_app,init,[#Pidjerlide_50d5ead@db.1.0,false,10,50,4],[]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,205}]}]}}}
at org.erlide.runtime.internal.rpc.OtpRpc.call(OtpRpc.java:159)
at org.erlide.runtime.internal.rpc.OtpRpc.call(OtpRpc.java:173)
at org.erlide.runtime.internal.rpc.OtpRpc.call(OtpRpc.java:248)
at org.erlide.backend.internal.Backend.startErlideApps(Backend.java:96)
at org.erlide.backend.internal.Backend.initErlang(Backend.java:132)
at org.erlide.backend.internal.Backend.initialize(Backend.java:324)
at org.erlide.backend.internal.BackendFactory.createBackend(BackendFactory.java:66)
at org.erlide.backend.internal.BackendManager.createExecutionBackend(BackendManager.java:91)
at org.erlide.backend.launch.ErlangLaunchDelegate.launch(ErlangLaunchDelegate.java:57)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:883)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
11:08:32,089 F: (ErlConsoleManager.java:50) : console ADDED to org.erlide.backend.api.BackendData@6881a240

Thanks for your help!

Regards, Devin

@vladdu
Copy link
Collaborator

vladdu commented Dec 13, 2014

So it worked in the beginning (at least it connected to the remote node) and suddenly started giving this error? You didn't change anything just then? I mean the two tickets are probably the same issue?

@wireless-net
Copy link
Author

What's strange is that loading the module and running it did work initially but updates to the module code did not work. However, now initial loading doesn't work either (hence the second ticket). I have tried with new workspaces, and even uninstalling/reinstalling eclipse but even this has not made a difference. Very strange.

Connecting to a node started on the same machine does work without the badrpc error. The issue seem to be just with nodes on another machine. However, I can establish a remote shell to that node on the other machine using erl just fine.

If it were some configuration corruption issue, would removing the workspace and starting over be enough, or is there some other place eclipse keeps configuration files?

@vladdu
Copy link
Collaborator

vladdu commented Dec 13, 2014

Ok, thanks, I think I could reproduce it, I'll see what is going on.

@vladdu
Copy link
Collaborator

vladdu commented Dec 13, 2014

I found that problem. Still not sure why it worked for you in the beginning, but for me it was because the two machines had identical file systems, so beam files were found. Working on a fix.

@vladdu
Copy link
Collaborator

vladdu commented Dec 14, 2014

fixed

@vladdu vladdu closed this as completed Dec 14, 2014
@vladdu vladdu added ready and removed in progress labels Dec 14, 2014
vladdu added a commit to vladdu/erlide_eclipse that referenced this issue Dec 14, 2014
Now always reloading by sending binary, works for remote nodes.
@wireless-net
Copy link
Author

Nice work! Confirmed this one is fixed. Remote load, and update working well now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants