Thanks for your query.Based on the facts that you have posted it appears that you have Infection of Epididymis (Epididymitis
).Most of the time it is secondary to UTI
Please get your routine urine test done to confirm UTI.
Please take broad spectrum antibiotics along with anti inflammatory medication like Diclofenac
twice daily .
Get the prescription of medicines from your family Physician.
Ensure to consume more water so as to keep your urine dilute.
As regards your doubt having Hernia please consult qualified Urologist
or General Surgeon
for clinical examination ato confirm the diagnosis.