The so-called "input" jack of a guitar is actually an output jack that sends the signal from the pickups out to the amplifier. Over time, the jack itself can become loose or the wires that are connected to it can become loose as well. While replacing the jack is a simple solution, it can also be fixed, saving you the time of the replacement. If one or more wires is disconnected, they can be re-soldered and if the contacts are dirty or loose, they can be cleaned and adjusted as well.
Plug the bass guitar into an amp and the set the volume very low, just enough to hear the signal. Wiggle the cord around and try to find the spots that sound crackly or intermittent. If there is no sound when the cable is plugged in, push it in hard or pull it out slightly until you hear a signal. These actions may help you understand what is wrong with the input jack.
Remove the jack plate or control cavity cover of the bass. Jazz basses require that you unscrew the whole jack plate to access the input jack, while other types allow you to easily access the input jack in the control cavity. Visually inspect the wires going to the jack as well as the jack itself for any loose connections that may be apparent. Clean the jack with rubbing alcohol or blow it off with compressed air to remove debris.
Solder any loose wires that may be affecting the sound of your bass. Plug the soldering iron into the outlet and allow it to warm up. Place the hot tip on the metal and place the solder directly onto the hot metal to secure the solder joint. Remove the tip of the soldering iron and the solder, placing the soldering iron on its holder to prevent burns to the work table. Check the input jack to see if that made an improvement.
Use a pair of pliers to bend or move the contacts of the input jack. Over time, the contacts can loosen or move out of position causing intermittent or no sound from the bass. Rather than replacing the jack, bend the contacts back into place so that the connection is strong once again. Bend it until it looks as though the tip of the cable is touching the tip of the contact of the input jack. This will only work on non-bullet style jacks.
Replace the jack by removing the solder from the broken jack and unscrewing it from the bass guitar. Wire the new jack using the same wires from the pots and screw the jack back into place. Plug in your bass to an amplifier to ensure that your soldering work is sufficient. If it is still scratchy, it may be something other then the input jack that is the problem.