This phase II trial studies how well selumetinib works in treating patients with solid tumors, non-Hodgkin lymphoma, or histiocytic disorders with MAPK pathway activation mutations that have spread to other places in the body and have come back or do not respond to treatment. Selumetinib may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth.