Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

Installation of Subversion 1.6.5 on Ubuntu 8.10

Posted by: Chyne on: October 1, 2009

In order to install Subversion on Ubuntu 8.10, you will need to perform this command:

sudo apt-get install subversion

The default version of the Subversion at the current moment that you will get installed is Subversion 1.5. You can check the version with this command:

svn --version

And it will display the following message:

svn, version 1.5.1 (r32289)
compiled Aug 7 2009, 01:15:13

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles ‘http’ scheme
- handles ‘https’ scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles ’svn’ scheme
* ra_local : Module for accessing a repository on local disk.
- handles ‘file’ scheme

However, if you wish to install the latest Subversion (1.6.5), there are few steps that need to be done:
1. Add the following lines in the sources.list which is located inside the /etc/apt directory.

deb http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu intrepid main
deb-src http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu intrepid main

You can open the file with any editor or with the command:

sudo gedit /etc/apt/sources.list

2. In order to start installing and using software from a Personal Package Archive (PPA), you need to add the key signature so that you can tell Ubuntu where to find the PPA and how to verify the authenticity of its software.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 413576CB

3. Do an update to get the sources:

sudo apt-get update

4. Reinstall or upgrade the installed subversion

sudo apt-get --reinstall install subversion

5. Check the latest version with the command: svn –version

svn, version 1.6.5 (r38866)
compiled Sep 2 2009, 05:15:17

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles ‘http’ scheme
- handles ‘https’ scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles ’svn’ scheme
* ra_local : Module for accessing a repository on local disk.
- handles ‘file’ scheme

As specified in the launchpad page that discussed about installing Subversion in different Ubuntu version, you need to choose the correct source list entries that suitable for your Ubuntu version else you will encounter broken packages error as bellow (which I had configured with Jaunty that should be work for Ubuntu 9.0.4 and not Ubuntu 8.10):

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
subversion: Depends: libsvn1 (= 1.6.5dfsg-1ubuntu1~jaunty1~andersk1) but 1.5.1dfsg1-1ubuntu2.1 is to be installed
Depends: libsqlite3-0 (>= 3.6.10) but 3.5.9-3ubuntu1 is to be installed
E: Broken packages

References:

How to Reset Postgres Forgotten Password?

Posted by: Chyne on: September 28, 2009

Today, I was being asked whether I know any methods on how to retrieve or reset Postgres password. Although we had done some research but the provided solutions are quite confusing and not giving detailed explanations. We just left the research aside and continue with our work but I still feel this is doable. The reason is forgetting passwords is a common problem for every users and I believe there is a way to retrieve or reset the password. Even games also have their cheat codes and tricks :P

So, I decided to find the workaround at home since postgres is installed in my personal laptop. The postgres version that I’m using is 8.2 and installed in Windows environment. Let’s venture every step with detailed explanations:

>> Further Investigation (using ‘trust’) :idea:

1)      Edit pg_hba.conf which is located in <postgres_home>/data directory for the following line:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust

2) Start the command prompt via All Programs > PostgreSQL or just access to the /bin directory of the PostgreSQL installation directory:

C:\Program Files\PostgreSQL\8.2\bin>

3) Access to the database

C:\Program Files\PostgreSQL\8.2\bin> psql template1 –U postgres

4) Note that postgres is case sensitive. You need to have the following format to access to the table ‘pg_shadow’ or ‘pg_authid’ system catalog that list all the usernames and passwords:

SELECT * from pg_shadow;

template1=# SELECT * from pg_shadow;
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd| valuntil | useconfig
———-+———-+————-+———-+———–+———————
—————-+———-+———–
postgres | 10 | t | t | t | md532e12f215ba27cb750c9e093ce4b5127 | |

(1 row)

Note:
You can see that the password has been encrypted in md5.

5) Reset the password to ‘password’

template1=# ALTER USER postgres WITH PASSWORD ‘password’;

6) Restart postgres

Alternative Workaround

Crack the Postgres password hashes with MDCrack – http://pentestmonkey.net/blog/cracking-postgres-hashes/

>> Further Zooming :arrow:

Why edit pg_hba.conf to ‘trust’?

Most of the workaround will be providing the solution by editing the pg_hba.conf which is located in <postgres_home>/data directory but I would like to know the difference between ‘md5’ and ‘trust’.

