I have already a problem with my builds definition.
I explain :
i have 1 controller on my server
1 default agent on this server
1 default agent on a virtual machine.
When i build my project with the agent present on the server everythings good. But when i disable this agent and use the agent present on my virtual machine i have this problem :
MSBUILD : error MSB4016: Arrêt inattendu de la génération, car le journal "WorkflowCentralLogger" a échoué de manière inattendue lors de l'initialisation. TF214007 : aucune build n'a été trouvée avec l'URI vstfs:///Build/Build/236. L'URI n'existe pas ou MS(nameofmachinevirtual)$ ne dispose pas des autorisations pour y accéder.
TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '1'.
Sorry it's in french...
I use the administrator account for evitate some rights problems...
When i want to restart the build service present on my virtual machine i have this :
Communication failure between the Administration Console and the Build Service:
The pipe endpoint 'net.pipe://build/ServiceHost/8' could not be found on your local machine. This is usually caused by the Build Service being in an incorrect state.
If someone can help me because i block with that since 1 weeks...
Sorry for my english...
Best Regards Maxime SZAC.
This might simply be a permissions issue:Go to Team Explorer & right-click on the TeamProject where your Build Definition lives. Select "Team Project Settings" > "Group Membership...". You might want to add your VM in the [TeamProject]\Builders Group.In order to do that double-click the Group, press "Add member" > "Windows User or Group" and then at "Object Types" select "Computer"
If you then enter (VM-Name)$, your VM should be findable.
Related
I am trying to use AppleScript to control the Apple Photos app from within a QT C++ app that must run in the sandbox environment required for the macOS App Store.
I have tried to run the AppleScript via a QProcess launching osascript, like this :
const QString aScript = QString(
"tell application \"Photos\"\n"
" set selMedia to (get media items whose id contains \"%1\")\n"
" if not (album \"Trash from %2\" exists) then\n"
" make new album named \"Trash from %2\"\n"
" end if\n"
" add selMedia to album \"Trash from %2\"\n"
"end tell").arg(fileNameNoExt, APP_NAME);
QProcess script;
script.setProgram("osascript");
script.setArguments(QStringList() <<
"-e" << aScript);
script.start();
script.waitForFinished();
int exitCode = script.exitCode();
if(exitCode!=0){
QString outMsg = script.readAllStandardOutput();
QString errorOut = script.readAllStandardError();
// Warn user and output message...
}
This works fine outside the sandbox, adding the desired items from the library to the desired album. However, inside the sandbox, I get an errAEPrivilegeError. Looking in the Console for the error event, it states :
AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event core/getd from process '<private>'/0x0-0x4d84d8, pid=31654, because it is not entitled to send an AppleEvent to this process.
Here is my entitlements file when signing the app :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.Photos</key>
<array>
<string>com.apple.Photos.library.read-write</string>
</array>
</dict>
</dict>
</plist>
When the app is first run (sandboxed) and the AppleScript is started, I get the system permission box, saying that the app is asking to control the Photos app. I click OK of course, but then I get the error. And upon next runs, as the permission is already granted, no system permission box comes up, but it fails nonetheless. When I reset the permissions with the terminal command tccutil reset All [my app bundle id], then upon the next execution of the app and the AppleScript, I get the permission box again.
If I delete the com.apple.security.scripting-targets entitlement, I get no system permission request and the error is different : from my app the error output states Photos isn't running, from the console it says it was denied due to sandboxing. If I keep the scripting-targets and com.apple.Photos but delete library.read-write I get the errAEPrivilegeError again.
I have tried to only test the make new album named "Trash [...]"but this still fails with errAEPrivilegeError. Even if only telling Photos to quit with AppleScript (which according to Photos.app/Contents/Resources/Photos.sdef doesn't require any specific permissions appart from scripting, I also get errAEPrivilegeError. The only command that seems to work is activate.
Also, if I try to run the qprocess not as a separate process, with QProcess::execute (if maybe the sandbox problem is because it is not the main app running the script ?), I still get the same errAEPrivilegeError.
What am I missing for it to work, or what other method should I use to run an applescript from C++/QT when in a sandbox ?
Did you include NSAppleEventsUsageDescription in your app’s Info.plist?
[ETA]
OK, after further digging I can confirm the behavior you’re seeing. With the correct app entitlements an in-process NSAppleScript can send AEs to Photos; however, the same process is unable to send AEs from a child osascript process.
According to Apple docs (which are lousy), a child process must have exactly 2 entitlements to inherit its parent’s: com.apple.security.app-sandbox and com.apple.security.inherit. However, running codesign --display --entitlements - /usr/bin/osascript shows osascript has neither of these but a bunch of unrelated entitlements. So this looks like Apple’s screwup in how they’ve built osascript.
When running AppleScripts that are part of a Swift/ObjC app, I generally recommend using the AppleScript-ObjC bridge to load and call your AppleScript handlers directly; no subprocess required. I have no idea how to do that in a Qt app though.
The simplest solution may be to write your own command-line executable/XPC service in ObjC which runs your AppleScript code via NSAppleScript, giving it the com.apple.security.app-sandbox and com.apple.security.inherit entitlements, and embed it in your Qt app’s main bundle.
(You may also need to add com.apple.security.automation.apple-events in the main app’s entitlements if the runtime is hardened.)
…
One more thing: avoid generating AppleScript code via string interpolation. If you want to parameterize a script, pack your values as parameters in an Apple event and call the corresponding AS handler via -executeAppleEvent:error:.
I wrote C++ program running on 2 cluster nodes which should add \ remove a virtual IP from the network card on each node (following some logic I've wrote..).
For that, I use EnableStatic method of the Win32_NetworkAdapterConfiguration class (https://msdn.microsoft.com/en-us/library/aa390383(v=vs.85).aspx).
On that program I have 2 buttons, "Release VIP" and "Acquire VIP".
I use RDP to connect these nodes (using the permanent IP, not the VIP).
For Release VIP I call: EnableStatic({ "1.1.1.5" }, { "255.255.0.0" });
For Acquire VIP I call: EnableStatic({ "1.1.1.5", "1.1.1.80" }, { "255.255.0.0", "255.255.0.0" });
(For this example 1.1.1.80 is the VIP)
When I did it on Windows 2012 everything worked fine and I was able to add \ remove the virtual IP.
Now, on Windows 2016, my RDP is losing connection for 2-3 seconds as a result of the change in the VIP on the network card (both add and remove..).
I know that in this API documentation Microsoft wrote that RDP should lose connection but I wonder:
Why it didn't happened in Windows 2012?
Did they made any change?
Maybe I do something wrong?
And more important:
Does it have other effect except the RDP losing connection that I should know of??
Is there a better API to use?
Thanks a lot!
I am new to OMNeT++. I'm using OMNeT++ 5.2.1 and SuMO 0.30, and I'm trying to parked vehicles in specific parking zone using TraCI and send some WaveShortMessage in my scenario.
When I use TraCIDemo11p or MyVeinsApp as application type (*.node[*].applType =), I get this error:
Model error: No nic with this ID (27) is registered with this
ConnectionManager. -- in module (Veins::TraCIScenarioManagerLaunchd)
scenario.manager (id=6), at t=33s, event #6157
This error has occurred when the first car go parked in the parking zone at =33s and this error happens only when using this two classes: TraCIDemo11p or MyVeinsApp (in TraCITestApp worked fine).
Why does this error happen? Is there a way to send WSMs while using TraCITestApp?
Please help me to solve this problem. Thank you
What I'm trying to do is find all .db (Paradox) files from a directory and save them to .mdb. The thing is, to try if this works properly I've tried first opening an ACCDB (.db and .mdb I'll be using are resources only available in my school's internal network).
I've already checked, and I've found the sql drivers in the Qt directory, I've also added QT +=sql in my pro file, I've installed the access database engine, VBA is also installed, but I can't manage to open the connection. I'm yet to try connecting to a SQLITE database to try if it works, but I'm guessing it will. Here is the code, triggered from a button:
db.addDatabase("QODBC");
explorador.setFileMode(QFileDialog::Directory);
ruta=explorador.getExistingDirectory(this,"Seleccionar directorio");
directorio.setPath(ruta);
subdir=directorio.entryList(QDir::AllDirs);
//La lista comienza en el 2º elemento
for(int i=2;i<subdir.size();i++)
{
subruta=ruta+"/"+subdir.at(i);
directorio.setPath(subruta);
db.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+subruta+"/Base de datos11.accdb");
bool check=db.open();
if(check)
{
dbg.setText("Prueba");
dbg.show();
}
else
{
dbg.setText("Pruebaaa");
dbg.show();
}
}
Have any ideas?? Thank you!
I eventually solved it kind of bypassing through access. If someone else is struggling with this you need:
-Paradox DB engine (Be sure the version you download matches your .db file)
-Jet engine 4.0 or later
-access 2007 (Following version have removed Paradox DB connection)
-Administrator privileges to access the database engine folders(both jet and paradox)
Simply open the database through a connection or database object. Sintax should be something like this (Via a VBA module in access):
database.open(path,*Dont rememer what goes in here,*here goes the read/write permits,"Paradox 5.x")
Path should be pointing to a folder containing one or more .db files, which will be opened as a a single database with the files being tables. It actually genereates a new database (Either .accdb or .mdb, depending how you save it)
It is not exactly like this, but I'm on my laptop. I'll edit the answer once I'm in front of my code
Sorry it is not a c++ answer, but from what I've found it is kind of a pain in the a** to work with paradox databases. Hope this helps others with the struggle.
Ricardo
Using custom C++ OCI wrappers, I can successful register a CQN C++ callback-based registration, but it appears that somehow the subscription is dropped right away, behind my back. I get no call back on simple DMLs. If I try to unregister that subscription, for which register() worked just fine, I get ORA-29970: Specified registration id does not exist.
I'm running this test on a Win7 (64-bit) box, running a local 11.2.0.1.0 Oracle Server, and I connect with a C++ client app built against instantclient-11.2.0.2.0 that runs on that same machine.
I tried setting OCI_ATTR_SUBSCR_TIMEOUT explicitly to 0, to no avail.
I checked the job_queue_processes instance param to make sure it's not 0 (it's 1000).
Of course, the user/schema I'm connecting with has been granted CHANGE NOTIFICATION
I'm running out of ideas on this issue, and I would appreciate some insights on what else I could try or check.
I'm starting to wonder if CQN needs to be activated somehow. My DBA skills are close to nonexistent, this is a stock install of 11gR1 on Windows using the installer, with no special configurations or customization done at all.
Thanks, --DD
Update #1
A colleague successfully ran that same test, and he ran it using the server-provided oci.dll. I tried that (I build using instantclient, but forced the PATH at runtime: Path=D:\oracle\product\11.2.0\dbhome_1\BIN;$(Path) in VS Property Page> Debugging> Environment), and indeed the CQN test works! We still haven't figured out whether the slight version difference between client and server, or using instantclient (the Light variant by the way) vs a full client vs a server install is the real culprit.
But it is bad news that a newer instantclient does not support CQN...
Update #2
I've tried all 6 combinations of instantclient Light (65 MB) or Normal (150 MB) in versions 12.2.0.(1|2|3).0 on Win64, and none of them worked. Haven't tested the Full Client yet, nor have we tested on Linux just yet.
Environment_var cqn_env = Environment::create(OCI_EVENTS + OCI_OBJECT);
Connection_var cqn_conn = Connection::logon2(...);
Subscription sub(cqn_conn, "cqn_test", OCI_SUBSCR_NAMESPACE_DBCHANGE);
sub.set<attr::SUBSCR_CALLBACK>( &cqn_callback_func );
sub.set<attr::SUBSCR_CQ_QOSFLAGS>( OCI_SUBSCR_CQ_QOS_QUERY );
try {
sub.register_self();
} catch (const OracleException& ex) {
BOOST_REQUIRE(ex.error_code && *ex.error_code == 29972);
cerr << "\nSKIPPED: test requires CHANGE NOTIFICATION privilege" << endl;
return;
}