Ive had that twice, two different reasons though.
The first was from a gifted xj13 clone, it had some crazy guttation issues once flowered and would create little sweet brown sap balls under random petioles near the top of the foliage.
The second time was with a bad mealybug infestation while hunting gdp beans, the sap was more on the clear/milky side with a tinge of color and i would find this all over the stalk mostly on the bottom.