E-mail clients like Thunderbird or Outlook stopped to communicate with Courier IMAP/SMTP/POP TLS after some upgrade.
The only clue in log file was this error message:
courier couriertls: accept: error:14094417:SSL routines:ssl3_read_bytes:sslv3 alert illegal parameter
The problem was that certificate for IMAP (/etc/courier/imapd.pem) and /etc/courier/dhparam.pem were containing too short key. The short key was sufficient in past for encrypted communication. Unfortunately maintainers of Debian package forgot to add fix for upgrade.
It is very simple to fix the issue. Just generate DH with sufficient length.
This command will update /etc/courier/dhparm.pem.
Make sure to update all pem files in case that they contain DH record.
Restart services and clients should be able to reconnect without problem.
If you still experience some issues with PEM files check out article PEM routines:PEM_read_bio:no start line.
It’s very pleasant situation when you reboot Linux server and it starts.
It’s very unpleasant situation when this server contains many KVM virtual servers and none of them start. 🙁
virsh list displays just this:
Id Name State
0 Domain-0 running
That’s nonsense. There was no such virtual with name Domain-0.
When you try to create domain you can see this fancy error message:
[root@server qemu]# virsh create ./virtual-01.xml
error: Failed to create domain from ./virtual-01.xml
error: internal error no HVM domain loader
What went wrong? How to fix it?
I spare you long story with server diagnostic.
The problem was that server started different kernel after reboot. In this case it was different kernel with Xen support. Centos kernel with Xen support does not have KVM support. That’s quite logical. It was sufficient to change default kernel in grub.conf to non-Xen version, restart machine and everything was working like a charm.
Creating new git repo and pushing it to remote server is fairly easy.
You can work with project localy. When you want to push it to remote server, then it is necessary to add remote repo url.
git remote add origin <MY-URL>
Now you can push it:
git push -u origin master
When it works. Hooray. Sometimes you may find following error:
error: src refspec master does not match any.
error: failed to push some refs to '<MY-URL>'
The reason why this happens is not that obvious. 🙂
Git creates master branch only after commit to your local repo. If you just initialize repo then there is no master. How to fix it?
Just add and commit at least one change to your repo and re-run push command. You can add e.g. .gitignore.
You can find more info at StackOverflow.
I’ve found several interesting issue after upgrading PHP 5.3 to PHP 5.4 on Drupal 6 and Drupal 7 sites.
The first biggest problem was that Drupal was displaying Access denied message on all web pages. It was not possible to login to system. Even http://localhost/?q=admin didn’t work.
I had to create temporary session. It is quite easy when using Drush:
Drush displayed one time session for admin. This solved the problem with admin login.
The other issue was that there was Access denied message on every page. There were also other very useful messages flooding each page:
Notice: Undefined index: access in function _menu_link_translate() …
I spent some time searching for any hint how to resolve this weird behavior. It was necessary to delete all Drupal’s caches.
Configuration -> Development -> Performance -> Delete cache
After this clean up Drupal was working correctly.
Then I checked one older Drupal 6 site and there was nice big red warning:
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
The problem was that there was no default timezone in php.ini. It was sufficient to add timezone to /etc/php5/apache2/php.ini to section
; Defines the default timezone used by the date functions
date.timezone = "Europe/Prague"
You can find more info about timezones at php.net/date.timezone.
After reloading Apache configuration everything was ok.
There is one very annoying issue in Eclipse: stealing of focus by Console window.
Console window is displayed when you run application.
When you set focus to some other window like Search results and application prints something on output then Eclipse will automatically switch to Console window. Your search results are gone.
There is simple way how to get rid of such a behavior.
Go to Window -> Preferences -> Run/Debug -> Console. Uncheck options:
- Show when program writes to standard out
- Show when program writes to standard error
jQuery.i18n.properties is useful library based on jQuery. You can use it to load .properties files with localization to web application.
I made upgrade of jQuery in my application from version 1.6.2 and application failed with error:
Uncaught SyntaxError: Unexpected token ILLEGAL
I spent some time debugging jQuery and i18n and I found out that one of .properties file contains weird property with name:
Problem was in numeric prefix. Solution is quite easy: fix property.
This problem occurs when you upgrade jQuery to 1.6.3 and higher.
IntelliJ Idea Ultimate has great support for Flex projects.
There are few gotchas that you have to deal with.
When you set up project, compile it and open it in browser you can get very common error #2032 in Flash Player.
This indicates that you have some problem with RSL libraries. I already wrote some posts about RSL troubleshooting.
In case of Intellij Idea just add following line to Additional compiler settings (Modules – Flex – Flex Compiler Settings):
This option causes that compiler links RSL into final SWF. The file is bigger, but you can be sure that it will work without #2032.
This option could help you for the time being.
Are you hungry? Are you working on your cool new app or system? Take a break. It’s time for some spaghetti or lasagna.
Let’s start our dinner with special menu and let’s read Menu from Wikipedia entry with title Spaghetti code.
Spaghetti code is a pejorative term for source code that has a complex and tangled control structure, especially one using many GOTOs, exceptions, threads, or other “unstructured” branching constructs. It is named such because program flow tends to look like a bowl of spaghetti, i.e. twisted and tangled. Spaghetti code can be caused by several factors, including inexperienced programmers and a complex program which has been continuously modified over a long life cycle. Structured programming greatly decreased the incidence of spaghetti code.
Do you feel still hungry?
Do you know that there is also definition of Lasagna code and Raviolli code?
Ravioli code is a type of computer program structure, characterized by a number of small and (ideally) loosely-coupled software components. The term is in comparison with spaghetti code, comparing program structure to pasta; with ravioli (small pasta pouches containing cheese, meat, or vegetables) being analogous to objects (which ideally are encapsulated modules consisting of both code and data).
Lasagna code is a type of program structure, characterized by several well-defined and separable layers, where each layer of code accesses services in the layers below through well-defined interfaces. The term is in comparison with spaghetti code, comparing program structure to pasta.
That’s not all 🙂
There is one more 😀
Spaghetti with meatballs
The term “spaghetti with meatballs” is a pejorative term used in computer science to describe loosely constructed object-oriented programming (OOP) that remains dependent on procedural code. It may be the result of a system whose development has transitioned over a long life-cycle, language constraints, micro-optimization theatre, or a lack of coherent coding standards.
I was trying to clone git repository. I had brand new Windows with Cygwin version of git. Intellij Idea displayed nice helpful error message:
fatal: The remote end hung up unexpectedly
I found article at grublesmurf.org that pointed me to solution.
Problem was that Cygwin was using directory c:\cygwin\home\georgik\.ssh, but Intellij Idea was trying to read c:\Users\georgik\.ssh. I moved .ssh directory to c:\Users\georgik and set HOME variable to %USERPROFILE%.It is also worthy to modify /etc/passwd in cygwin to match that directory.