1)      Start a command prompt via All Programs > PostgreSQL or just access to the /bin directory of the PostgreSQL installation directory:

C:\Program Files\PostgreSQL\8.2\bin>

2)      Access to the database

C:\Program Files\PostgreSQL\8.2\bin> psql template1 –U postgres

3)      Enter password for user postgres:

Note: If you had set to ‘trust’ in pg_hba.conf, you will not be prompted to enter password

What are other Authentication Methods?
There is a list for postgres authentication methods:
• trust
• password
• Kerberos
• Ident-based
• LDAP authentication
• PAM authentication

Documentation: http://www.postgresql.org/docs/8.2/interactive/auth-methods.html

How User Password Encryption Works?

My previous post related to user password encryption (general idea):

How your Work Shapes your Thinking & Improves your Attitudes

Posted by: Chyne on: September 26, 2009

I really believe every work will shape an individual’s thinking and affects the individual’s attitudes, either it is improving or it’s getting worse. For my personal opinion, if the work that you are doing able to sharpen your thinking skill, your attitudes will be improved as well. Attitudes improvement is the most important element that improves your work quality and if your attitude is getting worst, the efficiency and quality of your work will be dropping accordingly. You can imagine how the line graph looks like for the inter-relation of the attitudes, efficiency and quality.

Sometimes, when during the review for some of my previous cases, there will be several thinking comes into my mind:

1) “Is it me? I can’t believe I can do such a low quality of work!” :(

2) “Wow….I never thought that I can be that great in handling such difficult problem” :P

3) “Urgh…What a stupid question that I ever asked the customer. I probably was in the dreamland when doing this.” :roll:

4) “I can recall this customer…….” (Either the customer was very appreciated with your support or the customer has given you a hard life)

You can make a comparison of yourself between the current and the previous of you. Definitely you will learn a lot and figured out the different areas of your personal growth:

  • Knowledge – how limited your knowledge at that time.
  • Thinking – how fresh you just started your current work and your thinking not yet being built to familiar with it, how you see the issue at that time and how you see it right now.
  • Attitudes – how you handle the problem at that time and what you will do if you handle it again? Probably you don’t know how to apologize with your mistakes at that time but you had learned how to be more responsible and have a better attitude if you handle it again.
  • Advices – Recalling what you had learned and what the seniors had told you during that stage that you might forgotten after such a long time, how the seniors helped you to handle some tough customers and understand why the seniors asked you to do so if you can’t get the understanding at that time.
  • Independent – Do you still depending that much to the seniors as last time for some of the scope that you weak on it?

Reviewing Several Improvement

>> Promises

Giving promises to customers is a quite risky thing. If you are not sure whether you will be able to make it, don’t try to give a promise by telling the customer that you will monitor closely the issue with other support engineers. However, once you had made the promise, please ensure that you will fulfill the promise instead of giving empty promises as this will affect company’s reputation and customer’s trusty to the support. You need to have the responsibility for every message that you deliver to the customer.

>> Understanding

Well, not all customers can easily get frustrated and lack of understanding. There was once when an issue has been closed and the customer came back with another question. Unfortunately, I only aware of this after two weeks when I was cleaning up some follow-up issues. I really apologized for the delay response because I really didn’t know he will come back with another question after the issue has been closed instead of raising a new issue. I provided him with the solution and apologized with explaining the reason of the unawareness. I really don’t mind if he comes back with scolding if he feels better by doing so.

Surprisingly, I got an unexpected response:

no problem  & thanks for comment.

I understand you people handle lots of tickets and there may be delay in response.

>> Learning Opportunity

I guessed every support engineers glad to see the issue has been resolved especially if the customer found the solution and resolved locally. I used to have an attitude and have a mixed feeling. I feel embarrassed that I can’t resolve the problem and the customer can resolve the issue by himself but at the same time, I feel happy to see the customer has resolved the issue locally and I can spend lesser time on him. However, this kind of working attitude doesn’t last long.

I feel such thinking seems a bit lack of responsibility and sounds like my job is to help you to resolve the problem and once you resolve it by yourself, I can close this issue and spend more time on other customers or grab as many issues as I can to hit the volume target. Let me change this kind of improper mindset.

