In Job 32, Elius is indignant that Job would suggest that he is suffering innocently:
LXX2012(i) 1 And his three friends also ceased any longer to answer Job: for Job was righteous before them. 2 Then Elius the son of Barachiel, the Buzite, of the kindred of Ram, of the country of Ausis, was angered: and he was very angry with Job, because he justified himself before the Lord. 3 And he was also very angry with [his] three friends, because they were not able to return answers to Job, yet set him down for an ungodly man.
In chapter 33 he tells Job to confess his faults to his friends, and God will forgive him and heal him:
23 Though there should be a thousand messengers of death, not one of them shall wound him: if he should purpose in his heart to turn to the Lord, and declare to man his fault, and show his folly; 24 he will support him, that he should not perish, and will restore his body as [fresh] plaster upon a wall; and he will fill his bones with morrow. 25 And he will make his flesh tender as that of a babe, and he will restore him among men in [his] full strength. 26 And he shall pray to the Lord, and his prayer shall be accepted of him; he shall enter with a cheerful countenance, with a full expression [of praise]: for he will render to men [their] due. 27 Even then a man shall blame himself, saying, What kind of things have I done? and he has not punished me according to the full amount of my sins. 28 Deliver my soul, that it may not go to destruction, and my life shall see the light. 29 Behold, all these things, the Mighty One works in a threefold manner with a man. 30 And he has delivered my soul from death, that my life may praise him in the light.
In James 5, he seems to give the identical advice:
Jas 5:13-20 KJV - Is any among you afflicted? let him pray. Is any merry? let him sing psalms. Is any sick among you? let him call for the elders of the church; and let them pray over him, anointing him with oil in the name of the Lord: And the prayer of faith shall save the sick, and the Lord shall raise him up; and if he have committed sins, they shall be forgiven him. Confess [your] faults one to another, and pray one for another, that ye may be healed. The effectual fervent prayer of a righteous man availeth much. Elias was a man subject to like passions as we are, and he prayed earnestly that it might not rain: and it rained not on the earth by the space of three years and six months. And he prayed again, and the heaven gave rain, and the earth brought forth her fruit. Brethren, if any of you do err from the truth, and one convert him; Let him know, that he which converteth the sinner from the error of his way shall save a soul from death, and shall hide a multitude of sins.
I have always understood Job to be indeed blameless in his affliction. Is James not taking the lesson of the Job story correctly?