Wednesday, December 12, 2018

Eclipse crash: _cairo_operator_bounded_by_source: Assertion `NOT_REACHED' failed

Downloaded Eclipse 2018-09
unpacked it and ran it, it crashed at some point.

I got this error:

org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
***WARNING: SWT requires Cairo 1.9.4 or newer
***WARNING: Detected: 1.8.8
org.eclipse.m2e.logback.configuration: Logback config file: /scratch/ewass/workspace/gitonly/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://510.fwk116184677:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://510.fwk116184677:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
java: cairo-misc.c:380: _cairo_operator_bounded_by_source: Assertion `NOT_REACHED' failed.

Cairo is the graphic lib used by eclipse SWT GTK.
Newer eclipse requires newer Cairo as mentioned above.
The problem is i was using oracle linux 6.6 (2.6.32-504.el6.x86_64) - the new cairo is not supported on this OS.

So it seems i have to go back and use and older eclipse (like neon).

Saturday, November 17, 2018

Amazon AWS EC2 - solution to windows update doesn't work

Don't know if it is related specifically to EC2 but anyway i had a windows 2012 server that refused to update when i told it to be automatic or tried to initiate it from the windows update UI.

In the event log i got this message:
"Unable to Connect: Windows is unable to connect to the automatic updates service and therefore cannot download and install updates according to the set schedule. Windows will continue to try to establish a connection."

The solution was to run it manually by this command line:

wuauclt.exe /updatenow

Another tip: if you are running a cheap low mem instance (e.g. t2.nano), restart your server as something stronger (e.g. t2.xlarge) and do all your windows updates from there and when done go back to the cheap instance. much faster and more reliable this way and the small amount of time used in the expensive instance is really low.

Saturday, July 1, 2017

Getting still image URL/URI of an ipcam OR just how to query onvif ip cameras

The net is full of to much TLDR info about ipcams...
Here is a short tutorial on running ONVIF queries to your ipcam to check which URLs do what.

ONVIF is a universal spec that tries to unify function calls to all supported ip cameras.
The problem is ONVIF organization is really the type of "we like to document a lot but not give short examples on how to use" type of org (maybe they should start thinking in the direction of open sourcing and supporting sites that try to explain their specs instead of hunting them down for posting a spec that is hidden in their own "membership" areas on their site)

So here is the short "Hello World" on ONVIF and ipcams:

Lets go through a learning experience - i have a cheap ali express ip cam and i want to figure out which cam URLs are used for streaming video and which cam URLs can give me a still image.

I want this because i want to port forward these specific ports and be able to access them directly and not via some P2P Chinese service app that wants all permissions on my android...(RTSP streaming video can be opened on many standard android apps and on vlc)


1. Connect