Instead of proceeding to close the issue, I will ask the customer for his solution to resolve the problem and hope he doesn’t mind to share it out. For me, I don’t see myself as helping customers to resolve the problem for every issue. I see every issue as a discussion place and exchange knowledge. Not all customers are noob and some customers really have the technical background but they just require other kind of assistance to grab someone to discuss the problem in order to resolve the issue more efficiently. Besides that, I like to grab every opportunity from different ways to gain knowledge especially from customers so that I’m not only limited within my colleagues.

>> Detailed

Learn to analyze or “digest” every message that the customer delivers to you. If the customer is those type that unwilling to expose more of his system environment, you need to read and understand each sentence, each word, and also from the beginning until last. You need to appreciate his every single word like a golden word and remember that there are no more information that he will provide to you anymore except all the words in the problem descriptions and also his every feedback. If the customer willing to provide log files, try to scrutinize every error message of what it means especially the root cause. You can also check whether there are any previous cases reporting the similar issue and also don’t hesitate to perform some google work.

>> Modesty

Learn to talk in modest way doesn’t mean you need to accept every blames and faults even though the fault doesn’t fall on you. What you need to learn is to have different attitudes for different responses and also try to think what causes him to gets frustrated and probably any improper terms that you had accidentally used previously during the communication.

If the customer puts the blame on you although the fault does not lies on you, try to talk in modest way by explaining why you suggest such solution and how you found the root cause and workaround instead of showing the egoism to prove how right you are. If you had explained it before this, you need to use another different way to explain the similar workaround or better wordings in order to create a “fake” impression to him that you are providing another new workaround. Why I said so? I just figured out that there are some people might disagree with what you said and try to correct you but when you heard his explanation, the meaning is the same but it’s just another different way of presentation.

If the customer has strong egoism, don’t try to have egoism competition or try to prove that you are right and he’s wrong. Who cares who is right and who is wrong? The most important is to find the solution for the problem.

>> “Screenshots” Speak Louder than Words

Sometimes, I can’t replicate customer’s problem from my testing environment but he still keeps reporting the problem does exist in his application. Can you see the problem here? What’s the point of keep arguing or defending each other with this scenario: Customer keeps mentioning the problem is there and you keep explaining that there is no problem at all. Customers like proof and something more convincing. What you need to do is to convince him by showing the screenshots and this will definitely causes him to start his own investigation for his environment or any changes that he has made instead of just fully depending to the support team.

>> Correct me if I’m Wrong

Well, it’s definitely don’t feel good when someone correcting you if you had done a mistake. However, if you think from the customer point of view and the issue itself, you need to provide the best or the nearest workaround to the customer. If your workaround does not fit the requirements and someone willing to provide a better solution, this will save the situation from getting worse and also improve the quality of the work as a team.

>> Customer’s Point of View

It’s not hard to think from customer’s point of view. You can try to remember when was your last time learning new things and during the first time when you are not familiar with the system. If a customer asking the details for every provided step, you can try to recall when was the last time you learned something that used to be your biggest weakness and think some of stupid questions that you ever asked when you need help from someone.

>> Self-Motivated

Reviewing some of the previous cases or once in a while, try to spend some time to think back some of the work that you had done in the past really can help you to understand yourself more about how far you had grown and which area that still requires improvement. Besides that, if you are feeling that you had done badly in your recent work, reviewing some of your previous work can motivates you. You can feel that actually you had learned a lot compared with those days and you will remember some customers that were really appreciated and happy with your support. You will feel better and it’s not as worse as you thought but please don’t easily satisfied that might leads you to arrogance. Then, try to remember some customers that ever causes you to feel that you had done a damn lousy work :P

If you are wondering is there any weird issues raised by customers for a product support, your doubts probably can be clarified by what I’m going to tell you for what I had experienced for this week. Sometimes, I figured out that there is a different pattern for the scope of issues for certain period. There might be a list of issues for last week with majority of the cases were in the same topic. The popular topic for last week probably is regarding configuring mail server and related to emails. As for this week, the popular topic is performance issue which I guessed is the toughest level and requires certain level of skill to handle such issue.

