Thanks to the author! This works great on my Windows 2012 R2 servers for serving NTP to all the Cisco Collaboration / Contact Center components in the network.
http://htluo.blogspot.com/2009/02/ntp-network-time-protocol.html
Monday, November 2, 2015
Fix the Windows Time Service on domain controllers
Finally, a set of commands that fixes the time service on my Windows domain controllers:
http://blogs.msmvps.com/acefekay/2009/09/18/configuring-the-windows-time-service-for-windows-server/
Note that when you run the "net time /setsntp: " command, it will successfully clear the registry settings for the time service, but the console will print the command help text as though you had entered an incorrect command option.
http://blogs.msmvps.com/acefekay/2009/09/18/configuring-the-windows-time-service-for-windows-server/
Note that when you run the "net time /setsntp: " command, it will successfully clear the registry settings for the time service, but the console will print the command help text as though you had entered an incorrect command option.
Friday, September 4, 2015
Java ProcessBuilder has 32KB buffer, .waitFor() hangs if it isn't cleared
If you're running a simple Java ProcessBuilder, and it hangs and never returns when you start it and then run .waitFor() without running separate threads to make sure it finishes nicely, it may be because the ProcessBuilder is out of memory in its STDOUT buffer. The buffer is 32KB, so if your process returns more data than that and you're just trying to do a simple, synchronous .waitFor() call and just wait for it to return with all the data, it will never return if it hits this buffer limit. You must either consume the buffer, use threads, or redirect the output somewhere, like a temporary file. Kudos to "kjkoster" on this thread for the idead and code: http://java-monitor.com/forum/showthread.php?t=4067.
It goes something like this:
It goes something like this:
final File tmp = File.createTempFile("out", null);
try {
tmp.deleteOnExit();
final ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command("cat", filename).redirectErrorStream(true).redirectOutput(tmp);
final Process process = processBuilder.start();
final int exitCode = process.waitFor();
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(tmp)));
String line = "";
while ((line = reader.readLine())!= null) {
System.out.println(line);
}
reader.close();
tmp.delete();
} finally {
tmp.delete();
}
Tuesday, August 11, 2015
Example context.xml for JNDI resource for MSSQL with Windows authentication
<Resource name="jdbc/mydb"
auth="Container"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
maxActive="100"
maxIdle="30"
maxWait="10000"
removeAbandoned="true"
removeAbandonedTimeout="60"
autoReconnect="true"
logAbandoned="true"
username="username"
password="password"
type="javax.sql.DataSource"
url="jdbc:jtds:sqlserver://myserver.mydomain.com:1433;databaseName=mydb;useNTLMv2=true;domain=mydomain;"
validationQuery="SELECT 1"
validationQueryTimeout="1000"
testOnBorrow="true" />
Monday, April 20, 2015
eGain and Cisco Finesse - Single Sign On
The gadget that Cisco provides for eGain's OEM integration (EIM/WIM) doesn't provide single sign-on of any kind. Neither does the eGain Solutions Plus gadget that eGain provides.
I added simple single sign-on using the Finesse javascript API to retrieve the agent login credentials, but this only works for agent ID logins, and not for username logins. The issue is that the Finesse javascript API (as of version 10.5) will only return the agent ID, whether you logged in to Finesse using your agent ID or agent username. The Finesse REST API, however, will provide you with 'loginName', which will correctly return which one you used to log in with.
Here's the repository for the updated gadget:
https://bitbucket.org/juxe/gadget-egain-sso/
I added simple single sign-on using the Finesse javascript API to retrieve the agent login credentials, but this only works for agent ID logins, and not for username logins. The issue is that the Finesse javascript API (as of version 10.5) will only return the agent ID, whether you logged in to Finesse using your agent ID or agent username. The Finesse REST API, however, will provide you with 'loginName', which will correctly return which one you used to log in with.
Here's the repository for the updated gadget:
https://bitbucket.org/juxe/gadget-egain-sso/
Wednesday, March 4, 2015
Unmount NFS drive in VMware ESXi
ESXi 4.x: # esxcfg-nas -d vol_nfs ESXi 5.0: # esxcli storage nfs remove -v vol_nfsRun these commands using SSH to the ESXi host to unmount an NFS drive. The post below has useful information about doing this safely.
Thanks to this post: http://www.viktorious.nl/2013/04/05/vsphere-howto-remove-nfs-datastore-from-esxi/
Friday, February 20, 2015
FireTV Stick won't connect to Cisco IOS-based wifi access points
The fix:
The problem: the FireTV Stick had an update in early December 2014 (it seems, maybe it was earlier) to version 54.1.0.2_user_102018720 and units with this update will fail to authenticate when trying to connect to at least some Cisco access points. My FireTV Stick was shipped this week and it had this problem out-of-the-box. After reading the first 2 pages of the thread linked at the bottom of this post, it seems that this update made the FireTV Stick slower at finishing the WPA handshake, and this is causing it to fail on the Cisco APs that have a lower WPA handshake timeout. I'm guessing that Cisco IOS-based access points have a lower WPA timeout by default than maybe some consumer wifi gear.
Thanks to Joseph P. Mundschau on this Amazon forum thread for the solution!
dot11 wpa handshake timeout 500Enter the above command in configuration mode on the Cisco IOS-based access point.
The problem: the FireTV Stick had an update in early December 2014 (it seems, maybe it was earlier) to version 54.1.0.2_user_102018720 and units with this update will fail to authenticate when trying to connect to at least some Cisco access points. My FireTV Stick was shipped this week and it had this problem out-of-the-box. After reading the first 2 pages of the thread linked at the bottom of this post, it seems that this update made the FireTV Stick slower at finishing the WPA handshake, and this is causing it to fail on the Cisco APs that have a lower WPA handshake timeout. I'm guessing that Cisco IOS-based access points have a lower WPA timeout by default than maybe some consumer wifi gear.
Thanks to Joseph P. Mundschau on this Amazon forum thread for the solution!
Subscribe to:
Posts (Atom)