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

boincmgr.exe --namehost or /n does not work on Windows #2739

Closed
txcanyon opened this issue Oct 6, 2018 · 20 comments
Closed

boincmgr.exe --namehost or /n does not work on Windows #2739

txcanyon opened this issue Oct 6, 2018 · 20 comments

Comments

@txcanyon
Copy link

txcanyon commented Oct 6, 2018

I have not been able to get the --namehost or /n flags to work on my computer running a VM and trying to connect to the boinc running inside the VM

Connecting through the Manager gui "File -> Select Computer" works fine

if I attempt to connect to the VM from my Linux Mint machine using the correct syntax for linux:
boincmgr -n 192.168.2.22, it does connect properly

Neither the current version 7.12.1 nor the previous 7.10.2 work

my command line is pretty simple: C:\Archives\Boinc\boincmgr.exe /n 192.168.2.22 C:\Archives\Boinc\boincmgr.exe --namehost=192.168.2.22 does not work either

I have used the --verbose flag and it does not seem to work either as none of the err files are showing anything unless they are meant for the client not the manager, but I get no errors at all on the screen using either command-line. However if I type the flag wrong, it will give me a popup and tell me the argument

@AenBleidd
Copy link
Member

Was not able to reproduce this local debug version (7.14.1) and remote boinc client running on RasperryPi:
image

@txcanyon
Copy link
Author

txcanyon commented Oct 8, 2018

Reproducable on 7.14.0. I did not realize that there was a new version. It still does not work. I get no error messages, is there any way to enable a log to get it to show what the manager is doing?

@AenBleidd
Copy link
Member

What OS do you have inside VM?
Are you sure you pass the password correct?

@RichardHaselgrove
Copy link
Contributor

I've reproduced this across a LAN (Windows --> Windows). No error messages found in either the BOINC data directory or AppData.

@AenBleidd
Copy link
Member

Ok, in Debug mode it works fine. I'll try to reproduce this in Release mode later this evening

@RichardHaselgrove
Copy link
Contributor

Correction - I was testing across the LAN, with the BOINC client already running on the local machine. I used the /nd flag, described by --help as

/nd, --no-daemon Don't run the client

to prevent clashes. Testing again without /md, but - in both cases - supplying the GUI RPC password, it connected as expected.

Maybe the behaviour of /nd should be considered. In remote mode, the Manager can't start the client anyway: maybe its apparent separate role in "don't connect to running client" should be documented.

@AenBleidd
Copy link
Member

It makes no sense to use /nd flag because it affects local client only. If address and password are specified boincmgr should not try to start local client. This behavior should be verified also.

@txcanyon
Copy link
Author

txcanyon commented Oct 8, 2018

Adding /nd has no effect on outcome.
To reiterate the setup I am trying to get to work:
Host OS: Windows 10; IP=192.168.2.2
Guest OS: Ubuntu 18.04.1 inside Hyper-V with dedicated Intel 1000PT network card; IP 192.168.2.22

I do not have a GUI password set, but for giggles I manually set a simple 5 letter password, restarted the boinc-client inside the VM and reconnected manually with password and success as expected. When using the /p or --password= on a command line it does not connect and as previously reported there is no log to view on my end. Shouldn't there be to diagnose issues such as these?

Edit: I just tested from another Windows 10 machine and I get the same outcome. Linux boinc_mgr is working fine regardless of the destination OS the client is running on; Win 10 or Linux all success
W10 -> W10 = fail
W10 -> Linux (VM) = fail
W10 -> Linux = fail
Linux -> Linux = pass

@AenBleidd
Copy link
Member

I tried next scenario with 7.12.1 on both machines:
Environment 1: Windows 7, GUI RPC on, password set
Environment 2: Windows 10.
Both environments are separate physical machines within the same LAN
From Environment 2 I've successfully connected to environment 1 setting namehost and password.

@RichardHaselgrove, could you please share your steps to reproduce this?

Thanks

@txcanyon
Copy link
Author

txcanyon commented Oct 8, 2018

Ok, seemed to have narrowed down something.

If I install to the default suggested directory "\Program Files\Boinc" it WILL connect automatically.
If I install to something else ie C:\Archives\Boinc it WILL NOT connect automatically

@RichardHaselgrove
Copy link
Contributor

I was trying with two Windows 7 machines, both on same LAN with local 192.168.x.y addressing. Using your numbering,

Environment 1 is downstairs, logged in, BOINC started from Manager, Manager minimised, monitor off.

Environment 2 is my daily monitoring machine, runs BoincView (so I can see the status of Env1 at all times), also runs BOINC client autostarted by Manager.

Both machines have the same GUI RPC password set - which may become relevant later.

For testing, I exited the manager on Env2, leaving the client running. I opened a command window at the BOINC programs directory, and tested various permutations of

boincmgr /n hostname /p password /nd
(including replacing hostname with ipaddress)

Consistently, NO connection was made to the remote (Env1) machine when (and only when) /nd was on the command line.