Besides of the level of difficulty, another major reason is the priority which causes some support engineers trying to avoid of handling it if they don’t have the confidence. Performance issues require more time for information analysis such as logs, thread dump, CPU graph and also some experiences in using JProfiler and JMeter. You can imagine how much time you need to spend in analyzing the information which is hard for you to provide an immediate solution in such a short duration.

However, not all customers can be as understanding as you wish. This had happened for the entire week and it seems my task for this week is to handle customer’s chasing work, weird issues, and probably someone that playing a role that willing to lend an ear to listen to their complaints (just to make it sounds better).

Browser Feature Request or Raising a Bug?

A customer was asking why the pages are loading simultaneously when the links in the application are being opened in multiple tabs. I thought it is suppose to be one of browsers’ feature and everyone prefers to load the pages at the same time instead of waiting each page to be finished loading before loads another one (Please correct me if I’m wrong). I told her the same thing but she told me that other applications do not work in such way. I really certainly feel this is not related to the application itself. It’s more related to browser issue and how fast of each page finish loading depends on the server response time. During the interaction with the customer, I almost wanted to throw out another question “Do you think you need to review your question?” or “Do you know what are you trying to ask?” That sounds bad :P

How to Route Your Host via Phone?

During the live chat support, a customer was asking for assistance on how to configured subversion because he can’t see his commit message and I had given whatever information that I had known and requested all the relevant information to troubleshoot this. After several conversations, finally, he willing to provide the log files and requested me to wait for him so that I can provide him the solution immediately. That’s fine. I can give it a try.

After further investigation, the log shows the error message “No route to host”. If you google this error message with subversion, most of the suggested solution is to check the network connections. So, I told him that it’s related to network issues and it shows that the application can’t connect to the repository. He needs to check the network connections with his network administrator. In fact, that’s out of the support scope since it’s more related to the environment itself. He told me that he doesn’t have a network administrator and he asked me to provide him a solution for this.

I had provided a lot of troubleshooting steps such as checking whether it has been blocked by firewall but he asked me how to check this? For the entire conversation, he has been asking several times of having a phone support. If he’s requesting for phone support, why don’t I just initiate a request to go into his environment and check what’s going on? However, not much progress for that because I only able access to his installed application but I really don’t familiar with his network environment. I really don’t understand how phone support can be better than accessing to his environment since not much investigation can be done through there but he still requesting phone support.

After a few conversations, he gets frustrated and requests to escalate the issue since I can’t help him to resolve the problem. Instead of proceeding to close the chat, I apologized to him and told him that I will escalate the issue to a more experienced support engineer. In fact, I really don’t mind to escalate to someone else if there are others can provide better solutions and more experienced in handling such problem. I really hope he will accept it and the bubble thought that comes into my mind: “Release me from your problem and it will be good for both of us”. Unfortunately, he replied me “Let me pass you the control of the screen and can you try to check it for me again?”

Well, trapping in subversion issues is not the first time for me. I think I had familiarized with the trap.

Chasing…..

This week’s live chat trend is chasing issues’ progress. There was a customer asking the progress of his raised issue which related to performance. So, I tried to grab some other support engineers to review the issue and provide assistance. After two hours, the customer came back and still asking for the progress and I made another promise to him. In the end, it involves several participants to comment and providing different areas of solutions. I guessed I was lucky that the customer does not get frustrated when there is no update after the first chase.

Lend an Ear

Another chasing work happens again today for another performance issue. The customer gets angry and has escalated the issue for several times to get different support engineers to handle his case. Since there is a “fire” burning there, probably there is a need of “strategy” on how to calm him down and gain back his trusty:

1)      The first thing is to convince him that you are reviewing his case and check what’s going on. This is to show that you are also taking care of his case although you are not the support engineer that handling the issue.

2)      Tell him that you will contact the relevant parties or the support engineer that handles the case and see how it goes to ensure that you are starting to do your work and try to grab the person to response to the customer as soon as possible.

3)      Try to make him feel that you are “innocent” :) when he asks for immediate solution on the spot. Due to the reason that you are just starting to review his case, tell him that you need more time to investigate the problem which is hard to provide any immediate feedback for cases that requires troubleshooting.

4)      Another effort assurance is to tell him that you will grab more support engineers or discuss with others on how to resolve the problem.

He was so angry and complained to me about how irrelevant the support engineer requesting the information as he has provided all the important stuff at the first place. He wants an immediate solution for this.

