Unable to open spark ui in --master yarn mode

The UI is working when using pyspark, but not working with pyspark --master yarn.
Could you please help at the earliest.