July 2009 Archives

Wed Jul 29 15:37:39 CEST 2009

SSH tunneling for web surfing

If you cannot trust your local network for some reason, SSH tunneling can help you. All you need is:

  • A machine outside your current local network, for example a server with a static IP address in some data centre.
  • ssh (on your local machine)
  • A proxy server (on the remote machine)

My remote machine runs Debian, and I decided to install tinyproxy, a tiny HTTP proxy server. Configuration is done quickly by adding the following lines to /etc/tinyproxy/tinyproxy.conf:

	Port 	8888
	Listen  127.0.0.1

I would recommend commenting out any other Listen lines. Assuming you do not want to run an open proxy, you only want tinyproxy to listen locally. After editing the configuration file, restart the proxy via /etc/init.d/tinyproxy restart.

On your local machine, execute the following command:

	ssh user@server.example.net -L 1234:localhost:8888 -N

This forwards all traffic from your local port 1234 to the remote machine's port 8888 (localhost is needed because we configured the server to listen only to the loopback interface), which is where tinyproxy waits for inputs.

You may now tell your cool browser to use localhost:1234 as a proxy server—congratulations, your web traffic is now securely tunnelled to your remote machine.

Addendum: In the command string from above, you can also use -f to request ssh to go into the background.


Posted by Canmore | Permanent link | File under: FreeBSD

Wed Jul 15 21:08:53 CEST 2009

SAP NCC-1701D Support

The search phrases sap platin-gui freezes and use sapgui for java frequently appear in my server log files. However, as I used these in a different context, people will be disappointed once they discover that there are no articles concerning SAP GUI for Java except an installation guide for FreeBSD. This is obviously a matter of some importance, judging from the page hits, so I decided to do my part in the great struggle for bug-free software.

Using SAP GUI for Java

Let me answer the second search string first: Yes, you should use SAP GUI for Java. It is stable, secure and fast. SAP only lists a fraction of all Linux distributions in their Lifetime and Support Matrix for SAP GUI for Java. This is to ensure the highest standards of quality (in translation: SAP does not want to get sued into oblivion and must check that it really, really works at least with some operating systems. It not easy, given the myriad of system environments out there in the wild).

However, in almost all cases, SAP GUI for Java should run just fine under your personal Linux distribution of choice. So, on to the installation:

  1. Download a recent Java Runtime Environment from Sun.
  2. Download a recent version of SAP GUI for Java. Pick the jar-file that fits your operating system best.
  3. Start the installation via java -jar PlatinGUI-Linux-710r9.jar (or execute the jar-file using another method of your choice).

You are done.

Solving problems with SAP GUI for Java

There are several things to do when the GUI freezes or hangs.

  • Execute SAP GUI for Java from a terminal emulator. Use xterm or the likes. This allows you to view any error messages that might help to pinpoint problems within the source code.
  • Try a different Java Runtime Environment. Install an older JRE (there is no need to remove the current one). Set the PLATIN_JAVA environment variable to the installation directory of the older JRE, for example by executing export PLATIN_JAVA=/usr/local/Java/jre1.6.0_11/bin/java and /opt/SAPClients/SAPGUI710rev9/bin/guilogon from a terminal.
  • Try a different version of SAP GUI for Java. It is possible to install different versions in parallel. I would recommend this option especially if you are testing a new version for deployment.
  • Check with a supported operating system. Take a look at the Lifetime and Support Matrix for SAP GUI for Java and set up a test environment. This should be your last resort, because in most cases, the problem does not depend on your operating system.
  • Take a stack trace. If the GUI hangs, follow this very helpful article and create a stack trace. This diagnostical information is very helpful for SAP's support teams.

Reporting problems

In any case: You should always report your problems. SAP is very grateful for any feedback, even if it is in the form of debug information. You can use one of the following means of communication:

Whatever you do, try to describe the problem as precisely as possible: Attach all debug information (stack traces, error messages etc.) and create a step-by-step reproduction scenario. The more information you provide, the less time your request will take.