5)      Explain to him the reason of the request to prevent misunderstanding in terms of communication between our side and customer.

He started to feel lost of trust when he told me that he has paid a lot for the product support and he expects better quality of support and currently this is not what he is expecting.

6)      Earn back his trusty by being humble. “Can you please give us another chance to handle this case and see how it goes? I will try to discuss with others to work together for this issue and will get back to you as soon as possible.” Try to ensure him that you will pass this case and highlight the priority to other support engineers that are on duty if you are off work.

So, he calms down and said thanks for that. Surprisingly, he even telling me that he willing to provide other stuff if we need more information from them. I never expect he will say this since he was so angry in the beginning.

7) Try to give a beautiful closing. Saying thanks to him in return for his patience and understanding for willing to give us another additional time to spend on his issue.

That’s the end of the conversation but after a few minutes, the support engineer that handles this case sent a message to me and said thanks for the “damage control”. I never expect the situation can be that worse based on the usage of the term “damage control”.

How to Change the Location of stdout.log? (Part II)

Posted by: Chyne on: September 16, 2009

When I was blogging about “How to Change the Location of stdout.log” last night, I never expect there will be a second part (to be continued…) story about this post.

>> Customer

The customer came back to me this morning. This time, she has different requirement, which is, how to disable the log? She doesn’t want the logs at all. I really don’t understand why she hates logs so much. In fact, I felt she really needs to check her application’s status that causes the log is getting huge until she has such weird request.

However, I told her that it’s not a good practice of doing this because if the application encounters any issues in the future, it will be difficult for us to help her to investigate the problem. In fact, I told her that I was able to found the solution on how to change the location of the stdout.log. So, I started to guide her by asking her to access to the Tomcat Service Manager via Start > All Programs > Apache Tomcat > Configure Tomcat. I was so confident with the provided step because I had tested it yesterday and it works.

I think it’s considered lucky for those that loves surprises. This customer always gives you a lot of surprises and probably it’s one of the methods to increase the skill “change according to the situation”. She told me that she can’t find any Tomcat installation directory from there.  I was stunned and try to think for an alternative solution but before that, she told me that she will ask for help from her System Administrator and update me with the progress.

I certainly feel she should ask for help at the first place since the System Administrator knows more about their environment compared with me. Furthermore, I’m providing support for the product and not for Tomcat. I’m not working for Apache (http://www.apache.org/foundation/how-it-works.html#what) :P

Well, how to prove what I said is correct? In less than 30 minutes, the issue has resolved and she told me the System Administrator already solved the problem.

>> Colleague

I asked a colleague which is more familiar with the Linux environment and probably he knows about the logging stuff. I told him that I just aware that another alternative solution will be modified the service.bat for Windows environment. I found a backup answer in case I encounter again the situation of another customer can’t find the installation directory through the All Programs.

So, he asked me how about Linux environment? I was thinking about this since yesterday and I asked for his help to research on this. And funniest thing happened. He did a google search and returned me with my blog URL of my yesterday’s post. Haha…. :P I swear he absolutely doesn’t know that I blog and he keeps questioning whether it’s me due to several similarities in job scope and Tomcat logging issues that I blog about it yesterday.


Solution :idea:

If there is someone can’t find the Tomcat directory from the Programs list or the Tomcat is install in Linux environment, you can probably try this method:

1)      Access to the Tomcat/conf directory

2)      Uncomment the following lines in the server.xml:

<!--<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>-->

Change it to:


<Valve className="org.apache.catalina.valves.AccessLogValve" directory="C:/Documents and Settings/user/My Documents/log" prefix="stdout_." suffix=".txt" pattern="common" resolveHosts="false"/>

You can set the prefix (log name) that you wish to redirect the location of the file and also the type of file that you wish the log to be stored. By default, it is in .txt format. You can set it as .doc format if you want. Need more guidelines? Yes. This documentation “talks” better than me:

I hope there will be no “Part III” or “third episode” for this. :roll:

Friday’s Java Snack


In Java, "thread" means:

  • An instance of class java.lang.Thread
  • A thread of execution


An instance of Thread is just an object that has variables and methods, and lives and dies on the heap.
 
A thread of execution is an individual process that has its own call stack (one thread per call stack).

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Archives


StatCounter

free hit counters