It sounds like a problem with the join. It could be to do with the nulls. It could also be the data in the tables. Try this?
SELECT order.id_producto,order.id_usuario,log.host,log.agent
FROM order
JOIN log ON order.ip=log.host
WHERE order.ip is not null