This is, for example, a bad bug report:

hello, i get error in gui. please advise!

Whereas this is definitely better (of course, a step-by-step description would be best. System information is also not included, but at least, one could try to reproduce the problem now):

When I click the "delete world" button in transaction GOD, SAP GUI for Java throws a java.lang.NullPointerException. The operation will then be aborted.

Small disclaimer (thereby fulfilling SAP's guidelines for blogging): While I work at SAP, these opinions are my own. Especially the policy regarding unsupported operating systems.


Posted by Canmore | Permanent link | File under: Musings, Work

Tue Jul 7 23:38:02 CEST 2009

Jabber is the new ICQ

Almost every person I know has an IM account. Most of them are still regular users of ICQ, despite of all its shortcomings. I do not want to make any boring, technical comparisons between the two protocols. Jabber/XMPP is clearly superior to ICQ for a many reasons. However, game theory shows us that "superior product" does not imply "market dominance". Let me try to convince you to create a Jabber account. Here are some questions you might have.

Where can I get a suitable client?

Wikipedia to the rescue! My short suggestions: Use Pidgin (Windows, Linux, BSD) or Adium (MacOS X).

Why should I want to use another protocol?

Because you will need it, eventually. Chances are, you already use a multiprotocol messenger, such as Trillian Pro or Miranda for Windows, Pidgin or Kopete for Linux/Unix, Adium or iChat for MacOS X. If you are not yet using a multiprotocol messenger, you should consider using one. It makes life easier, because you can still maintain your ICQ account (I am doing this, for example, because there are some people who simply refuse to use anything but ICQ. You are not one of them *handwave*).

You should also think about this: ICQ is owned by AOL. They want to make money—which is OK, I suppose. Hence, the original client for the ICQ network is Adware. Of course, AOL does not want you to use any other client:

[…] You agree not to (1) create or use any software other than the Software provided by ICQ or by America Online, Inc., or any affiliate thereof, to enter your ICQ number and password or to access the ICQ Services, without the express written authorization of ICQ; […]

Indeed, AOL changed the protocol several times in the past, thereby kicking out users that did not use the original client. Do you really want to be a part of that? There is also the "default argument" against ICQ, citing their user policy. Basically, AOL owns the right to use your messages for all purposes (see the Wikipedia article for more details). Most people will probably respond to that along the lines of "My conversations are not that relevant". That may be true, but for me, this passage reeks of intolerable business practices.

Alright, stop. How do I get an account?

Good news first: You will not have to memorize a wimpy UIN. Instead, you will get a nice address of the form nickname@server.tld (this also leads to less SPAM in your messenger).

If you happen to have a Google Mail account, you can use Google Talk. This means that people can contact you using your e-mail address. Google has instructions for some clients on their web page.

In any other case, you must decide about a server. You probably want to use either jabber.org. There are of course others, such as jabber.ccc.de. For simplicity, I am describing the steps for jabber.org. I trust you will be able to read the necessary documents for other servers.

  • Register an account using the web interface of jabber.org.
  • Start the appropriate wizard in your client program that allows you to add a new account. If you do not know how to do this, the documentation could be helpful. The steps for Google Talk might also prove useful (of course, the account details will have to be changed).
  • Enter your nickname (nickname@jabber.org) and your password. For security, you should enable SSL/TLS, if that is an option in your client.

Are there any alternatives to using two protocols?

Yes, there is at least one: Jabber transports. Some servers allow you to treat contacts from other IM networks as normal Jabber contacts and "transport" your messages transparently to the other network. Since the server needs to support it, it might not be available everywhere. This little article does not cover transports, so you have to ask a search engine of your choice. Sorry.

Done. What now?

See, that was not so hard.

If you want so, you may now drop me a note via Jabber (canmore@jabber.org). Do not forget to convert your friends, for they, too, shall bask in the glory of Jabber!


Posted by Canmore | Permanent link | File under: Musings