On a continuous machine for filling containers (3) with at least one product, each container (3) is fed along a given path (P) in time with a relative metering device (28), which withdraws the product from a tank (20), feeds the withdrawn product into the container (3), and has a piston (63) and a cylinder (39) movable axially with respect to each other and a look device (68) provides for selectively locking the pistons (63) and relative cylinders (39).Lock device (68) prevents filling of metering device (28) if no container present.