Connection was made with /n hostname /p password (as it should), and also - to my surprise - with just /n hostname. That should have caused an error, but maybe the use of the same password on both machines avoided that - the running client or registry entry for the data directory may have supplied the necessary access to the local password.

Both machines are set to display the exit dialog. Manager windows with remote connections in general do not show the exit dialog, but in this test there was one exception: with /n hostname /nd, the exit dialog appeared when exiting the Manager for the next test.

@RichardHaselgrove
Copy link
Contributor

@txcanyon

If I install...

That sounds like your program location. Did you test any changes to the data directory location?

W10 -> W10 = fail
W10 -> Linux (VM) = fail
W10 -> Linux = fail

That sounds as if the second W10 machine isn't authorised as a 'remote manager' in the remote_hosts.cfg file for the clients you're trying to reach.

@txcanyon
Copy link
Author

txcanyon commented Oct 8, 2018

It is authorized because if I manually connect it works fine. The /n flag is the hangup, I can always connect manually via File -> Select Computer

If I use the localclient (host machine) from that same C:\Archives\Boinc (and ..\Data) it will start the local client and connect fine.

The issues may be that my Data directory falls under the actual Boinc directory, but I dont understand why this is an issue (coding issue beyond my skill level)
C:\Archives\Boinc
C:\Archives\Boinc\Data

Default suggested location:
C:\Program Files\BOINC
C:\ProgramData\BOINC

I take that back, it does not work

@AenBleidd
Copy link
Member

@RichardHaselgrove, pr #2745 should fix your case. Please, review it

@AenBleidd
Copy link
Member

AenBleidd commented Oct 11, 2018

Ok, tried to reproduce this.
My environment:
Host machine: Windows 7 x64, BOINC Manager 7.14.1
Guest machine on VirtualBox: Ubuntu 16.04, BOINC client 7.14.1 (don't look at the version in BOINC Manager, BOINC client was build from master branch)
BOINC Managet started from command line with namehost and password specified.
Everything works fine.
image

@txcanyon
Copy link
Author

Just tried a brand new install of Win10 build 1607. Boinc 7.14.2

Installed Boinc to default directory. Tried /n 192.168.2.21 and --namehost=192.168.2.21. It does not connect
.21 is a linux system running Ubuntu 18.04.01. If I select it manually from within the Manager, it connects fine.

There must be something going on with W10 if you're having success on W7.

@AenBleidd
Copy link
Member

Same results for Win10 (BOINC Manager 7.12.1 used)

image

@AenBleidd AenBleidd added this to the Client/Manager 8.0 milestone Oct 12, 2018
@txcanyon
Copy link
Author

txcanyon commented Oct 17, 2018

So found a little headway here. I reinstalled W10 a 3rd time. I did NOT reinstall Boinc post W10 reinstall but used the previous install directory. I ran boincmgr.exe from \boinc_old

It connects!!! No matter what my destination was, either a VM on the same machine or another on the local network, boingmgr.exe /n 192.168.2.x /p password connected perfectly.

So I saw the new 7.14.2 devlopment build and installed it. Now I CANNOT connect via /n no matter the install location; it does not connect via command line
So new install does not work
and now the old install no longer works

Uninstalling Boinc does not resolve it. No matter what even running boincmgr.exe /n from the previous old directory no long works. So there is some sort of setting I'm guessing in the registry that is now set.

Update: If I go through the registry and delete ALL registry items that have anything to do with Boinc, I can now connect via command line perfectly. So the install of boinc sets something in the registry that will cause it not to work.

Edit 2: Found the offending registry setting

[HKEY_CURRENT_USER\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Manager]
"WindowIconized"=dword:00000000
"WindowMaximized"=dword:00000000
"Width"=dword:000006d6
"Height"=dword:0000030b
"XPos"=dword:000001bc
"YPos"=dword:0000006b
"GUISelection"=dword:00000001
"ReminderFrequencyV3"=dword:00000168
"NetworkDialupConnectionName"=""
"CurrentPageV2"=dword:00000002
"Skin"="Default"
"LanguageISO"="en_US"
"AutomaticallyShutdownClient"=dword:00000000
"DisplayShutdownClientDialog"=dword:00000000
"DisplayShutdownConnectedClientDialog"=dword:00000001
"DisableAutoStart"=dword:00000001
"RunDaemon"=dword:00000001 <<<<< If this is disabled in the gui or via the /nd flag /N does not work

So it looks like boincmgr.exe cannot connect to a remote host when it is set to not load the local client, however a local client is NOT spawned if using the /N flag. Only the manager is. What caused it to fail was unchecking "run the client" in Options -> Other options. This sets the RunDaemon key in registry to 0 which then causes the manager to not connect properly with the /N switch.

@AenBleidd
Copy link
Member

Ok, this case is already handled by #2745

@AenBleidd
Copy link
Member

Should be fixed in #2745

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

3 participants