Organizing photo stream with exiftool

I am used to use XnView when preparing yearly photobook. I rename all pictures to have Date taken exif attribute encoded in a file name along with a counter within the year. But recently I noticed two problems: some pictures miss exif data and XnView does not sort pictures correctly by this attribute (e.g. summer picture between autumn pictures). I googled that ExifTools library can handle my tasks as well. Another helpful site ryanmo gave me a hint, how to use it.

I copied files without exif data into new directory. Set Date taken exif attribute from file timestamp, preserving original timestamp:

exiftool.exe "-AllDates<filemodifydate" -P  .

Some files had wrong timestamp, so I had to set rough value manually:

exiftool "-AllDates=2015:05:09 12:00:00" .

Then I copied resulting files back to other pictures. Rename all files in current directory using exif Date taken attribute, add a counter that is ordered by Date taken attribute.

exiftool "-FileName<DateTimeOriginal" -d "foto-%Y-%m-%d_%H%M%%-C.%%e" -fileOrder DateTimeOriginal .

And the result is:

foto-2015-11-14_1614-1050.jpg
foto-2015-11-14_1614-1051.jpg
foto-2015-11-14_1713-1052.jpg
foto-2015-11-14_1713-1053.jpg

Update: XnView sorting issue was fixed with Options / File list, tab Misc, Exif date used to sort -> Date taken.

Google Drive Error

I encountered a situation when starting up Google Drive failed in few seconds without evident reason. I just saw disabled Google Drive icon for a while and then it disappeared.  I found logs sitting at \AppData\Local\Google\Drive\sync_log.log location and there was:

2014-09-30 21:20:37,013 +0200 INFO pid=4864 9492:MainThread logging:1612 Setting Omaha usage flag in registry
2014-09-30 21:20:37,013 +0200 ERROR pid=4864 9492:MainThread logging:1586 ERROR, UNEXPECTED EXCEPTION
2014-09-30 21:20:37,013 +0200 ERROR pid=4864 9492:MainThread logging:1586 (5, 'CreateEvent', 'Access denied.')
Traceback (most recent call last):
File "<string>", line 249, in Main
File "common.wx_sync_app_controller", line 115, in Initialize
File "common.sync_app_controller", line 145, in _RunAsyncCallbackWithExceptionHandling
File "common.wx_sync_app_controller", line 131, in _InitializeAsync
File "windows.win_sync_app_controller", line 155, in _InitializeEvents
File "windows.win_sync_app_controller", line 249, in _CreateEvent
error: (5, 'CreateEvent', 'P\xf8\xedstup byl odep\xf8en.')
2014-09-30 21:20:37,015 +0200 INFO pid=4864 9492:MainThread logging:1612 Crash reporting disabled. Ignoring report.
2014-09-30 21:20:37,016 +0200 INFO pid=4864 9492:MainThread logging:1612 Exiting with error code: 0

Not very helpful. Though I found some discussion about possibility to install Google Drive multiple times on single computer. I am the only power user on my notebook so I know that this is not the cause because there is just single installation. But I logged in my wife’s account and there was the Drive running (but not configured). So I stopped the process and returned to my account. Next attempt  to start Google Drive was successful. So I found there can be single Google Drive process running on a computer.

SoapUI and SSLPeerUnverifiedException

I have developed and tested new web service. I used SoapUI for testing local endpoint. Next step was to deploy the service into testing environment. But suddenly I failed to connect to this endpoint. I was able to open its WSDL description in Firefox, but SoapUI failed with SSLPeerUnverifiedException: peer not authenticated. The setup was network with proxy and there was Apache proxy translating URLs for the service. There was many similar complaints on web but no solution. I tried many proposals like trusting the certificate (because StartCom is not trusted certification authority in Java) but nothing helped. Until I posted a question SoapUI fails to connect HTTPS (SSLPeerUnverifiedException) on StackOverflow. It lead me to solution:

  1. edit bin/soapui.bat
  2. find setting the property JAVA_OPTS
  3. append -Djsse.enableSNIExtension=false

The reason for this behavior is explained in this answer:

Java 7 introduced SNI support which is enabled by default. I have found out that certain misconfigured servers send an „Unrecognized Name“ warning in the SSL handshake which is ignored by most clients… except for Java.

OAuthLogin – beta testing

No public interest, so I discontinued this project

I have an idea of writing new website and I know that people do not like registrations. To maximize user involvement and participation I decided to support OAuth login technology which delegates authentication and authorization to different provider. In other words you can safely login with Google, Facebook and many other service accounts. I found Scribe library that helps Java developers but I realized that it is not such easy to start. So I decided to write a prototype first to learn all neccessary technologies in advance. And once it progressed and I put more effort in it I decided to make it public and open source.

So there it is. It is beta release which improved user experience and fixed too broad privileges issue. It is standalone Java Enterprise application consisting of two modules: EJB and WAR. The users are persisted in database via JPA. The users can log with Google, Twitter and Facebook. I reconsider Microsoft account support as well. It is possible to log with one provider and then link other providers as well, so you can later choose any provider to log into same account.

GitHub

 

Security by McAfee

There is McAfee Endpoint Security running on my work computer. Yesterday I lost few hours with having it blocked by my computer. I turned the computer on in the morning but Endpoint Security (ES) did not accept my password with following message: Error EE0F0001: Token authentication parameters are incorrect. I was more carefull typing the password, I had to wait for a minute  but it failed again. The third attempt failed again (and pause doubled). Then I had to call to a service desk to unlock it via passphrase exchange. I was curios, if the error disappeared so I rebooted my computer,  typed carefully the password and the same problem occured again, but the wait time increased to 5 minutes.

So I called helpdesk again, we went through the same procedure and he told me to change my windows password. I did and I printed neccessary materials, then I rebooted the computer and tried again – 15 minutes wait time and passwors was not still accepted. Fourth unlock procedure and guy from helpdesk told me that I need to wait at least half an hour after password change before rebooting computer to let McAfee Endpoint security sync new password. Fine, I did it again, finished some important work, verified in ES that authentical token was synced recently and rebooted notebook again. I typed my password and it told me that it is blocked for 30 minutes now! I called the helpdesk again and he told me that I had to switch off the computer to reset this pause counter. When I did, I could login in immediatelly.

Well, friday was not very productive day. But i realized that to spoof McAfee’s security increasing pause you just need to turn the computer off.