Key map error

Hi all,
I am facing difficulty in running any command in julia on my cluster.
I get this error on every statement -

julia> exit()
┌ Error: Error in the keymap
│   exception =
│    SystemError: flush: Input/output error
│    Stacktrace:
│     [1] systemerror(::String, ::Int32; extrainfo::Nothing) at ./error.jl:168
│     [2] #systemerror#48 at ./error.jl:167 [inlined]
│     [3] systemerror at ./error.jl:167 [inlined]
│     [4] flush(::IOStream) at ./iostream.jl:70
│     [5] add_history(::REPL.REPLHistoryProvider, ::Any) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:586
│     [6] add_history(::REPL.LineEdit.PromptState) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:1229
│     [7] add_history(::REPL.LineEdit.MIState) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:208
│     [8] commit_line(::Any) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:1995
│     [9] (::REPL.LineEdit.var"#110#163")(::Any, ::Any, ::Vararg{Any,N} where N) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2077
│     [10] #invokelatest#1 at ./essentials.jl:710 [inlined]
│     [11] invokelatest at ./essentials.jl:709 [inlined]
│     [12] (::REPL.LineEdit.var"#22#23"{REPL.LineEdit.var"#110#163",String})(::Any, ::Any) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:1364
│     [13] prompt!(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2447
│     [14] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2350
│     [15] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1144
│     [16] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at ./task.jl:356
└ @ REPL.LineEdit /scratch/ds2/julia/julia/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2449
julia> 
julia> exit()

Note it throws this error on every statement the first time and if I run that statement again then it responds. Just like here I run exit() statement first it throws this error and then I re-run that statement then it responds and exited from the interactive session.
Please tell me whether it is julia or my machine creating such problem.