Physically connect the cam to the router on your home LAN using an ethernet cable - fairly easy
Note that there are wifi ipcams and ethernet ipcams - both have an option to connect an ethernet cable
The good ones will be pre-configured to get an IP from DHCP
The bad ones will have some preconfigured ip address, but they can be changed to DHCP, you just need to connect to their http address and change it (wait but i don't know their IP ....?! - try changing your router to 10.0.0.X subnet or 192.168.1.X subnet and connecting just a computer and your cam, then see next section on how to find them)

2. Discover ip/port 

Lets find the ip and port of the ONVIF service on the cam -
First, how to check i found the correct ip and port-
just enter in your browser and see a SOAP response like this:
for example enter:

and get:

SOAP-ENV:ClientHTTP GET method not implemented

that means we found it (never mind about the error - we will see about that later)

So how to find the ip/port:
option A: if you know how to enter your router's http and check connected clients you can do that to find the IP, then you will have to scan that ip or try some well known ONVIF ports (e.g. 8899/1018)

option B: install "Fing" on your android cellphone - it will scan your local net and find it. again you will need to find the correct port

option C: install "Onvif device manager" or "iSpy" on your windows machine - they will scan your net and ports and find the ipcams and their onvif ports for you

3. Lets talk Onvif language with our cam-

Onvif speaks SOAP protocol - we will need a browser add-on to make life easier for us because we are too lazy to program stuff (or write long command lines with 'curl') -

In firefox, go to add-ons and click extensions, and add "RESTClient" extension +restart firefox.
Lets start by telling the device we want some general information -
lets assume my ip/port are

Click on the RESTClient red rectangular button on the top of the browser and you will get this screen:

When you enter a URL in the browser address bar it uses http GET protocol. SOAP uses http POST protocol, which besides the URL has a "BODY" part too - so  we will use the add-on to sent the POST commands (this can be done in linux/windows command line using "curl" too).

change the "Method" to POST
in the URL put
in the BODY put:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=""


click "SEND"

on the bottom part in "Response" change the tab to "Response Body (highlight)"
skip all the bloated SOAP-ENV xml shit, and in the bottom you will see something like:

   <tds:FirmwareVersion>V4.02.R11.00002520.10010.242900.ONVIF 2.4</tds:FirmwareVersion>

Great ! it works ! (if not, then your ip/port are not correct or your ip camera 
does not support onvif)

4. Check video stream URLs

everything same as before just change the body:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap=""


click SEND

as usual, skip all the soap shit and got to the bottom of the response (in the response body tab not response headers tab!)

you will get a list a profiles with their tokens and resolutions etc...:

   <trt:Profiles fixed="true" token="000">
     <tt:VideoSourceConfiguration token="000">
       <tt:Bounds height="1080" width="1920" y="0" x="0">
     <tt:AudioSourceConfiguration token="000">
     <tt:VideoEncoderConfiguration token="000">

<----cut ----="" here="" response="">

now lets get the URL of a specific profile token ("000"). Send this body:
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="" xmlns:trt="" xmlns:tt=""> <soap:Body> <trt:GetStreamUri> <trt:StreamSetup> <tt:Stream>RTP-Unicast</tt:Stream> <tt:Transport> <tt:Protocol>UDP</tt:Protocol> </Transport> </trt:StreamSetup> <trt:ProfileToken>000</trt:ProfileToken> </trt:GetStreamUri> </soap:Body> </soap:Envelope>

and you get this kind of response containing the URL:

lets test it:
open it (rtsp://
in VLC (window/android) or some other RTSP Player (i like android VXG RTSP player)
it should show the live stream
(note vlc tends to crash some times. try a different app or VLC beta if this happens)

5. check still image (jpg) URL

send this body (update the profile token id to yours):
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="" xmlns:trt="" xmlns:tt=""> <soap:Body> <trt:GetSnapshotUri > <trt:ProfileToken>000</trt:ProfileToken> </trt:GetSnapshotUri> </soap:Body> </soap:Envelope>

you should get something like:


Paste the URL in the browser URL section it check if it works ... :)

6. Other cool stuff you can do with onvif

There are a lot of things you can do with onvif
A spec PDF can be found here:'s_Guide.pdf
(openipcam is a great resource site)
skip directly to "appendix B2" with the SOAP examples.
I am sure you will manage from there ...

7. Security

You ip cam is a basically a linux box. lately too many ip cams have been 
victims of hosting malware/botnet/viruses.

These cams can easily hide a program waiting for a C&C server to tell them to start blasting 
an IP with denial of service packets or just be used as proxy for hacking activities.

I recommend - reserve your ip cam a dedicated ip in your router or just assign it a 
static ip + set firewall rules in your router not to let any packet in/out (especially out)
if it is not on the port you are using.

Also change the defaul user/passwords

Also - from time to time bring up wireshark on your localnet and just look at the traffic.


Tuesday, May 31, 2016

Weblogic process list (ps) with weblogic server names

Many times when using weblogic you want to kill specific weblogic servers.
When you run ps, you get a huge blurb of data in the weblogic process lines.
Even if you use 'jps' (java ps) it will give a much shorter list but it will lack the weblogic server names that correspond to the processes.

here is a command that can be run and will give exactly what we want:

    ps -aef | grep javaee | grep Dweblogic.Name | sed -e 's/\-Dweblogic\.Name/WLPROC/g' -e 's/\-[^ ]*\s//g' -e 's/\/[^ ]*\s//g'

Here is an example output:
userX    10611 10608  5 05:34 pts   00:03:13 WLPROC=AnalyticProviderServices0 weblogic.Server
userX    20918 20915  0 May26 pts   00:18:28 WLPROC=AdminServer weblogic.Server

Wednesday, December 16, 2015

Skoda octavia mk 2 (year 2002) - vacuum pipes layout

I had my car serviced and the car mechanic messed up the vacuum pipes - i had to have them re-fitted in another garage.

The result of the pipe mess up was that the automatic transmission couldn't go into 4th gear.

 I looked on the net but couldn't find easy to follow vacuum pipe layouts, so i drew one after they fixed it:

top view of engine

For non-hebrew users - the middle is the engine (on the engine right side is the vacuum pump). The most right side has the air filter. bottom right is the turbo unit which is behind the engine - you will have to shove your hand all the way behind the engine near the bottom to re-fit that tube if it gets loose.

here more pictures of the layout:

keywords: skoda oktavia octavia mk 2 vacuum pipes סקודה אוקטביה צינורות ואקום

Tuesday, October 6, 2015

Windows explorer right click "new" item and how it works

      The "New" Menu

There is not necessarily one good way to insert document types to the New menu; it depends on the type of document.

Windows searches for items in the registry at HKCR\.XXX where .XXX is the document extension, such as .bmp for Bitmaps, .xlsx for Excel 2007 Workbooks, .txt for Text Files, etc. For each one of these extensions, there is a ShellNew sub-key.

For documents that do not require predefined parameters, the ShellNew subkey contains a String Value named NullFile with no data. Text Files (.txt) and Bitmaps (.bmp) fall into this catagory.

For document types that do require predefined parameters, there must be a blank document of that type located at the %WINDIR%\ShellNew\ folder. The ShellNew subkey for that type must point to that file. Instead of having a String Value of NullFile with no data, it must contain a String Value of FileName that points to that file by name in the contained data. JPEG Files (.jpeg) and Excel Workbooks (.xlsx) fall into this category.

For example, to create a menu item for an Excel 2007 Workbook, there must be a blank workbook in the %WINDIR%\ShellNew folder (e.g. %WINDIR%\ShellNew\excel2007.xlsx). Then there must be a registry entry that point to this file:

In newer office versions you won't find the ShellNew key directly under HKEY_CLASSES_ROOT\.xlsx
instead it is located in HKEY_CLASSES_ROOT\.xlsx\Excel.Sheet.12

The reason is that under HKEY_CLASSES_ROOT\.xlsx there is a key:

which tells windows to search of the ShellNew key under Excel.Sheet.12.

Likewise, the conventional way to disable items from the New menu is to rename the sub-key from ShellNew to ShellNew-, or to simply delete the key (with caution, of course).

(taken from 


and it reappeared in the right click menu "new" items !

Monday, August 31, 2015