My Beagle/Lab mix blackie had endless problems with them until we started having them emptied every week, and injecting them with antibiotics with a ball shaped needle thing that slid into the channel or canal. Once the infection was gone, we kept doing them every two weeks ourselves most of the time. She had no further issues.
My last dog King started having problems with the right one, and only the right one when he was about seven. The vet tried the same thing as what worked with Blackie, but it didn't work on King. Finally, the vet said the best thing to do was remove it. The main complication is possible anal incontinence. I took off two weeks from work, so I could stay home with him in case he had any problems, but his main issues were bad pain the first night after the surgery, and the cone the vet put on him that he couldn't see through made him a basket case. He was majorly depressed:
After he got the clear cone, he was back to his obnoxious normal self. On the day he was supposed to get his stitches out, I couldn't take him hitting me in the legs with the cone, so I took it off about an hour before I left for the vet's. I don't know when he did it, but he did a fine job of removing his own stitches, just like he did when he got neutered. Sneaky.